LibreOffice Module onlineupdate (master) 1
|
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
#include <dlfcn.h>
#include "cryptox.h"
Go to the source code of this file.
Macros | |
#define | MAC_OS_X_VERSION_10_7_HEX 0x00001070 |
Typedefs | |
typedef CFTypeRef | SecTransformRef |
typedef struct OpaqueSecKeyRef * | SecKeyRef |
typedef SecTransformRef(* | SecTransformCreateReadTransformWithReadStreamFunc) (CFReadStreamRef inputStream) |
typedef CFTypeRef(* | SecTransformExecuteFunc) (SecTransformRef transform, CFErrorRef *error) |
typedef SecTransformRef(* | SecVerifyTransformCreateFunc) (SecKeyRef key, CFDataRef signature, CFErrorRef *error) |
typedef Boolean(* | SecTransformSetAttributeFunc) (SecTransformRef transform, CFStringRef key, CFTypeRef value, CFErrorRef *error) |
Functions | |
static bool | OnLionOrLater () |
void * | cssmMalloc (CSSM_SIZE aSize, void *aAllocRef) |
void | cssmFree (void *aPtr, void *aAllocRef) |
void * | cssmRealloc (void *aPtr, CSSM_SIZE aSize, void *aAllocRef) |
void * | cssmCalloc (uint32 aNum, CSSM_SIZE aSize, void *aAllocRef) |
CryptoX_Result | CryptoMac_InitCryptoProvider () |
CryptoX_Result | CryptoMac_VerifyBegin (CryptoX_SignatureHandle *aInputData) |
CryptoX_Result | CryptoMac_VerifyUpdate (CryptoX_SignatureHandle *aInputData, void *aBuf, unsigned int aLen) |
CryptoX_Result | CryptoMac_LoadPublicKey (const unsigned char *aCertData, unsigned int aDataSize, CryptoX_PublicKey *aPublicKey) |
CryptoX_Result | CryptoMac_VerifySignature (CryptoX_SignatureHandle *aInputData, CryptoX_PublicKey *aPublicKey, const unsigned char *aSignature, unsigned int aSignatureLen) |
void | CryptoMac_FreeSignatureHandle (CryptoX_SignatureHandle *aInputData) |
void | CryptoMac_FreePublicKey (CryptoX_PublicKey *aPublicKey) |
Variables | |
const CFStringRef | kSecTransformInputAttributeName = CFSTR("INPUT") |
SecTransformCreateReadTransformWithReadStreamFunc | SecTransformCreateReadTransformWithReadStreamPtr = NULL |
SecTransformExecuteFunc | SecTransformExecutePtr = NULL |
SecVerifyTransformCreateFunc | SecVerifyTransformCreatePtr = NULL |
SecTransformSetAttributeFunc | SecTransformSetAttributePtr = NULL |
static int | sOnLionOrLater = -1 |
static bool | sCssmInitialized = false |
static CSSM_VERSION | sCssmVersion = {2, 0} |
static const CSSM_GUID | sMozCssmGuid |
static CSSM_CSP_HANDLE | sCspHandle = CSSM_INVALID_HANDLE |
static CSSM_API_MEMORY_FUNCS | cssmMemFuncs |
#define MAC_OS_X_VERSION_10_7_HEX 0x00001070 |
Definition at line 37 of file MacVerifyCrypto.cpp.
typedef struct OpaqueSecKeyRef* SecKeyRef |
Definition at line 17 of file MacVerifyCrypto.cpp.
typedef SecTransformRef(* SecTransformCreateReadTransformWithReadStreamFunc) (CFReadStreamRef inputStream) |
Definition at line 19 of file MacVerifyCrypto.cpp.
typedef CFTypeRef(* SecTransformExecuteFunc) (SecTransformRef transform, CFErrorRef *error) |
Definition at line 23 of file MacVerifyCrypto.cpp.
typedef CFTypeRef SecTransformRef |
Definition at line 16 of file MacVerifyCrypto.cpp.
typedef Boolean(* SecTransformSetAttributeFunc) (SecTransformRef transform, CFStringRef key, CFTypeRef value, CFErrorRef *error) |
Definition at line 30 of file MacVerifyCrypto.cpp.
typedef SecTransformRef(* SecVerifyTransformCreateFunc) (SecKeyRef key, CFDataRef signature, CFErrorRef *error) |
Definition at line 26 of file MacVerifyCrypto.cpp.
void CryptoMac_FreePublicKey | ( | CryptoX_PublicKey * | aPublicKey | ) |
Definition at line 404 of file MacVerifyCrypto.cpp.
References OnLionOrLater(), and sCspHandle.
void CryptoMac_FreeSignatureHandle | ( | CryptoX_SignatureHandle * | aInputData | ) |
Definition at line 384 of file MacVerifyCrypto.cpp.
References Data, NULL, and OnLionOrLater().
CryptoX_Result CryptoMac_InitCryptoProvider | ( | ) |
Definition at line 126 of file MacVerifyCrypto.cpp.
References CryptoX_Error, CryptoX_Success, OnLionOrLater(), SecTransformCreateReadTransformWithReadStreamPtr, SecTransformExecutePtr, SecTransformSetAttributePtr, and SecVerifyTransformCreatePtr.
CryptoX_Result CryptoMac_LoadPublicKey | ( | const unsigned char * | aCertData, |
unsigned int | aDataSize, | ||
CryptoX_PublicKey * | aPublicKey | ||
) |
Definition at line 210 of file MacVerifyCrypto.cpp.
References CryptoX_Error, CryptoX_Success, cssmMemFuncs, NULL, OnLionOrLater(), sCspHandle, sCssmInitialized, sCssmVersion, and sMozCssmGuid.
CryptoX_Result CryptoMac_VerifyBegin | ( | CryptoX_SignatureHandle * | aInputData | ) |
Definition at line 159 of file MacVerifyCrypto.cpp.
References CryptoX_Error, CryptoX_Success, and OnLionOrLater().
CryptoX_Result CryptoMac_VerifySignature | ( | CryptoX_SignatureHandle * | aInputData, |
CryptoX_PublicKey * | aPublicKey, | ||
const unsigned char * | aSignature, | ||
unsigned int | aSignatureLen | ||
) |
Definition at line 288 of file MacVerifyCrypto.cpp.
References CryptoX_Error, CryptoX_Result, CryptoX_Success, Data, kSecTransformInputAttributeName, NULL, OnLionOrLater(), result, sCspHandle, SecTransformExecutePtr, SecTransformSetAttributePtr, and SecVerifyTransformCreatePtr.
CryptoX_Result CryptoMac_VerifyUpdate | ( | CryptoX_SignatureHandle * | aInputData, |
void * | aBuf, | ||
unsigned int | aLen | ||
) |
Definition at line 187 of file MacVerifyCrypto.cpp.
References aBuf, CryptoX_Error, CryptoX_Success, Data, and OnLionOrLater().
void * cssmCalloc | ( | uint32 | aNum, |
CSSM_SIZE | aSize, | ||
void * | aAllocRef | ||
) |
Definition at line 112 of file MacVerifyCrypto.cpp.
void cssmFree | ( | void * | aPtr, |
void * | aAllocRef | ||
) |
Definition at line 101 of file MacVerifyCrypto.cpp.
void * cssmMalloc | ( | CSSM_SIZE | aSize, |
void * | aAllocRef | ||
) |
Definition at line 96 of file MacVerifyCrypto.cpp.
void * cssmRealloc | ( | void * | aPtr, |
CSSM_SIZE | aSize, | ||
void * | aAllocRef | ||
) |
Definition at line 107 of file MacVerifyCrypto.cpp.
|
static |
Definition at line 41 of file MacVerifyCrypto.cpp.
References count, MAC_OS_X_VERSION_10_7_HEX, NULL, sOnLionOrLater, and stream.
Referenced by CryptoMac_FreePublicKey(), CryptoMac_FreeSignatureHandle(), CryptoMac_InitCryptoProvider(), CryptoMac_LoadPublicKey(), CryptoMac_VerifyBegin(), CryptoMac_VerifySignature(), and CryptoMac_VerifyUpdate().
|
static |
Definition at line 117 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_LoadPublicKey().
const CFStringRef kSecTransformInputAttributeName = CFSTR("INPUT") |
Definition at line 15 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_VerifySignature().
|
static |
Definition at line 94 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_FreePublicKey(), CryptoMac_LoadPublicKey(), and CryptoMac_VerifySignature().
|
static |
Definition at line 89 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_LoadPublicKey().
|
static |
Definition at line 90 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_LoadPublicKey().
SecTransformCreateReadTransformWithReadStreamFunc SecTransformCreateReadTransformWithReadStreamPtr = NULL |
Definition at line 22 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_InitCryptoProvider().
SecTransformExecuteFunc SecTransformExecutePtr = NULL |
Definition at line 25 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_InitCryptoProvider(), and CryptoMac_VerifySignature().
SecTransformSetAttributeFunc SecTransformSetAttributePtr = NULL |
Definition at line 34 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_InitCryptoProvider(), and CryptoMac_VerifySignature().
SecVerifyTransformCreateFunc SecVerifyTransformCreatePtr = NULL |
Definition at line 29 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_InitCryptoProvider(), and CryptoMac_VerifySignature().
|
static |
Definition at line 91 of file MacVerifyCrypto.cpp.
Referenced by CryptoMac_LoadPublicKey().
|
static |
Definition at line 39 of file MacVerifyCrypto.cpp.
Referenced by OnLionOrLater().