PrivatePKIFCMSUtils.h

Go to the documentation of this file.
00001 
00010 #ifndef __PRIVATEPKIFCMSUTILS_H__
00011 #define __PRIVATEPKIFCMSUTILS_H__
00012 
00013 #include "PKIFdll.h"
00014 #include "CryptographicMessageSyntax2004.h"
00015 
00016 FD_SMART_PTR(CPKIFOID);
00017 FD_SMART_PTR(CPKIFSignerInfo);
00018 FD_LIST_PTR(CPKIFAttribute);
00019 FD_SMART_PTR(CPKIFName);
00020 FD_SMART_PTR(CPKIFSubjectKeyIdentifier);
00021 FD_SMART_PTR(IPKIFCryptoKeyIDOperations);
00022 FD_SMART_PTR(CPKIFCredential);
00023 FD_SMART_PTR(CPKIFKeyMaterial);
00024 FD_SMART_PTR(IPKIFCryptoKeyAgree);
00025 FD_SMART_PTR(IPKIFCryptoRawOperations);
00026 FD_SMART_PTR(CPKIFKEKRecipInfoDetails);
00027 
00028 // forward class defs
00029 struct HashInfo;
00030 class IPKIFCryptoMisc;
00031 class CPKIFAlgorithm;
00032 
00033 FD_MC_PTR();
00034 
00035 //*****************************************************************************
00036 //  non-exported non-member utilities implemented elsewhere
00037 //*****************************************************************************
00038 void GetSignerInfo(CACCMSSignerInfo* tmpSignerInfo, CPKIFSignerInfoPtr& siPos, 
00039                    unsigned char* hashResult, int nHashResult, IPKIFMediatorPtr m, CPKIFOIDPtr& eContentType, PKIFCRYPTO::HASH_ALG hashAlg, bool useSKIDIfPresent = true);
00040 HashInfo* ComputeSignedAttrHash(CACCMSSignerInfo* si, IPKIFCryptoMisc* cMisc);
00041 bool CompareHashes(HashInfo* hi2, CACCMSSignerInfo* si);
00042 void SetupAttributesInObjectiveStructure(CPKIFAttributeList& attrs, DList& objAttrs);
00043 void AddSignedAttributes(unsigned char* hashResult, int nHashResult, CPKIFOIDPtr& eContentType, CPKIFAttributeList& sas);
00044 void EncodeDSASignature(unsigned char* sig, int nSigLen, unsigned char** sigData, int* numocts);
00045 
00046 bool RIDMatch(CACCMSRecipientIdentifier* rid, CPKIFNamePtr& issuer, const char* serial, CPKIFSubjectKeyIdentifierPtr& skid);
00047 CPKIFKeyMaterialPtr GetSymmetricKey(CPKIFCredentialPtr& cred, IPKIFCryptoKeyIDOperations* cKeyID, CACCMSRecipientInfos* ris, IPKIFCryptoKeyAgree* ka = NULL, IPKIFCryptoRawOperations* cRaw = NULL, CACCMSOriginatorInfo* oi = NULL);
00048 CPKIFKeyMaterialPtr GetSymmetricKey(const CPKIFKEKRecipInfoDetailsPtr& kek, IPKIFCryptoRawOperations* cKeyID, CACCMSRecipientInfos* ris);
00049 CPKIFCredentialPtr AutoDiscoverDecryptionKey(IPKIFCryptoKeyIDOperations* cKeyID, CACCMSRecipientInfos* ris);
00050 void EncodeIVAsOctetString(unsigned char* iv, int ivLen, unsigned char** encodedIV, int* encodedIVLen);
00051 
00052 void PopulateKARIDFromKeyMaterial(CACCMSKeyAgreeRecipientIdentifier* rid, CPKIFKeyMaterialPtr& km);
00053 
00054 //non-exported global function declarations (implemented in CACCMSUtils.cpp)
00055 CPKIFAlgorithm * GetCACHashAlg(CACX509V3AlgorithmIdentifier* alg);
00056 CPKIFAlgorithm * GetCACSymAlg(CACX509V3AlgorithmIdentifier* alg);
00057 
00058 #endif

Generated on Mon Nov 15 11:15:55 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6