33#ifndef SOPC_PKI_STACK_H_
34#define SOPC_PKI_STACK_H_
427 const char* securityPolicyUri,
432 const bool bIncludeExistingList);
450 const char* pThumbprint,
451 const bool bIsTrusted,
486 uintptr_t updateParam);
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
SOPC_PKI_Type
Type of PKI.
Definition sopc_pki_decl.h:129
void SOPC_PKIProviderUpdateCb(uintptr_t updateParam)
Type of the callback triggered on PKI certificates update.
Definition sopc_pki_decl.h:140
SOPC_ReturnStatus SOPC_PKIProvider_WriteOrAppendToList(SOPC_PKIProvider *pPKI, SOPC_CertificateList **ppTrustedCerts, SOPC_CRLList **ppTrustedCrl, SOPC_CertificateList **ppIssuerCerts, SOPC_CRLList **ppIssuerCrl)
Extracts certificates from the PKI object.
SOPC_ReturnStatus SOPC_PKIProvider_CopyRejectedList(SOPC_PKIProvider *pPKI, SOPC_CertificateList **ppCert)
Copy the list of certificate that have been rejected.
SOPC_ReturnStatus SOPC_PKIProvider_WriteRejectedCertToStore(SOPC_PKIProvider *pPKI)
Write the rejected certificates files in the rejected folder of the PKI storage. The format of the wr...
SOPC_ReturnStatus SOPC_PKIProvider_ValidateCertificate(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_PKIProvider_UpdateFromList(SOPC_PKIProvider *pPKI, const char *securityPolicyUri, SOPC_CertificateList *pTrustedCerts, SOPC_CRLList *pTrustedCrl, SOPC_CertificateList *pIssuerCerts, SOPC_CRLList *pIssuerCrl, const bool bIncludeExistingList)
Update the PKI with new lists of certificates and CRL.
SOPC_ReturnStatus SOPC_PKIProvider_ProfileSetURI(SOPC_PKI_Profile *pProfile, const char *applicationUri)
Set the application URI to the PKI profile.
SOPC_ReturnStatus SOPC_PKIProvider_LeafProfileSetUsageFromType(SOPC_PKI_LeafProfile *pProfile, SOPC_PKI_Type PKIType)
Set the keyUsage and extendedKeyUsage to the leaf profile from the PKI type.
void SOPC_PKIProvider_Free(SOPC_PKIProvider **ppPKI)
Frees allocated PKIs.
SOPC_ReturnStatus SOPC_PKIPermissive_Create(SOPC_PKIProvider **ppPKI)
Creates a PKI Provider without security.
SOPC_ReturnStatus SOPC_PKIProvider_LeafProfileSetURI(SOPC_PKI_LeafProfile *pProfile, const char *applicationUri)
Set the application URI to the leaf profile.
SOPC_ReturnStatus SOPC_PKIProvider_LeafProfileSetURL(SOPC_PKI_LeafProfile *pProfile, const char *url)
Set the endpoint URL used for connection to the leaf profile.
void SOPC_PKIProvider_DeleteProfile(SOPC_PKI_Profile **ppProfile)
Delete a PKI profile.
SOPC_ReturnStatus SOPC_PKIProvider_CreateFromList(SOPC_CertificateList *pTrustedCerts, SOPC_CRLList *pTrustedCrl, SOPC_CertificateList *pIssuerCerts, SOPC_CRLList *pIssuerCrl, SOPC_PKIProvider **ppPKI)
Create the PKIProvider from list representation.
SOPC_ReturnStatus SOPC_PKIProvider_ProfileSetURL(SOPC_PKI_Profile *pProfile, const char *url)
Set the endpoint URL used for connection to the PKI profile.
SOPC_ReturnStatus SOPC_PKIProvider_SetUpdateCb(SOPC_PKIProvider *pPKI, SOPC_PKIProviderUpdateCb *pUpdateCb, uintptr_t updateParam)
Defines the callback to be called when a PKI certificates update is done with SOPC_PKIProvider_Update...
SOPC_ReturnStatus SOPC_PKIProvider_WriteToStore(SOPC_PKIProvider *pPKI, const bool bEraseExistingFiles)
Write the certificate files in the updatedTrustList folder of the PKI storage. The updatedTrustList f...
SOPC_ReturnStatus SOPC_PKIProvider_SetStorePath(const char *directoryStorePath, SOPC_PKIProvider *pPKI)
Redefines the directory store where the certificates will be stored with SOPC_PKIProvider_WriteToStor...
SOPC_ReturnStatus SOPC_PKIProvider_CreateProfile(const char *securityPolicyUri, SOPC_PKI_Profile **ppProfile)
Create a PKI profile for a validation process. Backward interoperability is enabled....
SOPC_ReturnStatus SOPC_PKIProvider_RemoveCertificate(SOPC_PKIProvider *pPKI, const char *pThumbprint, const bool bIsTrusted, bool *pIsRemoved, bool *pIsIssuer)
Remove all the certificates matching with the given thumbprint. If the Certificate is a CA Certificat...
SOPC_ReturnStatus SOPC_PKIProvider_ProfileSetUsageFromType(SOPC_PKI_Profile *pProfile, SOPC_PKI_Type PKIType)
Set the properties to the PKI profile from the PKI type.
SOPC_ReturnStatus SOPC_PKIProvider_CreateLeafProfile(const char *securityPolicyUri, SOPC_PKI_LeafProfile **ppProfile)
Create a leaf certificate profile from security policy to check certificate properties.
SOPC_ReturnStatus SOPC_PKIProvider_CheckLeafCertificate(const SOPC_CertificateList *pToValidate, const SOPC_PKI_LeafProfile *pProfile, uint32_t *error)
Check leaf certificate properties.
SOPC_ReturnStatus SOPC_PKIProvider_CreateMinimalUserProfile(SOPC_PKI_Profile **ppProfile)
Create a minimal PKI profile for user validation process.
SOPC_ReturnStatus SOPC_PKIProvider_CreateFromStore(const char *directoryStorePath, SOPC_PKIProvider **ppPKI)
Creates the PKIProvider from a directory where certificates are stored.
void SOPC_PKIProvider_DeleteLeafProfile(SOPC_PKI_LeafProfile **ppProfile)
Delete a leaf profile.
Defines the cryptographic abstraction interface for the minimal PKI implementation provided by the st...
A list of Certificate Revocation Lists.
Definition key_manager_cyclone.h:79
The signed public key representation.
Definition key_manager_cyclone.h:60
The PKIProvider object for the Public Key Infrastructure.
Definition sopc_pki_struct_lib_internal.h:39
Structure containing the leaf certificate profile for validation with SOPC_PKIProvider_ValidateCertif...
Definition sopc_pki_struct_lib_internal.h:91
Structure containing the validation configuration.
Definition sopc_pki_struct_lib_internal.h:146