Skip to content

Commit 1caa444

Browse files
committed
fix: add const to wc_Ed448 DER export function signatures
1 parent fc51a38 commit 1caa444

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12621,7 +12621,7 @@ int wc_Ed25519PublicKeyToDer(const ed25519_key* key, byte* output, word32 inLen,
1262112621
* @return BAD_FUNC_ARG when key is NULL.
1262212622
* @return MEMORY_E when dynamic memory allocation failed.
1262312623
*/
12624-
int wc_Ed448PublicKeyToDer(ed448_key* key, byte* output, word32 inLen,
12624+
int wc_Ed448PublicKeyToDer(const ed448_key* key, byte* output, word32 inLen,
1262512625
int withAlg)
1262612626
{
1262712627
int ret;
@@ -32022,7 +32022,7 @@ int wc_Curve448PublicKeyDecode(const byte* input, word32* inOutIdx,
3202232022
#if defined(HAVE_ED448) && defined(HAVE_ED448_KEY_EXPORT)
3202332023
/* Write a Private ecc key, including public to DER format,
3202432024
* length on success else < 0 */
32025-
int wc_Ed448KeyToDer(ed448_key* key, byte* output, word32 inLen)
32025+
int wc_Ed448KeyToDer(const ed448_key* key, byte* output, word32 inLen)
3202632026
{
3202732027
if (key == NULL) {
3202832028
return BAD_FUNC_ARG;
@@ -32033,7 +32033,7 @@ int wc_Ed448KeyToDer(ed448_key* key, byte* output, word32 inLen)
3203332033

3203432034
/* Write only private ecc key to DER format,
3203532035
* length on success else < 0 */
32036-
int wc_Ed448PrivateKeyToDer(ed448_key* key, byte* output, word32 inLen)
32036+
int wc_Ed448PrivateKeyToDer(const ed448_key* key, byte* output, word32 inLen)
3203732037
{
3203832038
if (key == NULL) {
3203932039
return BAD_FUNC_ARG;

wolfssl/wolfcrypt/asn_public.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -851,11 +851,11 @@ WOLFSSL_API int wc_Ed448PublicKeyDecode(
851851
const byte* input, word32* inOutIdx, ed448_key* key, word32 inSz);
852852
#endif
853853
#ifdef HAVE_ED448_KEY_EXPORT
854-
WOLFSSL_API int wc_Ed448KeyToDer(ed448_key* key, byte* output, word32 inLen);
854+
WOLFSSL_API int wc_Ed448KeyToDer(const ed448_key* key, byte* output, word32 inLen);
855855
WOLFSSL_API int wc_Ed448PrivateKeyToDer(
856-
ed448_key* key, byte* output, word32 inLen);
856+
const ed448_key* key, byte* output, word32 inLen);
857857
WOLFSSL_API int wc_Ed448PublicKeyToDer(
858-
ed448_key* key, byte* output, word32 inLen, int withAlg);
858+
const ed448_key* key, byte* output, word32 inLen, int withAlg);
859859
#endif
860860
#endif /* HAVE_ED448 */
861861

0 commit comments

Comments
 (0)