22#ifndef _WOLFPORT_STSAFE_H_
23#define _WOLFPORT_STSAFE_H_
25#include <wolfssl/wolfcrypt/settings.h>
30#include <wolfssl/wolfcrypt/cryptocb.h>
33#if !defined(WOLFCRYPT_ONLY) && defined(HAVE_PK_CALLBACKS)
37#ifdef WOLFSSL_STSAFEA100
41#include "stsafe_interface.h"
43#ifndef STSAFE_MAX_KEY_LEN
44 #define STSAFE_MAX_KEY_LEN ((uint32_t)48)
46#ifndef STSAFE_MAX_PUBKEY_RAW_LEN
47 #define STSAFE_MAX_PUBKEY_RAW_LEN ((uint32_t)STSAFE_MAX_KEY_LEN * 2)
49#ifndef STSAFE_MAX_SIG_LEN
50 #define STSAFE_MAX_SIG_LEN ((uint32_t)STSAFE_MAX_KEY_LEN * 2)
53WOLFSSL_API
int SSL_STSAFE_LoadDeviceCertificate(
byte** pRawCertificate,
54 word32* pRawCertificateLen);
56#if !defined(WOLFCRYPT_ONLY) && defined(HAVE_PK_CALLBACKS)
57WOLFSSL_API
int SSL_STSAFE_CreateKeyCb(
WOLFSSL* ssl,
ecc_key* key, word32 keySz,
58 int ecc_curve,
void* ctx);
59WOLFSSL_API
int SSL_STSAFE_VerifyPeerCertCb(
WOLFSSL* ssl,
60 const unsigned char* sig,
unsigned int sigSz,
61 const unsigned char* hash,
unsigned int hashSz,
62 const unsigned char* keyDer,
unsigned int keySz,
63 int* result,
void* ctx);
64WOLFSSL_API
int SSL_STSAFE_SignCertificateCb(
WOLFSSL* ssl,
65 const byte* in, word32 inSz,
66 byte* out, word32* outSz,
67 const byte* key, word32 keySz,
void* ctx);
68WOLFSSL_API
int SSL_STSAFE_SharedSecretCb(
WOLFSSL* ssl,
70 unsigned char* pubKeyDer,
unsigned int* pubKeySz,
71 unsigned char* out,
unsigned int* outlen,
75WOLFSSL_API
int SSL_STSAFE_SetupPkCallbacks(
WOLFSSL_CTX* ctx);
76WOLFSSL_API
int SSL_STSAFE_SetupPkCallbackCtx(
WOLFSSL* ssl,
void* user_ctx);
83#define WOLF_STSAFE_DEVID 0x53545341;
92WOLFSSL_API
int wolfSSL_STSAFE_CryptoDevCb(
int devId, wc_CryptoInfo* info,
Definition internal.h:2595
Definition internal.h:3849
Header file containing key wolfSSL API.