
Functions | |
| WOLFSSL_API WOLFSSL_CERT_MANAGER * | wolfSSL_CertManagerNew_ex (void *heap) |
| Allocates and initializes a new Certificate Manager context. This context may be used independent of SSL needs. It may be used to load certificates, verify certificates, and check the revocation status. More... | |
| WOLFSSL_API WOLFSSL_CERT_MANAGER * | wolfSSL_CertManagerNew (void) |
| Allocates and initializes a new Certificate Manager context. This context may be used independent of SSL needs. It may be used to load certificates, verify certificates, and check the revocation status. More... | |
| WOLFSSL_API void | wolfSSL_CertManagerFree (WOLFSSL_CERT_MANAGER *) |
| Frees all resources associated with the Certificate Manager context. Call this when you no longer need to use the Certificate Manager. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerLoadCA (WOLFSSL_CERT_MANAGER *, const char *f, const char *d) |
| Specifies the locations for CA certificate loading into the manager context. The PEM certificate CAfile may contain several trusted CA certificates. If CApath is not NULL it specifies a directory containing CA certificates in PEM format. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerLoadCABuffer (WOLFSSL_CERT_MANAGER *, const unsigned char *in, long sz, int format) |
| Loads the CA Buffer by calling wolfSSL_CTX_load_verify_buffer and returning that result using a temporary cm so as not to lose the information in the cm passed into the function. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerUnloadCAs (WOLFSSL_CERT_MANAGER *cm) |
| This function unloads the CA signer list. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerUnload_trust_peers (WOLFSSL_CERT_MANAGER *cm) |
| The function will free the Trusted Peer linked list and unlocks the trusted peer list. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerVerify (WOLFSSL_CERT_MANAGER *, const char *f, int format) |
| Specifies the certificate to verify with the Certificate Manager context. The format can be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerVerifyBuffer (WOLFSSL_CERT_MANAGER *cm, const unsigned char *buff, long sz, int format) |
| Specifies the certificate buffer to verify with the Certificate Manager context. The format can be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1. More... | |
| WOLFSSL_API void | wolfSSL_CertManagerSetVerify (WOLFSSL_CERT_MANAGER *cm, VerifyCallback vc) |
| The function sets the verifyCallback function in the Certificate Manager. If present, it will be called for each cert loaded. If there is a verification error, the verify callback can be used to over-ride the error. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerEnableCRL (WOLFSSL_CERT_MANAGER *, int options) |
| Turns on Certificate Revocation List checking when verifying certificates with the Certificate Manager. By default, CRL checking is off. options include WOLFSSL_CRL_CHECKALL which performs CRL checking on each certificate in the chain versus the Leaf certificate only which is the default. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerDisableCRL (WOLFSSL_CERT_MANAGER *) |
| Turns off Certificate Revocation List checking when verifying certificates with the Certificate Manager. By default, CRL checking is off. You can use this function to temporarily or permanently disable CRL checking with this Certificate Manager context that previously had CRL checking enabled. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerLoadCRL (WOLFSSL_CERT_MANAGER *, const char *, int, int) |
| Error checks and passes through to LoadCRL() in order to load the cert into the CRL for revocation checking. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerLoadCRLBuffer (WOLFSSL_CERT_MANAGER *, const unsigned char *, long sz, int) |
| The function loads the CRL file by calling BufferLoadCRL. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerSetCRL_Cb (WOLFSSL_CERT_MANAGER *, CbMissingCRL) |
| This function sets the CRL Certificate Manager callback. If HAVE_CRL is defined and a matching CRL record is not found then the cbMissingCRL is called (set via wolfSSL_CertManagerSetCRL_Cb). This allows you to externally retrieve the CRL and load it. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerCheckOCSP (WOLFSSL_CERT_MANAGER *, unsigned char *, int sz) |
| The function enables the WOLFSSL_CERT_MANAGER’s member, ocspEnabled to signify that the OCSP check option is enabled. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerEnableOCSP (WOLFSSL_CERT_MANAGER *, int options) |
| Turns on OCSP if it’s turned off and if compiled with the set option available. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerDisableOCSP (WOLFSSL_CERT_MANAGER *) |
| Disables OCSP certificate revocation. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerSetOCSPOverrideURL (WOLFSSL_CERT_MANAGER *, const char *) |
| The function copies the url to the ocspOverrideURL member of the WOLFSSL_CERT_MANAGER structure. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerSetOCSP_Cb (WOLFSSL_CERT_MANAGER *, CbOCSPIO, CbOCSPRespFree, void *) |
| The function sets the OCSP callback in the WOLFSSL_CERT_MANAGER. More... | |
| WOLFSSL_API int | wolfSSL_CertManagerEnableOCSPStapling (WOLFSSL_CERT_MANAGER *cm) |
| This function turns on OCSP stapling if it is not turned on as well as set the options. More... | |
| WOLFSSL_API int wolfSSL_CertManagerCheckOCSP | ( | WOLFSSL_CERT_MANAGER * | , |
| unsigned char * | , | ||
| int | sz | ||
| ) |
The function enables the WOLFSSL_CERT_MANAGER’s member, ocspEnabled to signify that the OCSP check option is enabled.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| der | a byte pointer to the certificate. |
| sz | an int type representing the size of the DER cert. |
Example
| WOLFSSL_API int wolfSSL_CertManagerDisableCRL | ( | WOLFSSL_CERT_MANAGER * | ) |
Turns off Certificate Revocation List checking when verifying certificates with the Certificate Manager. By default, CRL checking is off. You can use this function to temporarily or permanently disable CRL checking with this Certificate Manager context that previously had CRL checking enabled.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
Example
| WOLFSSL_API int wolfSSL_CertManagerDisableOCSP | ( | WOLFSSL_CERT_MANAGER * | ) |
Disables OCSP certificate revocation.
| ssl | - a pointer to a WOLFSSL structure, created using wolfSSL_new(). |
Example
| WOLFSSL_API int wolfSSL_CertManagerEnableCRL | ( | WOLFSSL_CERT_MANAGER * | , |
| int | options | ||
| ) |
Turns on Certificate Revocation List checking when verifying certificates with the Certificate Manager. By default, CRL checking is off. options include WOLFSSL_CRL_CHECKALL which performs CRL checking on each certificate in the chain versus the Leaf certificate only which is the default.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| options | options to use when enabling the Certification Manager, cm. |
Example
| WOLFSSL_API int wolfSSL_CertManagerEnableOCSP | ( | WOLFSSL_CERT_MANAGER * | , |
| int | options | ||
| ) |
Turns on OCSP if it’s turned off and if compiled with the set option available.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| options | used to set values in WOLFSSL_CERT_MANAGER struct. |
Example
| WOLFSSL_API int wolfSSL_CertManagerEnableOCSPStapling | ( | WOLFSSL_CERT_MANAGER * | cm | ) |
This function turns on OCSP stapling if it is not turned on as well as set the options.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, a member of the WOLFSSL_CTX structure. |
Example
| WOLFSSL_API void wolfSSL_CertManagerFree | ( | WOLFSSL_CERT_MANAGER * | ) |
Frees all resources associated with the Certificate Manager context. Call this when you no longer need to use the Certificate Manager.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
Example
| WOLFSSL_API int wolfSSL_CertManagerLoadCA | ( | WOLFSSL_CERT_MANAGER * | , |
| const char * | f, | ||
| const char * | d | ||
| ) |
Specifies the locations for CA certificate loading into the manager context. The PEM certificate CAfile may contain several trusted CA certificates. If CApath is not NULL it specifies a directory containing CA certificates in PEM format.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| file | pointer to the name of the file containing CA certificates to load. |
| path | pointer to the name of a directory path containing CA c ertificates to load. The NULL pointer may be used if no certificate directory is desired. |
Example
| WOLFSSL_API int wolfSSL_CertManagerLoadCABuffer | ( | WOLFSSL_CERT_MANAGER * | , |
| const unsigned char * | in, | ||
| long | sz, | ||
| int | format | ||
| ) |
Loads the CA Buffer by calling wolfSSL_CTX_load_verify_buffer and returning that result using a temporary cm so as not to lose the information in the cm passed into the function.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| in | buffer for cert information. |
| sz | length of the buffer. |
| format | certificate format, either PEM or DER. |
Example
| WOLFSSL_API int wolfSSL_CertManagerLoadCRL | ( | WOLFSSL_CERT_MANAGER * | , |
| const char * | , | ||
| int | , | ||
| int | |||
| ) |
Error checks and passes through to LoadCRL() in order to load the cert into the CRL for revocation checking.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| path | a constant char pointer holding the CRL path. |
| type | type of certificate to be loaded. |
| monitor | requests monitoring in LoadCRL(). |
Example
| WOLFSSL_API int wolfSSL_CertManagerLoadCRLBuffer | ( | WOLFSSL_CERT_MANAGER * | , |
| const unsigned char * | , | ||
| long | sz, | ||
| int | |||
| ) |
The function loads the CRL file by calling BufferLoadCRL.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure. |
| buff | a constant byte type and is the buffer. |
| sz | a long int representing the size of the buffer. |
| type | a long integer that holds the certificate type. |
Example
| WOLFSSL_API WOLFSSL_CERT_MANAGER* wolfSSL_CertManagerNew | ( | void | ) |
Allocates and initializes a new Certificate Manager context. This context may be used independent of SSL needs. It may be used to load certificates, verify certificates, and check the revocation status.
| none | No parameters. |
Example
| WOLFSSL_API WOLFSSL_CERT_MANAGER* wolfSSL_CertManagerNew_ex | ( | void * | heap | ) |
Allocates and initializes a new Certificate Manager context. This context may be used independent of SSL needs. It may be used to load certificates, verify certificates, and check the revocation status.
| none | No parameters. |
| WOLFSSL_API int wolfSSL_CertManagerSetCRL_Cb | ( | WOLFSSL_CERT_MANAGER * | , |
| CbMissingCRL | |||
| ) |
This function sets the CRL Certificate Manager callback. If HAVE_CRL is defined and a matching CRL record is not found then the cbMissingCRL is called (set via wolfSSL_CertManagerSetCRL_Cb). This allows you to externally retrieve the CRL and load it.
| cm | the WOLFSSL_CERT_MANAGER structure holding the information for the certificate. |
| cb | a function pointer to (*CbMissingCRL) that is set to the cbMissingCRL member of the WOLFSSL_CERT_MANAGER. |
Example
| WOLFSSL_API int wolfSSL_CertManagerSetOCSP_Cb | ( | WOLFSSL_CERT_MANAGER * | , |
| CbOCSPIO | , | ||
| CbOCSPRespFree | , | ||
| void * | |||
| ) |
The function sets the OCSP callback in the WOLFSSL_CERT_MANAGER.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure. |
| ioCb | a function pointer of type CbOCSPIO. |
| respFreeCb | - a function pointer of type CbOCSPRespFree. |
| ioCbCtx | - a void pointer variable to the I/O callback user registered context. |
Example
| WOLFSSL_API int wolfSSL_CertManagerSetOCSPOverrideURL | ( | WOLFSSL_CERT_MANAGER * | , |
| const char * | |||
| ) |
The function copies the url to the ocspOverrideURL member of the WOLFSSL_CERT_MANAGER structure.
| ssl | a pointer to a WOLFSSL structure, created using wolfSSL_new(). |
Example
| WOLFSSL_API void wolfSSL_CertManagerSetVerify | ( | WOLFSSL_CERT_MANAGER * | cm, |
| VerifyCallback | vc | ||
| ) |
The function sets the verifyCallback function in the Certificate Manager. If present, it will be called for each cert loaded. If there is a verification error, the verify callback can be used to over-ride the error.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| vc | a VerifyCallback function pointer to the callback routine |
Example
| WOLFSSL_API int wolfSSL_CertManagerUnload_trust_peers | ( | WOLFSSL_CERT_MANAGER * | cm | ) |
The function will free the Trusted Peer linked list and unlocks the trusted peer list.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
Example
| WOLFSSL_API int wolfSSL_CertManagerUnloadCAs | ( | WOLFSSL_CERT_MANAGER * | cm | ) |
This function unloads the CA signer list.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
Example
| WOLFSSL_API int wolfSSL_CertManagerVerify | ( | WOLFSSL_CERT_MANAGER * | , |
| const char * | f, | ||
| int | format | ||
| ) |
Specifies the certificate to verify with the Certificate Manager context. The format can be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| fname | pointer to the name of the file containing the certificates to verify. |
| format | format of the certificate to verify - either SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM. |
Example
| WOLFSSL_API int wolfSSL_CertManagerVerifyBuffer | ( | WOLFSSL_CERT_MANAGER * | cm, |
| const unsigned char * | buff, | ||
| long | sz, | ||
| int | format | ||
| ) |
Specifies the certificate buffer to verify with the Certificate Manager context. The format can be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1.
| cm | a pointer to a WOLFSSL_CERT_MANAGER structure, created using wolfSSL_CertManagerNew(). |
| buff | buffer containing the certificates to verify. |
| sz | size of the buffer, buf. |
| format | format of the certificate to verify, located in buf - either SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM. |
Example