Skip to content

Conversation

@tiran
Copy link
Contributor

@tiran tiran commented Apr 19, 2016

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

@richsalz
Copy link
Contributor

Great. We need a brief description for X509_STORE_get0_objects in the x509 store pod page.

@levitte
Copy link
Member

levitte commented Apr 19, 2016

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?

@richsalz
Copy link
Contributor

Yes, iterators are new and should wait.

@tiran
Copy link
Contributor Author

tiran commented Apr 19, 2016

@richsalz where do you want to have the documentation, doc/crypto/X509_STORE_new.pod ?

@richsalz
Copy link
Contributor

Yes.

@tiran tiran force-pushed the tiran/x509_object branch from 55bf5af to 7e191b3 Compare April 19, 2016 20:31
@tiran
Copy link
Contributor Author

tiran commented Apr 19, 2016

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?

@richsalz
Copy link
Contributor

No, add it here! Thanks.

@tiran tiran force-pushed the tiran/x509_object branch from 7e191b3 to 5858b32 Compare April 19, 2016 22:01
@richsalz richsalz self-assigned this Apr 26, 2016
Copy link
Member

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

@tiran tiran force-pushed the tiran/x509_object branch from 5858b32 to 9a75b49 Compare April 28, 2016 17:49
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>
@tiran tiran force-pushed the tiran/x509_object branch from 9a75b49 to d5dd5f4 Compare April 28, 2016 17:50
@tiran
Copy link
Contributor Author

tiran commented Apr 28, 2016

@levitte I addressed both of your comments and rebased my patch to current master.

@levitte
Copy link
Member

levitte commented Apr 28, 2016

Cool. I'm satisfied. This is going in.

@levitte levitte added the approval: done This pull request has the required number of approvals label Apr 28, 2016
@levitte
Copy link
Member

levitte commented Apr 28, 2016

And done! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants