forked from wolfSSL/wolfssl
update to asn compatibility
This commit is contained in:
@ -46,3 +46,4 @@
|
||||
#endif /* CTAO_CRYPT_ASN_H */
|
||||
|
||||
#endif /* !NO_ASN */
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
/* includes for their compatibility */
|
||||
#include <cyassl/ctaocrypt/integer.h>
|
||||
#include <cyassl/ctaocrypt/random.h>
|
||||
#include <cyassl/ctaocrypt/settings.h>
|
||||
|
||||
#define InitRsaKey wc_InitRsaKey
|
||||
#define FreeRsaKey wc_FreeRsaKey
|
||||
@ -50,10 +51,6 @@
|
||||
#define RsaFreeCavium wc_RsaFreeCavium
|
||||
#endif
|
||||
|
||||
#define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
|
||||
#define RsaPublicKeyDecode wc_RsaPublicKeyDecode
|
||||
#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
|
||||
|
||||
#endif /* CTAO_CRYPT_RSA_H */
|
||||
|
||||
#endif /* NO_RSA */
|
||||
|
@ -22,10 +22,17 @@
|
||||
#ifndef CTAO_CRYPT_SETTINGS_C_H
|
||||
#define CTAO_CRYPT_SETTINGS_C_H
|
||||
|
||||
/* asn.c compatibility */
|
||||
#define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
|
||||
#define RsaPublicKeyDecode wc_RsaPublicKeyDecode
|
||||
#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
|
||||
|
||||
/* since fips overrides rsa.h map compatibility here */
|
||||
#if !defined(NO_RSA)
|
||||
#ifdef WOLFSSL_KEY_GEN
|
||||
#define RsaKeyToDer wc_RsaKeyToDer
|
||||
#endif
|
||||
|
||||
#define RsaPrivateKeyDecode wc_RsaPrivateKeyDecode
|
||||
#define RsaPublicKeyDecode wc_RsaPublicKeyDecode
|
||||
#define RsaPublicKeyDecodeRaw wc_RsaPublicKeyDecodeRaw
|
||||
#endif /* have rsa and HAVE_FIPS */
|
||||
|
||||
/* Macro redefinitions for compatibility */
|
||||
#if defined(WOLFSSL_SHA512) && !defined(CYASSL_SHA512)
|
||||
@ -40,6 +47,9 @@
|
||||
#if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY)
|
||||
#define NO_CYASSL_MEMORY
|
||||
#endif
|
||||
#ifdef WOLFSSL_KEY_GEN
|
||||
#define CYASSL_KEY_GEN
|
||||
#endif
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_C_H */
|
||||
|
||||
|
@ -100,12 +100,6 @@ int wc_RsaFlattenPublicKey(RsaKey* key, byte* a, word32* aSz, byte* b,
|
||||
{
|
||||
return MakeRsaKey(key, size, e, rng);
|
||||
}
|
||||
|
||||
|
||||
int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
|
||||
{
|
||||
return RsaKeyToDer(key, output, inLen);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user