/* secSecret.h - vault secret library header file */ /* * Copyright (c) 2015-2017, 2021 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 __INCsecSecreth #define __INCsecSecreth /* includes */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* defines */ #ifndef SEC_SECRET_KEY_ID_MAX #define SEC_SECRET_KEY_ID_MAX 64 #endif #ifndef SEC_SECRET_MAX_SECRET #define SEC_SECRET_MAX_SECRET 256 #endif /* typedefs */ typedef struct secKepBackend { STATUS (*kepGet) /* get KEP from backend */ ( char * buf, int * len ); }SEC_VAULT_KEP_BACKEND; /* deprecated type */ typedef int (*SEC_VAULT_KEP_CB)(char* buf, int* len); /* function declarations */ /* secure vault */ int secSecretImport (const char * keyId, const char * key, int keyLen); int secSecretGet (const char * keyId, char * key, int * keyLen); int secSecretDel (const char * keyId); BOOL secSecretReadyCheck (const int delaySeconds); STATUS securePartitionWaitMount (const char * pPartName); /* KEP backend */ STATUS secVaultKepBackendSet (SEC_VAULT_KEP_BACKEND * pBackend); STATUS secSecretKepGet (char * buf, int * len); /* deprecated API */ int secVaultSetKepCb (SEC_VAULT_KEP_CB callback); SEC_VAULT_KEP_CB secSecretGetKepCb (void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __INCsecSecreth */