22 #ifndef __ASN1CERT_HEADER__ 23 #define __ASN1CERT_HEADER__ 63 const AsymmetricKey *pCertKey,
65 const AsymmetricKey *pSignKey,
66 const ASN1_ITEM *pIssuerInfo,
68 const ubyte* serialNumber,
69 ubyte4 serialNumberLen,
72 RNGFun rngFun,
void* rngFunArg,
73 ubyte **ppRetCertificate,
74 ubyte4 *pRetCertLength);
109 ubyte **ppRetCertificate,
110 ubyte4 *pRetCertLength);
144 const AsymmetricKey *pSignKey,
145 const ASN1_ITEM *pIssuerInfo,
146 CStream cs, ubyte signAlgo,
148 RNGFun rngFun,
void* rngFunArg,
149 ubyte **ppRetCertificate,
150 ubyte4 *pRetCertLength);
190 MOC_EXTERN MSTATUS
ASN1CERT_storePublicKeyInfo(MOC_ASYM(hwAccelDescr hwAccelCtx)
const AsymmetricKey* pPublicKey, DER_ITEMPTR pCertificate);
216 MOC_EXTERN MSTATUS
ASN1CERT_Sign(MOC_ASYM(hwAccelDescr hwAccelCtx)
217 DER_ITEMPTR pSignedHead,
const AsymmetricKey* pSignKey, ubyte signAlgo,
218 RNGFun rngFun,
void* rngFunArg, ubyte **ppRetDEREncoding, ubyte4 *pRetDEREncodingLen);
239 DER_ITEMPTR *ppExtsItem);
241 #if (defined(__ENABLE_MOCANA_ECC__)) 259 MOC_EXTERN MSTATUS ASN1CERT_storeECCPublicKeyInfo( MOC_ECC(hwAccelDescr hwAccelCtx)
const ECCKey *pECCKey, DER_ITEMPTR pCertificate);
MOC_EXTERN MSTATUS ASN1CERT_Sign(MOC_ASYM(hwAccelDescr hwAccelCtx) DER_ITEMPTR pSignedHead, const AsymmetricKey *pSignKey, ubyte signAlgo, RNGFun rngFun, void *rngFunArg, ubyte **ppRetDEREncoding, ubyte4 *pRetDEREncodingLen)
Signs a certificate with a given asymmetric key.
MOC_EXTERN MSTATUS ASN1CERT_generateSelfSignedCertificate(MOC_ASYM(hwAccelDescr hwAccelCtx) AsymmetricKey *pCertKey, const certDistinguishedName *pSubjectInfo, ubyte signAlgo, const certExtensions *pExtensions, RNGFun rngFun, void *rngFunArg, ubyte **ppRetCertificate, ubyte4 *pRetCertLength)
Generate a self-signed certificate with the given key, name, and extensions.
MOC_EXTERN MSTATUS ASN1CERT_StoreDistinguishedName(DER_ITEMPTR pRoot, const certDistinguishedName *pCertInfo)
Writes the distinguished name components to a certificate in the process of being generated...
MOC_EXTERN MSTATUS ASN1CERT_generateCertificateEx(MOC_ASYM(hwAccelDescr hwAccelCtx) const AsymmetricKey *pCertKey, const certDistinguishedName *pSubjectInfo, const AsymmetricKey *pSignKey, const ASN1_ITEM *pIssuerInfo, CStream cs, const ubyte *serialNumber, ubyte4 serialNumberLen, ubyte signAlgo, const certExtensions *pExtensions, RNGFun rngFun, void *rngFunArg, ubyte **ppRetCertificate, ubyte4 *pRetCertLength)
Generate a certificate with the given input key, signing key, name, issuer, and extensions.
Distinguished name data (names and start/end dates) to support certificate generation.
Definition: ca_mgmt.h:424
Container for a certificate's version 3 extensions.
Definition: ca_mgmt.h:560
MOC_EXTERN MSTATUS ASN1CERT_storePublicKeyInfo(MOC_ASYM(hwAccelDescr hwAccelCtx) const AsymmetricKey *pPublicKey, DER_ITEMPTR pCertificate)
Writes the public key information to a certificate in the process of being generated.
MOC_EXTERN MSTATUS ASN1CERT_generateCertificate(MOC_ASYM(hwAccelDescr hwAccelCtx) AsymmetricKey *pCertKey, const certDistinguishedName *pSubjectInfo, const AsymmetricKey *pSignKey, const ASN1_ITEM *pIssuerInfo, CStream cs, ubyte signAlgo, const certExtensions *pExtensions, RNGFun rngFun, void *rngFunArg, ubyte **ppRetCertificate, ubyte4 *pRetCertLength)
Generate a certificate with the given input key, signing key, name, issuer, and extensions.
MOC_EXTERN MSTATUS ASN1CERT_AddExtensions(DER_ITEMPTR pExtensionTag, const certExtensions *pExtensions, DER_ITEMPTR *ppExtsItem)
Writes the extensions to a certificate in the process of being generated.