17 #ifndef __CERT_CHAIN_HEADER__ 18 #define __CERT_CHAIN_HEADER__ 25 typedef struct certChain* certChainPtr;
59 const struct TimeDate *
td;
93 CERTCHAIN_getCertificateExtensions(certChainPtr pCertChain,
99 CERTCHAIN_getCertificateExtensionsCertStatus(certChainPtr pCertChain,
102 ubyte4 *pOcspExtLen);
122 certChainPtr* ppNewCertChain,
123 const ubyte* pSSLCertificateMsg,
124 ubyte4 sslCertificateMsgLen);
126 MOC_EXTERN MSTATUS CERTCHAIN_createFromSSLRecordEx(MOC_ASYM(hwAccelDescr hwAccelCtx)
127 certChainPtr* ppNewCertChain,
128 const ubyte* pSSLCertificateMsg,
129 ubyte4 sslCertificateMsgLen,
130 ubyte sslMinorVersion);
132 #ifdef __ENABLE_MOCANA_CV_CERT__ 152 certChainPtr* ppNewCertChain,
153 const ubyte* pSSLCertificateMsg,
154 ubyte4 sslCertificateMsgLen,
155 ubyte sslMinorVersion,
156 byteBoolean *pIsCvc);
159 #if (defined(__ENABLE_MOCANA_SSH_CLIENT__) || defined(__ENABLE_MOCANA_SSH_SERVER__)) 161 typedef MSTATUS (*funcPtrWalkStr)(
const ubyte *, ubyte4, ubyte4 *);
183 certChainPtr* ppNewCertChain,
184 const ubyte* pSSHCertChainBuf,
185 ubyte4 sshCertChainBufLen,
187 funcPtrWalkStr walkStrFunc);
190 #ifndef __DISABLE_MOCANA_CERT_CHAIN_SSH_DEP__ 210 certChainPtr* ppNewCertChain,
211 const ubyte* pSSHCertChainBuf,
212 ubyte4 sshCertChainBufLen,
235 certChainPtr* ppNewCertChain,
239 #ifdef __ENABLE_MOCANA_CV_CERT__ 257 certChainPtr* ppNewCertChain,
296 const ubyte** certDerData,
297 ubyte4* certDerDataLen);
314 certChainPtr pCertChain,
316 struct AsymmetricKey* pubKey);
318 #ifdef __ENABLE_MOCANA_CERTIFICATE_SEARCH_SUPPORT__ 353 intBoolean* complete);
355 #if !defined(__DISABLE_MOCANA_CERTIFICATE_PARSING__) 379 certChainPtr pCertChain,
382 #ifdef __ENABLE_MOCANA_CV_CERT__ 406 certChainPtr pCertChain,
438 certChainPtr *ppRetChain);
ubyte4 anchorCertLen
Found anchor length in certstore if any.
Definition: cert_chain.h:53
MOC_EXTERN MSTATUS CERTCHAIN_delete(certChainPtr *ppCertChain)
Deletes a certificate chain and alll memory allocated within it.
MOC_EXTERN MSTATUS CERTCHAIN_validateAll(MOC_ASYM(hwAccelDescr hwAccelCtx) ubyte *pCertArr, sbyte4 certArrLen, ValidationConfig *pConfig, certChainPtr *ppRetChain)
Validates an array of certificates with respect to a validation configuration.
MOC_EXTERN MSTATUS CERTCHAIN_getCertificate(certChainPtr pCertChain, ubyte4 indexInChain, const ubyte **certDerData, ubyte4 *certDerDataLen)
Gets a certificate from a chain.
ubyte2 keyUsage
Bits (0-8) that must be set if KeyUsage is present.
Definition: cert_chain.h:71
MOC_EXTERN MSTATUS CERTCHAIN_createFromSSLRecord(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr *ppNewCertChain, const ubyte *pSSLCertificateMsg, ubyte4 sslCertificateMsgLen)
Build a certificate chain from an SSL Certificate message.
const struct TimeDate * td
Time to use for validation.
Definition: cert_chain.h:59
MOC_EXTERN MSTATUS CERTCHAIN_getKey(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr pCertChain, ubyte4 indexInChain, struct AsymmetricKey *pubKey)
Gets the public key of a certificate from a chain.
const ubyte * anchorCert
Found anchor in cert store if any.
Definition: cert_chain.h:47
struct certStore * pCertStore
Cert store to use for trust points.
Definition: cert_chain.h:41
MOC_EXTERN MSTATUS CERTCHAIN_createFromSSH(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr *ppNewCertChain, const ubyte *pSSHCertChainBuf, ubyte4 sshCertChainBufLen, ubyte4 *pBufIndex)
Build a certificate chain from an SSH Certificate chain buffer.
Certificate context (information required to manage a DER-encoded X.509 certificate).
Definition: ca_mgmt.h:181
MOC_EXTERN MSTATUS CERTCHAIN_CVC_validate(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr pCertChain, ValidationConfig *validationConfig)
Validates a CV certificate chain with respect to a validation configuration.
const ubyte ** extendedKeyUsage
NULL terminated array of OIDs that must be present in the certificate extended key usage if present...
Definition: cert_chain.h:79
MOC_EXTERN MSTATUS CERTCHAIN_getRSASigAlgo(certChainPtr pCertChain, ubyte4 indexInChain, ubyte *sigAlgo)
Gets the RSA hash algorithm in a certificate from a chain.
MOC_EXTERN MSTATUS CERTCHAIN_createFromSSHEx(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr *ppNewCertChain, const ubyte *pSSHCertChainBuf, ubyte4 sshCertChainBufLen, ubyte4 *pBufIndex, funcPtrWalkStr walkStrFunc)
Build a certificate chain from an SSH Certificate chain buffer.
MOC_EXTERN MSTATUS CERTCHAIN_numberOfCertificates(certChainPtr pCertChain, ubyte4 *numCerts)
Gets the number of certificates in a chain.
MOC_EXTERN MSTATUS CERTCHAIN_isComplete(certChainPtr pCertChain, intBoolean *complete)
Checks whether the last certificate in the chain is a self-signed certificate.
const sbyte * commonName
Common name.
Definition: cert_chain.h:65
MOC_EXTERN MSTATUS CERTCHAIN_createFromIKE(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr *ppNewCertChain, struct certDescriptor certiDesc[], ubyte4 numCertDesc)
Build a certificate chain from a certificate descriptor.
MOC_EXTERN MSTATUS CERTCHAIN_CVC_createFromSSLRecordEx(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr *ppNewCertChain, const ubyte *pSSLCertificateMsg, ubyte4 sslCertificateMsgLen, ubyte sslMinorVersion, byteBoolean *pIsCvc)
Build a certificate chain from an SSL Certificate message.
MOC_EXTERN MSTATUS CERTCHAIN_createFromCVC(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr *ppNewCertChain, struct certDescriptor certiDesc[], ubyte4 numCertDesc)
Build a certificate chain from a certificate descriptor containing CV certs.
MOC_EXTERN MSTATUS CERTCHAIN_validate(MOC_ASYM(hwAccelDescr hwAccelCtx) certChainPtr pCertChain, ValidationConfig *validationConfig)
Validates a certificate chain with respect to a validation configuration.
Validation configuration structure.
Definition: cert_chain.h:35