S2OPC OPCUA Toolkit
Data Structures | Macros | Typedefs | Functions
sopc_pki.h File Reference

Defines the common interface that a PKI should provide. This is a minimal interface, as the main API for certificate and key manipulation is provided by SOPC_KeyManager. More...

#include "sopc_crypto_decl.h"
#include "sopc_crypto_provider.h"
#include "sopc_key_manager.h"

Go to the source code of this file.

Data Structures

struct  SOPC_PKIProvider
 The PKIProvider object defines the common interface for the Public Key Infrastructure. More...
 

Macros

#define SOPC_CertificateValidationError_Invalid   0x80120000
 
#define SOPC_CertificateValidationError_TimeInvalid   0x80140000
 
#define SOPC_CertificateValidationError_IssuerTimeInvalid   0x80150000
 
#define SOPC_CertificateValidationError_HostNameInvalid   0x80160000
 
#define SOPC_CertificateValidationError_UriInvalid   0x80170000
 
#define SOPC_CertificateValidationError_UseNotAllowed   0x80180000
 
#define SOPC_CertificateValidationError_IssuerUseNotAllowed   0x80190000
 
#define SOPC_CertificateValidationError_Untrusted   0x801A0000
 
#define SOPC_CertificateValidationError_RevocationUnknown   0x801B0000
 
#define SOPC_CertificateValidationError_IssuerRevocationUnknown   0x801C0000
 
#define SOPC_CertificateValidationError_Revoked   0x801D0000
 
#define SOPC_CertificateValidationError_IssuerRevoked   0x801E0000
 
#define SOPC_CertificateValidationError_ChainIncomplete   0x810D0000
 
#define SOPC_CertificateValidationError_Unkown   0x80000000
 

Typedefs

typedef void(* SOPC_PKIProvider_Free_Func) (SOPC_PKIProvider *pPKI)
 
typedef SOPC_ReturnStatus(* SOPC_FnValidateCertificate) (const struct SOPC_PKIProvider *pPKI, const SOPC_CertificateList *pToValidate, uint32_t *error)
 error is only set if returned status is different from SOPC_STATUS_OK More...
 

Functions

void SOPC_PKIProvider_Free (SOPC_PKIProvider **ppPKI)
 Free a PKI provider. More...
 

Detailed Description

Defines the common interface that a PKI should provide. This is a minimal interface, as the main API for certificate and key manipulation is provided by SOPC_KeyManager.

The stack will not provide a full-blown configurable PKI. The stack provides only a minimal, always safe validating PKI.

The stack will not provide any advanced certificate storage. You can use "user-specific" handles in the PKIProvider struct to implement more options.

The pFnValidateCertificate function should not be called directly, but you should call SOPC_CryptoProvider_Certificate_Validate() instead.

Macro Definition Documentation

◆ SOPC_CertificateValidationError_Invalid

#define SOPC_CertificateValidationError_Invalid   0x80120000

◆ SOPC_CertificateValidationError_TimeInvalid

#define SOPC_CertificateValidationError_TimeInvalid   0x80140000

◆ SOPC_CertificateValidationError_IssuerTimeInvalid

#define SOPC_CertificateValidationError_IssuerTimeInvalid   0x80150000

◆ SOPC_CertificateValidationError_HostNameInvalid

#define SOPC_CertificateValidationError_HostNameInvalid   0x80160000

◆ SOPC_CertificateValidationError_UriInvalid

#define SOPC_CertificateValidationError_UriInvalid   0x80170000

◆ SOPC_CertificateValidationError_UseNotAllowed

#define SOPC_CertificateValidationError_UseNotAllowed   0x80180000

◆ SOPC_CertificateValidationError_IssuerUseNotAllowed

#define SOPC_CertificateValidationError_IssuerUseNotAllowed   0x80190000

◆ SOPC_CertificateValidationError_Untrusted

#define SOPC_CertificateValidationError_Untrusted   0x801A0000

◆ SOPC_CertificateValidationError_RevocationUnknown

#define SOPC_CertificateValidationError_RevocationUnknown   0x801B0000

◆ SOPC_CertificateValidationError_IssuerRevocationUnknown

#define SOPC_CertificateValidationError_IssuerRevocationUnknown   0x801C0000

◆ SOPC_CertificateValidationError_Revoked

#define SOPC_CertificateValidationError_Revoked   0x801D0000

◆ SOPC_CertificateValidationError_IssuerRevoked

#define SOPC_CertificateValidationError_IssuerRevoked   0x801E0000

◆ SOPC_CertificateValidationError_ChainIncomplete

#define SOPC_CertificateValidationError_ChainIncomplete   0x810D0000

◆ SOPC_CertificateValidationError_Unkown

#define SOPC_CertificateValidationError_Unkown   0x80000000

Typedef Documentation

◆ SOPC_PKIProvider_Free_Func

typedef void(* SOPC_PKIProvider_Free_Func) (SOPC_PKIProvider *pPKI)

◆ SOPC_FnValidateCertificate

typedef SOPC_ReturnStatus(* SOPC_FnValidateCertificate) (const struct SOPC_PKIProvider *pPKI, const SOPC_CertificateList *pToValidate, uint32_t *error)

error is only set if returned status is different from SOPC_STATUS_OK

Function Documentation

◆ SOPC_PKIProvider_Free()

void SOPC_PKIProvider_Free ( SOPC_PKIProvider **  ppPKI)

Free a PKI provider.