[ 
https://issues.apache.org/jira/browse/TS-5059?focusedWorklogId=34821&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-34821
 ]

ASF GitHub Bot logged work on TS-5059:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jan/17 19:52
            Start Date: 05/Jan/17 19:52
    Worklog Time Spent: 10m 
      Work Description: Github user jablko commented on a diff in the pull 
request:

    https://github.com/apache/trafficserver/pull/1294#discussion_r94838912
  
    --- Diff: iocore/net/BIO_fastopen.cc ---
    @@ -160,9 +174,24 @@ static const BIO_METHOD fastopen_methods = {
       .destroy       = fastopen_destroy,
       .callback_ctrl = nullptr,
     };
    +#else
    +static BIO_METHOD *fastopen_methods = nullptr;
    +#endif
     
     const BIO_METHOD *
     BIO_s_fastopen()
     {
    +#if OPENSSL_VERSION_NUMBER < 0x10100000L
       return &fastopen_methods;
    +#else
    +  if (!fastopen_methods) {
    +    fastopen_methods = BIO_meth_new(BIO_TYPE_SOCKET, "fastopen");
    +    BIO_meth_set_write(fastopen_methods, fastopen_bwrite);
    +    BIO_meth_set_read(fastopen_methods, fastopen_bread);
    +    BIO_meth_set_ctrl(fastopen_methods, fastopen_ctrl);
    +    BIO_meth_set_create(fastopen_methods, fastopen_create);
    +    BIO_meth_set_destroy(fastopen_methods, fastopen_destroy);
    --- End diff --
    
    Is the following equivalent?
    
    ```C
    #if OPENSSL_VERSION_NUMBER < 0x10100000L
    static const BIO_METHOD fastopen_methods[] = {{
    ...
    }};
    #else
    static const BIO_METHOD *fastopen_methods = [] {
      BIO_METHOD *fastopen_methods = BIO_meth_new(BIO_TYPE_SOCKET, "fastopen");
      ...
      return fastopen_methods;
    }();
    #endif
    
    const BIO_METHOD *
    BIO_s_fastopen()
    {
      return fastopen_methods;
    }


Issue Time Tracking
-------------------

    Worklog Id:     (was: 34821)
    Time Spent: 8h  (was: 7h 50m)

> ATS 7.0.0 build fails with OpenSSL 1.1.0c
> -----------------------------------------
>
>                 Key: TS-5059
>                 URL: https://issues.apache.org/jira/browse/TS-5059
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: SSL, TLS
>            Reporter: Jean Baptiste Favre
>             Fix For: 7.1.0
>
>          Time Spent: 8h
>  Remaining Estimate: 0h
>
> ATS 7.0.0 build currently fails with following error:
> {code}SSLInternal.cc: In function ‘void SSL_set_rbio(SSL*, BIO*)’:
> SSLInternal.cc:40:10: error: invalid use of incomplete type ‘SSL {aka
> struct ssl_st}’
>    if (ssl->rbio != NULL) {
>           ^~
> In file included from /usr/include/openssl/crypto.h:31:0,
>                  from /usr/include/openssl/comp.h:16,
>                  from /usr/include/openssl/ssl.h:47,
>                  from SSLInternal.cc:33:
> /usr/include/openssl/ossl_typ.h:144:16: note: forward declaration of
> ‘SSL {aka struct ssl_st}’
>  typedef struct ssl_st SSL;
>                 ^~~~~~
> SSLInternal.cc:41:17: error: invalid use of incomplete type ‘SSL {aka
> struct ssl_st}’
>      BIO_free(ssl->rbio);
>                  ^~
> In file included from /usr/include/openssl/crypto.h:31:0,
>                  from /usr/include/openssl/comp.h:16,
>                  from /usr/include/openssl/ssl.h:47,
>                  from SSLInternal.cc:33:
> /usr/include/openssl/ossl_typ.h:144:16: note: forward declaration of
> ‘SSL {aka struct ssl_st}’
>  typedef struct ssl_st SSL;
>                 ^~~~~~
> SSLInternal.cc:43:6: error: invalid use of incomplete type ‘SSL {aka
> struct ssl_st}’
>    ssl->rbio = rbio;
>       ^~
> In file included from /usr/include/openssl/crypto.h:31:0,
>                  from /usr/include/openssl/comp.h:16,
>                  from /usr/include/openssl/ssl.h:47,
>                  from SSLInternal.cc:33:
> /usr/include/openssl/ossl_typ.h:144:16: note: forward declaration of
> ‘SSL {aka struct ssl_st}’
>  typedef struct ssl_st SSL;
>                 ^~~~~~
> {code}
> The full configure log can be found here:
> https://gist.github.com/jbfavre/00f63362b435d8ffc682d42d29b671f2
> According to https://wiki.openssl.org/index.php/1.1_API_Changes :
> > setting SSL->rbio without setting SSL->wbio. New function introduction
> in 1.1.0 to handle this: SSL_set_rbio()".
> Problem is, rbio doesn't seems to be nicely detected at configure stage:
> {code}checking for SSL_set_rbio... no
> checking whether to enable set rbio... no{code}
> Binding ATS to OpenSSL 1.0 still works.
> Regards,
> Jean Baptiste Favre



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to