-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Add getters for X509_OBJECT #979
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
Conversation
|
Great. We need a brief description for |
|
Personally, I'd rather see an iterator than returning the stack... However, that would be breaking entirely new ground. Maybe refactoring for OpenSSL 1.2? |
|
Yes, iterators are new and should wait. |
|
@richsalz where do you want to have the documentation, doc/crypto/X509_STORE_new.pod ? |
|
Yes. |
55bf5af to
7e191b3
Compare
|
I found another missing function. OpenSSL 1.1.0 has X509_STORE_set1_param() but lacks X509_STORE_get0_param(). Do you like to have a separate PR or can I just add the getter to this PR? |
|
No, add it here! Thanks. |
7e191b3 to
5858b32
Compare
crypto/x509/x509_lu.c
Outdated
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.
Brace on new line, please
5858b32 to
9a75b49
Compare
OpenSSL 1.1.0-pre5 has made some additional structs opaque. Python's ssl module requires access to some of the struct members. Three new getters are added: int X509_OBJECT_get_type(X509_OBJECT *a); STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *v); X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); Signed-off-by: Christian Heimes <cheimes@redhat.com>
9a75b49 to
d5dd5f4
Compare
|
@levitte I addressed both of your comments and rebased my patch to current master. |
|
Cool. I'm satisfied. This is going in. |
|
And done! Thank you |
OpenSSL 1.1.0-pre5 breaks Python's SSL module again. In two functions
Python's ssl module gets all X509_OBJECT from the context's X509_STORE
and iterates over them.
https://hg.python.org/cpython/file/tip/Modules/_ssl.c#l3420
https://hg.python.org/cpython/file/tip/Modules/_ssl.c#l3467
OpenSSL 1.1.0 lacks two functions to implement the same feature.
X509_OBJECT_get0_X509() is already defined.
STACK_OF(X509_OBJECT) X509_STORE_get0_objects(X509_STORE);
int X509_OBJECT_get_type(X509_OBJECT*);
Signed-off-by: Christian Heimes cheimes@redhat.com