Skip to content

Commit 4f37e78

Browse files
committed
Include wc_GetPkcs8TraditionalOffset also when RSA feature is selected
It's part of the ASN feature but since it's also used by the RSA binding this function must also be part of the library when only the RSA feature is selected.
1 parent 6b241ca commit 4f37e78

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/build_ffi.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,6 @@ def build_ffi(local_wolfssl, features):
741741
int wc_InitRsaKey(RsaKey* key, void*);
742742
int wc_FreeRsaKey(RsaKey* key);
743743
744-
int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz);
745-
746744
int wc_RsaPrivateKeyDecode(const byte*, word32*, RsaKey*, word32);
747745
int wc_RsaPublicKeyDecode(const byte*, word32*, RsaKey*, word32);
748746
int wc_RsaEncryptSize(RsaKey*);
@@ -961,6 +959,12 @@ def build_ffi(local_wolfssl, features):
961959
int hashOID);
962960
"""
963961

962+
if features["ASN"] or features["RSA"]:
963+
# This ASN function is used by the RSA binding as well.
964+
cdef += """
965+
int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz);
966+
"""
967+
964968
if features["KEYGEN"]:
965969
cdef += """
966970
int wc_PemToDer(const unsigned char* buff, long longSz, int type,

0 commit comments

Comments
 (0)