mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fixes for better backwards compatibility.
This commit is contained in:
@ -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);
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user