-
Notifications
You must be signed in to change notification settings - Fork 24
Move some cdef declarations for RSA to separate section #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The definitions for the following functions are not always available
when wolfSSL is configured to only contain a minimum of functionality:
- wc_GetPkcs8TraditionalOffset (only with ASN, which is required for
RSA)
- wc_PemToDer (only when KEYGEN is enabled)
- wc_DerToPemEx (only when KEYGEN is enabled)
This change allows for building the Python wrapper when ASN and RSA
are both disabled.
scripts/build_ffi.py
Outdated
| int wc_InitRsaKey(RsaKey* key, void*); | ||
| int wc_FreeRsaKey(RsaKey* key); | ||
| int wc_GetPkcs8TraditionalOffset(byte* input, word32* inOutIdx, word32 sz); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should depend on the ASN feature, instead of the RSA feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I put it here because it wasn’t actually exposed in asn.py, it was just needed for the RSA part in ciphers.py. I now made it separate so that it is included if either the ASN feature is selected (in which case there is not yet any binding for it in asn.py but that is not in scope of this pull request), or the RSA feature (which needs this function).
lealem47
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the one comment, the rest of the changes look good
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.
These functions are actually not tied to the KEYGEN feature.
|
Testing the various combinations is a little tricky because it isn’t automated. I moved the two keygen functions to the |
The definitions for the following functions are not always available when wolfSSL is configured to only contain a minimum of functionality:
This change allows for building the Python wrapper when ASN and RSA are both disabled.