I'd assume it was a niceness thing and just drop it in favor of the more
verbose, but same-as-ssl.h version.


On Sun, Oct 20, 2013 at 5:44 PM, cyli <notifications@github.com> wrote:

> In cryptography/bindings/openssl/ssl.py:
>
> > @@ -13,14 +13,244 @@
> >
> >  INCLUDES = """
> >  #include <openssl/ssl.h>
> > +
> > +/* This is a gross hack - if it is not here, as well as in the TYPES section,
> > + * because it is needed to replace some function signatures in the FUNCTIONS
> > + * section, and may be needed by PyOpenSSL
>
> These callbacks aren't actually defined in ssl.h, but they were defined in
> that opentls PR. I'm not entirely certain whether that's because they are
> needed by pyopenssl, or just to make things look nice. I was guessing it's
> because it's needed by pyopenssl.
>
> The function definition the opentls branch looks like this: void
> SSL_CTX_set_verify(SSL_CTX *ctx, int mode, verify_callback cb);, but in
> ssl.h it looks like: void SSL_CTX_set_verify(SSL_CTX *ctx,int mode, int
> (*callback)(int, X509_STORE_CTX *));.
>
> verify_callback isn't defined in ssl.h, and for some reason when I leave
> the definition just in TYPES, when I attempt to import the API module, I
> get errors about conflicting types in SSL_CTX_set_verify. If I put it in
> the INCLUDES section to, so that it gets passed to the verify function in
> CFFI, those errors seem to go away?
>
> I wasn't sure what to do here. I could just eliminate the verify_callbackdefinition and make the
> SSL_CTX_set_verify definition look the same as it does in ssl.h, but I
> thought maybe pyopenssl might use it?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/154/files#r7084390>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084