Skip to content

Commit 427a1a3

Browse files
authored
Merge pull request #78 from mjdemilliano/move-rsa-only-cdefs
Move some cdef declarations for RSA to separate section
2 parents 82fe643 + f9f7355 commit 427a1a3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scripts/build_ffi.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,6 @@ def build_ffi(local_wolfssl, features):
546546
int wc_RNG_GenerateBlock(WC_RNG*, byte*, word32);
547547
int wc_RNG_GenerateByte(WC_RNG*, byte*);
548548
int wc_FreeRng(WC_RNG*);
549-
550-
int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz);
551549
"""
552550

553551
if not features["FIPS"] or features["FIPS_VERSION"] > 2:
@@ -957,13 +955,19 @@ def build_ffi(local_wolfssl, features):
957955
} DerBuffer;
958956
typedef struct { ...; } EncryptedInfo;
959957
958+
word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz,
959+
int hashOID);
960960
int wc_PemToDer(const unsigned char* buff, long longSz, int type,
961961
DerBuffer** pDer, void* heap, EncryptedInfo* info,
962962
int* keyFormat);
963963
int wc_DerToPemEx(const byte* der, word32 derSz, byte* output, word32 outSz,
964-
byte *cipher_info, int type);
965-
word32 wc_EncodeSignature(byte* out, const byte* digest, word32 digSz,
966-
int hashOID);
964+
byte *cipher_info, int type);
965+
"""
966+
967+
if features["ASN"] or features["RSA"]:
968+
# This ASN function is used by the RSA binding as well.
969+
cdef += """
970+
int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz);
967971
"""
968972

969973
if features["WC_RNG_SEED_CB"]:

0 commit comments

Comments
 (0)