Files
2026-07-30 18:09:00 +05:30

50 lines
1.4 KiB
C

/* secTrustStore.h - VxWorks trust store library header file */
/*
* Copyright (c) 2017, 2021, 2023 Wind River Systems, Inc.
*
* The right to copy, distribute, modify, or otherwise make use
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
#ifndef __INCsecTrustStoreh
#define __INCsecTrustStoreh
/* includes */
#include <vxWorks.h>
#include <openssl/x509.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* defines */
/* KeyUsage defines */
#define DIGITAL_SIGNATURE (1)
#define CONTENT_COMMITMENT (1<<1) /* previous editions of X.509
called this bit to nonRepudiation */
#define KEY_ENCIPHERMENT (1<<2)
#define DATA_ENCIPHERMENT (1<<3)
#define KEY_AGREEMENT (1<<4)
#define KEY_CERT_SIGN (1<<5)
#define CRL_SIGN (1<<6)
#define ENCIPHER_ONLY (1<<7)
#define DECIPHER_ONLY (1<<8)
/* typedefs */
typedef STATUS (*SEC_TRUST_STORE_PUBKEY_VALIDATE_CB)(const char* trustStoreId, const X509* cert, const unsigned int keyUsage);
/* function declarations */
extern STATUS secTrustStorePubKeyValidate(const char* trustStoreId, const X509* cert, const unsigned int keyUsage);
extern void secTrustStorePubKeyValidateProviderSet(const SEC_TRUST_STORE_PUBKEY_VALIDATE_CB provider);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __INCsecTrustStoreh */