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
_ssl compiler warnings #47222
Comments
When compiling the _ssl extension on MacOS 10.4, I get these warnings: |
It looks like this comes from r59493 which purports to fix a warning: ------------------------------------------------------------------------ Fixed warning in ssl module --- Modules/_ssl.c (revision 59492)
+++ Modules/_ssl.c (revision 59493)
@@ -660,7 +660,7 @@
char buf[2048];
char *vptr;
int len;
- unsigned char *p;
+ const unsigned char *p;
if (certificate == NULL)
return peer_alt_names; On MacOS 10.4 with OpenSSL 0.9.7i, ASN1_item_d2i is declared without I guess Christian was developing on a system with a different OpenSSL |
Any progress here? I haven't yet found a formulation which suppresses #if SOMEFEATURE
#define D2I_PARAMETER_2_TYPE unsigned char *
#else
#define D2I_PARAMETER_2_TYPE const unsigned char *
#endif |
Yes, although I have no idea what that feature may be... (sigh) Oh well, |
Would HEADER_ASN1_MAC_H or IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname help? |
The changeset that changed the definitions is here: As you can see there is no easy identifier in the changeset (i'm not The patch i've done goes of then next OPENSSL_VERSION_NUMBER change Same patch applies to p3k |
Still occurs on dev and py3k. |
It occurs on Debian Lenny AMD64. |
I commited grooverdan's patch: r78596 (trunk), r78597 (2.6), r78598 (py3k), 78599 (3.1). The API was changed in... 2004, 6 years ago! I hope that everybody upgraded to the new OpenSSL version since that. Anyway, the warning should be fixed, and Python should be compatible with any OpenSSL version. |
Because we're in release candidate mode, I reverted the change to the release26-maint branch. It doesn't seem critical enough to sneak in between rc and final. Please do re-apply after 2.6.5 final is released though! |
barry> Because we're in release candidate mode, Yeah, sorry. I realized that after backporting the fix to 2.6. barry> Please do re-apply after 2.6.5 final is released though! Ok. I reopened to issue to not forget. |
On Gentoo buildbots (2.x and 3.x), there's still the same compiler warnings: /home/buildslave/python-trunk/trunk.norwitz-x86/build/Modules/_ssl.c:706: warning: passing arg 2 of `ASN1_item_d2i' from incompatible pointer type |
I don't get any warnings with gcc -Wall and OpenSSL 1.0.x. |
out of date? still occurs on: PPC Leopard 3.1: http://www.python.org/dev/buildbot/all/builders/PPC Leopard 3.1/builds/674/steps/compile/logs/warnings (20) btw I don't think the gentoo ones are accurate - old versions of openssl have been gone for a while: |
Well, it merely means that OpenSSL has changed the const-ness of some of their APIs over time. As I said I see no warnings with the most recent OpenSSL versions. Buildbots will tell you the same story: for example, no warnings under OS X "Snow Leopard", some under OS X "Leopard" (which is older). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: