diff --git a/wolfcrypt/src/cryptocb.c b/wolfcrypt/src/cryptocb.c index 00e2d04c1..62e65dba7 100644 --- a/wolfcrypt/src/cryptocb.c +++ b/wolfcrypt/src/cryptocb.c @@ -41,7 +41,7 @@ typedef struct CryptoCb { int devId; - wc_CryptoCallbackFunc cb; + CryptoDevCallbackFunc cb; void* ctx; } CryptoCb; static CryptoCb gCryptoDev[MAX_CRYPTO_DEVID_CALLBACKS]; @@ -64,7 +64,7 @@ void wc_CryptoCb_Init(void) } } -int wc_CryptoCb_RegisterDevice(int devId, wc_CryptoCallbackFunc cb, void* ctx) +int wc_CryptoCb_RegisterDevice(int devId, CryptoDevCallbackFunc cb, void* ctx) { /* find existing or new */ CryptoCb* dev = wc_CryptoCb_FindDevice(devId); diff --git a/wolfssl/wolfcrypt/cryptocb.h b/wolfssl/wolfcrypt/cryptocb.h index ee55cb7ba..1f9061047 100644 --- a/wolfssl/wolfcrypt/cryptocb.h +++ b/wolfssl/wolfcrypt/cryptocb.h @@ -172,22 +172,18 @@ typedef struct wc_CryptoInfo { #endif } wc_CryptoInfo; -/* old naming */ -#ifdef WOLF_CRYPTO_DEV - /* old callback function name */ - typedef int (*CryptoDevCallbackFunc)(int devId, wc_CryptoInfo* info, void* ctx); - /* old function names */ - #define wc_CryptoDev_RegisterDevice wc_CryptoCb_RegisterDevice - #define wc_CryptoDev_UnRegisterDevice wc_CryptoCb_UnRegisterDevice -#endif -typedef int (*wc_CryptoCallbackFunc)(int devId, wc_CryptoInfo* info, void* ctx); +typedef int (*CryptoDevCallbackFunc)(int devId, wc_CryptoInfo* info, void* ctx); WOLFSSL_LOCAL void wc_CryptoCb_Init(void); -WOLFSSL_API int wc_CryptoCb_RegisterDevice(int devId, wc_CryptoCallbackFunc cb, void* ctx); +WOLFSSL_API int wc_CryptoCb_RegisterDevice(int devId, CryptoDevCallbackFunc cb, void* ctx); WOLFSSL_API void wc_CryptoCb_UnRegisterDevice(int devId); +/* old function names */ +#define wc_CryptoDev_RegisterDevice wc_CryptoCb_RegisterDevice +#define wc_CryptoDev_UnRegisterDevice wc_CryptoCb_UnRegisterDevice + #ifndef NO_RSA WOLFSSL_LOCAL int wc_CryptoCb_Rsa(const byte* in, word32 inLen, byte* out,