S2OPC OPCUA Toolkit
|
Defines the PKI interface functions used internally. More...
#include "sopc_pki_decl.h"
Go to the source code of this file.
Functions | |
SOPC_ReturnStatus | SOPC_PKIProviderInternal_ValidateProfileAndCertificate (SOPC_PKIProvider *pPKI, const SOPC_CertificateList *pToValidate, const SOPC_PKI_Profile *pProfile, uint32_t *error) |
Validation function for a certificate with the PKI chain. | |
SOPC_ReturnStatus | SOPC_PKIProviderInternal_SplitRootFromCertList (SOPC_CertificateList **ppCerts, SOPC_CertificateList **ppRootCa) |
Delete the roots CAs of the list ppCerts . Create a new list ppRootCa with all roots CA from ppCerts . If there is no root CA, the content of ppRootCa is set to NULL. If ppCerts becomes empty, its content is set to NULL. | |
void | SOPC_PKIProviderInternal_GetListStats (SOPC_CertificateList *pCert, uint32_t *caCount, uint32_t *listLength, uint32_t *rootCount) |
Get some statistics about the pCert . | |
Defines the PKI interface functions used internally.
SOPC_ReturnStatus SOPC_PKIProviderInternal_ValidateProfileAndCertificate | ( | SOPC_PKIProvider * | pPKI, |
const SOPC_CertificateList * | pToValidate, | ||
const SOPC_PKI_Profile * | pProfile, | ||
uint32_t * | error ) |
Validation function for a certificate with the PKI chain.
It implements the validation with the certificate chain of the PKI.
pPKI | A valid pointer to the PKIProvider. | |
pToValidate | A valid pointer to the Certificate to validate. | |
pProfile | A valid pointer to the PKI profile. | |
[out] | error | Pointer to store the OpcUa error code when certificate validation failed. |
pProfile
is not applied to the certificate. The user leaf properties should be checked separately with SOPC_PKIProvider_CheckLeafCertificate .SOPC_ReturnStatus SOPC_PKIProviderInternal_SplitRootFromCertList | ( | SOPC_CertificateList ** | ppCerts, |
SOPC_CertificateList ** | ppRootCa ) |
Delete the roots CAs of the list ppCerts
. Create a new list ppRootCa
with all roots CA from ppCerts
. If there is no root CA, the content of ppRootCa
is set to NULL. If ppCerts
becomes empty, its content is set to NULL.
ppCerts | A valid pointer to the certificate list to delete the roots CA of. |
ppRootCa | A valid pointer to the new certificate list with the roots CA from ppCerts . |
void SOPC_PKIProviderInternal_GetListStats | ( | SOPC_CertificateList * | pCert, |
uint32_t * | caCount, | ||
uint32_t * | listLength, | ||
uint32_t * | rootCount ) |
Get some statistics about the pCert
.
pCert | A valid pointer to the certificate list. | |
[out] | caCount | A valid pointer to store the number of certificate authorities. |
[out] | listLength | A valid pointer to store the length of the certificate list. |
[out] | rootCount | A valid pointer to store the number of root CA (self-signed certificate authority). |