Skip to content

Commit baacd99

Browse files
committed
Move new wolfSSL_ED* API's out of wolfcrypt headers
1 parent 8b76230 commit baacd99

4 files changed

Lines changed: 20 additions & 14 deletions

File tree

wolfssl/openssl/ed25519.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ int wolfSSL_ED25519_verify(const unsigned char *msg, unsigned int msgSz,
4242
const unsigned char *pub, unsigned int pubSz,
4343
const unsigned char *sig, unsigned int sigSz);
4444

45+
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
46+
/* Not OpenSSL API's, but these two constructors are leveraged within
47+
* wolfSSL's compat layer for Ed25519 object creation/deletion simplicity */
48+
WOLFSSL_API
49+
ed25519_key* wolfSSL_ED25519_new(void* heap, int devId);
50+
51+
WOLFSSL_API
52+
void wolfSSL_ED25519_free(ed25519_key* key);
53+
#endif
54+
4555
#ifdef __cplusplus
4656
} /* extern "C" */
4757
#endif

wolfssl/openssl/ed448.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ int wolfSSL_ED448_verify(const unsigned char *msg, unsigned int msgSz,
4242
const unsigned char *pub, unsigned int pubSz,
4343
const unsigned char *sig, unsigned int sigSz);
4444

45+
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
46+
/* Not OpenSSL API's, but these two constructors are leveraged within
47+
* wolfSSL's compat layer for Ed448 object creation/deletion simplicity */
48+
WOLFSSL_API
49+
ed448_key* wolfSSL_ED448_new(void* heap, int devId);
50+
51+
WOLFSSL_API
52+
void wolfSSL_ED448_free(ed448_key* key);
53+
#endif
54+
4555
#ifdef __cplusplus
4656
} /* extern "C" */
4757
#endif

wolfssl/wolfcrypt/ed25519.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,6 @@ WOLFSSL_API
188188
int wc_ed25519_delete(ed25519_key* key, ed25519_key** key_p);
189189
#endif
190190

191-
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
192-
WOLFSSL_API
193-
ed25519_key* wolfSSL_ED25519_new(void* heap, int devId);
194-
WOLFSSL_API
195-
void wolfSSL_ED25519_free(ed25519_key* key);
196-
#endif
197-
198191
#ifdef HAVE_ED25519_KEY_IMPORT
199192
WOLFSSL_API
200193
int wc_ed25519_import_public(const byte* in, word32 inLen, ed25519_key* key);

wolfssl/wolfcrypt/ed448.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,6 @@ WOLFSSL_API
170170
int wc_ed448_delete(ed448_key* key, ed448_key** key_p);
171171
#endif
172172

173-
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL)
174-
WOLFSSL_API
175-
ed448_key* wolfSSL_ED448_new(void* heap, int devId);
176-
WOLFSSL_API
177-
void wolfSSL_ED448_free(ed448_key* key);
178-
#endif
179-
180173
#ifdef HAVE_ED448_KEY_IMPORT
181174
WOLFSSL_API
182175
int wc_ed448_import_public(const byte* in, word32 inLen, ed448_key* key);

0 commit comments

Comments
 (0)