diff --git a/scripts/build_ffi.py b/scripts/build_ffi.py index 4209197..cba2481 100644 --- a/scripts/build_ffi.py +++ b/scripts/build_ffi.py @@ -546,8 +546,6 @@ def build_ffi(local_wolfssl, features): int wc_RNG_GenerateBlock(WC_RNG*, byte*, word32); int wc_RNG_GenerateByte(WC_RNG*, byte*); int wc_FreeRng(WC_RNG*); - - int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz); """ if not features["FIPS"] or features["FIPS_VERSION"] > 2: @@ -957,13 +955,19 @@ def build_ffi(local_wolfssl, features): } DerBuffer; typedef struct { ...; } EncryptedInfo; + word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz, + int hashOID); int wc_PemToDer(const unsigned char* buff, long longSz, int type, DerBuffer** pDer, void* heap, EncryptedInfo* info, int* keyFormat); int wc_DerToPemEx(const byte* der, word32 derSz, byte* output, word32 outSz, - byte *cipher_info, int type); - word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz, - int hashOID); + byte *cipher_info, int type); + """ + + if features["ASN"] or features["RSA"]: + # This ASN function is used by the RSA binding as well. + cdef += """ + int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz); """ if features["WC_RNG_SEED_CB"]: