test/handshake_helper.c:175: error: NULL_DEREFERENCE
  pointer `ex_data` last assigned on line 131 could be null and is dereferenced at line 175, column 9.
Showing all 69 steps of the trace


test/handshake_helper.c:126:1: start of procedure early_select_server_ctx()
124.   }
125.   
126. > static int early_select_server_ctx(SSL *s, void *arg, int ignore)
127.   {
128.       const char *servername;

test/handshake_helper.c:131:5: 
129.       const unsigned char *p;
130.       size_t len, remaining;
131. >     HANDSHAKE_EX_DATA *ex_data =
132.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
133.   

ssl/ssl_lib.c:3572:1: start of procedure SSL_get_ex_data()
  3570.   }
  3571.   
  3572. > void *SSL_get_ex_data(const SSL *s, int idx)
  3573.   {
  3574.       return (CRYPTO_get_ex_data(&s->ex_data, idx));

ssl/ssl_lib.c:3574:5: 
  3572.   void *SSL_get_ex_data(const SSL *s, int idx)
  3573.   {
  3574. >     return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3575.   }
  3576.   

crypto/ex_data.c:379:1: start of procedure CRYPTO_get_ex_data()
    377.    * particular index in the class used by this variable
    378.    */
    379. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    380.   {
    381.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:381:9: Taking true branch
    379.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    380.   {
    381.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    382.           return NULL;
    383.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:382:9: 
    380.   {
    381.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    382. >         return NULL;
    383.       return sk_void_value(ad->sk, idx);
    384.   }

crypto/ex_data.c:384:1: return from a call to CRYPTO_get_ex_data
    382.           return NULL;
    383.       return sk_void_value(ad->sk, idx);
    384. > }

ssl/ssl_lib.c:3575:1: return from a call to SSL_get_ex_data
  3573.   {
  3574.       return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3575. > }
  3576.   
  3577.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

test/handshake_helper.c:138:10: Taking false branch
136.        * was written, so parsing the normal case is a bit complex.
137.        */
138.       if (!SSL_early_get0_ext(s, TLSEXT_TYPE_server_name, &p, &remaining) ||
                ^
139.           remaining <= 2)
140.           return 0;

test/handshake_helper.c:139:9: Taking false branch
137.        */
138.       if (!SSL_early_get0_ext(s, TLSEXT_TYPE_server_name, &p, &remaining) ||
139.           remaining <= 2)
               ^
140.           return 0;
141.       /* Extract the length of the supplied list of names. */

test/handshake_helper.c:142:5: 
140.           return 0;
141.       /* Extract the length of the supplied list of names. */
142. >     len = (*(p++) << 1);
143.       len += *(p++);
144.       if (len + 2 != remaining)

test/handshake_helper.c:143:5: 
141.       /* Extract the length of the supplied list of names. */
142.       len = (*(p++) << 1);
143. >     len += *(p++);
144.       if (len + 2 != remaining)
145.           return 0;

test/handshake_helper.c:144:9: Taking false branch
142.       len = (*(p++) << 1);
143.       len += *(p++);
144.       if (len + 2 != remaining)
               ^
145.           return 0;
146.       remaining = len;

test/handshake_helper.c:146:5: 
144.       if (len + 2 != remaining)
145.           return 0;
146. >     remaining = len;
147.       /*
148.        * The list in practice only has a single element, so we only consider

test/handshake_helper.c:151:9: Taking false branch
149.        * the first one.
150.        */
151.       if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
               ^
152.           return 0;
153.       remaining--;

test/handshake_helper.c:151:27: Taking false branch
149.        * the first one.
150.        */
151.       if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
                                 ^
152.           return 0;
153.       remaining--;

test/handshake_helper.c:153:5: 
151.       if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
152.           return 0;
153. >     remaining--;
154.       /* Now we can finally pull out the byte array with the actual hostname. */
155.       if (remaining <= 2)

test/handshake_helper.c:155:9: Taking false branch
153.       remaining--;
154.       /* Now we can finally pull out the byte array with the actual hostname. */
155.       if (remaining <= 2)
               ^
156.           return 0;
157.       len = (*(p++) << 1);

test/handshake_helper.c:157:5: 
155.       if (remaining <= 2)
156.           return 0;
157. >     len = (*(p++) << 1);
158.       len += *(p++);
159.       if (len + 2 > remaining)

test/handshake_helper.c:158:5: 
156.           return 0;
157.       len = (*(p++) << 1);
158. >     len += *(p++);
159.       if (len + 2 > remaining)
160.           return 0;

test/handshake_helper.c:159:9: Taking false branch
157.       len = (*(p++) << 1);
158.       len += *(p++);
159.       if (len + 2 > remaining)
               ^
160.           return 0;
161.       remaining = len;

test/handshake_helper.c:161:5: 
159.       if (len + 2 > remaining)
160.           return 0;
161. >     remaining = len;
162.       servername = (const char *)p;
163.   

test/handshake_helper.c:162:5: 
160.           return 0;
161.       remaining = len;
162. >     servername = (const char *)p;
163.   
164.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {

test/handshake_helper.c:164:9: Taking true branch
162.       servername = (const char *)p;
163.   
164.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
               ^
165.           SSL_CTX *new_ctx = arg;
166.           SSL_set_SSL_CTX(s, new_ctx);

test/handshake_helper.c:164:37: Taking true branch
162.       servername = (const char *)p;
163.   
164.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
                                           ^
165.           SSL_CTX *new_ctx = arg;
166.           SSL_set_SSL_CTX(s, new_ctx);

test/handshake_helper.c:165:9: 
163.   
164.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
165. >         SSL_CTX *new_ctx = arg;
166.           SSL_set_SSL_CTX(s, new_ctx);
167.           /*

test/handshake_helper.c:166:9: 
164.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
165.           SSL_CTX *new_ctx = arg;
166. >         SSL_set_SSL_CTX(s, new_ctx);
167.           /*
168.            * Copy over all the SSL_CTX options - reasonable behavior

ssl/ssl_lib.c:3428:1: start of procedure SSL_set_SSL_CTX()
  3426.   }
  3427.   
  3428. > SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)
  3429.   {
  3430.       CERT *new_cert;

ssl/ssl_lib.c:3431:9: Taking false branch
  3429.   {
  3430.       CERT *new_cert;
  3431.       if (ssl->ctx == ctx)
                  ^
  3432.           return ssl->ctx;
  3433.       if (ctx == NULL)

ssl/ssl_lib.c:3433:9: Taking false branch
  3431.       if (ssl->ctx == ctx)
  3432.           return ssl->ctx;
  3433.       if (ctx == NULL)
                  ^
  3434.           ctx = ssl->session_ctx;
  3435.       new_cert = ssl_cert_dup(ctx->cert);

ssl/ssl_lib.c:3435:5: Skipping ssl_cert_dup(): empty list of specs
  3433.       if (ctx == NULL)
  3434.           ctx = ssl->session_ctx;
  3435.       new_cert = ssl_cert_dup(ctx->cert);
              ^
  3436.       if (new_cert == NULL) {
  3437.           return NULL;

ssl/ssl_lib.c:3436:9: Taking false branch
  3434.           ctx = ssl->session_ctx;
  3435.       new_cert = ssl_cert_dup(ctx->cert);
  3436.       if (new_cert == NULL) {
                  ^
  3437.           return NULL;
  3438.       }

ssl/ssl_lib.c:3439:5: 
  3437.           return NULL;
  3438.       }
  3439. >     ssl_cert_free(ssl->cert);
  3440.       ssl->cert = new_cert;
  3441.   

ssl/ssl_cert.c:234:1: start of procedure ssl_cert_free()
    232.   }
    233.   
    234. > void ssl_cert_free(CERT *c)
    235.   {
    236.       int i;

ssl/ssl_cert.c:238:9: Taking true branch
    236.       int i;
    237.   
    238.       if (c == NULL)
                   ^
    239.           return;
    240.   

ssl/ssl_cert.c:239:9: 
    237.   
    238.       if (c == NULL)
    239. >         return;
    240.   
    241.       CRYPTO_DOWN_REF(&c->references, &i, c->lock);

ssl/ssl_cert.c:265:1: return from a call to ssl_cert_free
    263.       CRYPTO_THREAD_lock_free(c->lock);
    264.       OPENSSL_free(c);
    265. > }
    266.   
    267.   int ssl_cert_set0_chain(SSL *s, SSL_CTX *ctx, STACK_OF(X509) *chain)

ssl/ssl_lib.c:3440:5: 
  3438.       }
  3439.       ssl_cert_free(ssl->cert);
  3440. >     ssl->cert = new_cert;
  3441.   
  3442.       /*

ssl/ssl_lib.c:3446:5: Condition is true
  3444.        * so setter APIs must prevent invalid lengths from entering the system.
  3445.        */
  3446.       OPENSSL_assert(ssl->sid_ctx_length <= sizeof(ssl->sid_ctx));
              ^
  3447.   
  3448.       /*

ssl/ssl_lib.c:3454:10: Taking false branch
  3452.        * leave it unchanged.
  3453.        */
  3454.       if ((ssl->ctx != NULL) &&
                   ^
  3455.           (ssl->sid_ctx_length == ssl->ctx->sid_ctx_length) &&
  3456.           (memcmp(ssl->sid_ctx, ssl->ctx->sid_ctx, ssl->sid_ctx_length) == 0)) {

ssl/ssl_lib.c:3461:5: 
  3459.       }
  3460.   
  3461. >     SSL_CTX_up_ref(ctx);
  3462.       SSL_CTX_free(ssl->ctx);     /* decrement reference count */
  3463.       ssl->ctx = ctx;

ssl/ssl_lib.c:2610:1: start of procedure SSL_CTX_up_ref()
    2608.   }
    2609.   
    2610. > int SSL_CTX_up_ref(SSL_CTX *ctx)
    2611.   {
    2612.       int i;

ssl/ssl_lib.c:2614:9: 
    2612.       int i;
    2613.   
    2614. >     if (CRYPTO_UP_REF(&ctx->references, &i, ctx->lock) <= 0)
    2615.           return 0;
    2616.   

include/internal/refcount.h:23:1: start of procedure CRYPTO_UP_REF()
      21.   typedef _Atomic int CRYPTO_REF_COUNT;
      22.   
      23. > static ossl_inline int CRYPTO_UP_REF(_Atomic int *val, int *ret, void *lock)
      24.   {
      25.       *ret = atomic_fetch_add_explicit(val, 1, memory_order_relaxed) + 1;

include/internal/refcount.h:25:5: 
      23.   static ossl_inline int CRYPTO_UP_REF(_Atomic int *val, int *ret, void *lock)
      24.   {
      25. >     *ret = atomic_fetch_add_explicit(val, 1, memory_order_relaxed) + 1;
      26.       return 1;
      27.   }

include/internal/refcount.h:26:5: 
      24.   {
      25.       *ret = atomic_fetch_add_explicit(val, 1, memory_order_relaxed) + 1;
      26. >     return 1;
      27.   }
      28.   

include/internal/refcount.h:27:1: return from a call to CRYPTO_UP_REF
      25.       *ret = atomic_fetch_add_explicit(val, 1, memory_order_relaxed) + 1;
      26.       return 1;
      27. > }
      28.   
      29.   static ossl_inline int CRYPTO_DOWN_REF(_Atomic int *val, int *ret, void *lock)

ssl/ssl_lib.c:2614:9: Taking false branch
    2612.       int i;
    2613.   
    2614.       if (CRYPTO_UP_REF(&ctx->references, &i, ctx->lock) <= 0)
                    ^
    2615.           return 0;
    2616.   

ssl/ssl_lib.c:2619:14: Condition is false
    2617.       REF_PRINT_COUNT("SSL_CTX", ctx);
    2618.       REF_ASSERT_ISNT(i < 2);
    2619.       return ((i > 1) ? 1 : 0);
                         ^
    2620.   }
    2621.   

ssl/ssl_lib.c:2619:13: 
    2617.       REF_PRINT_COUNT("SSL_CTX", ctx);
    2618.       REF_ASSERT_ISNT(i < 2);
    2619. >     return ((i > 1) ? 1 : 0);
    2620.   }
    2621.   

ssl/ssl_lib.c:2619:5: 
    2617.       REF_PRINT_COUNT("SSL_CTX", ctx);
    2618.       REF_ASSERT_ISNT(i < 2);
    2619. >     return ((i > 1) ? 1 : 0);
    2620.   }
    2621.   

ssl/ssl_lib.c:2620:1: return from a call to SSL_CTX_up_ref
    2618.       REF_ASSERT_ISNT(i < 2);
    2619.       return ((i > 1) ? 1 : 0);
    2620. > }
    2621.   
    2622.   void SSL_CTX_free(SSL_CTX *a)

ssl/ssl_lib.c:3462:5: Skipping SSL_CTX_free(): empty list of specs
  3460.   
  3461.       SSL_CTX_up_ref(ctx);
  3462.       SSL_CTX_free(ssl->ctx);     /* decrement reference count */
              ^
  3463.       ssl->ctx = ctx;
  3464.   

ssl/ssl_lib.c:3463:5: 
  3461.       SSL_CTX_up_ref(ctx);
  3462.       SSL_CTX_free(ssl->ctx);     /* decrement reference count */
  3463. >     ssl->ctx = ctx;
  3464.   
  3465.       return ssl->ctx;

ssl/ssl_lib.c:3465:5: 
  3463.       ssl->ctx = ctx;
  3464.   
  3465. >     return ssl->ctx;
  3466.   }
  3467.   

ssl/ssl_lib.c:3466:1: return from a call to SSL_set_SSL_CTX
  3464.   
  3465.       return ssl->ctx;
  3466. > }
  3467.   
  3468.   int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)

test/handshake_helper.c:172:9: 
170.            * contexts differ/conflict
171.            */
172. >         SSL_clear_options(s, 0xFFFFFFFFL);
173.           SSL_set_options(s, SSL_CTX_get_options(new_ctx));
174.   

ssl/ssl_lib.c:3915:1: start of procedure SSL_clear_options()
  3913.   }
  3914.   
  3915. > unsigned long SSL_clear_options(SSL *s, unsigned long op)
  3916.   {
  3917.       return s->options &= ~op;

ssl/ssl_lib.c:3917:5: 
  3915.   unsigned long SSL_clear_options(SSL *s, unsigned long op)
  3916.   {
  3917. >     return s->options &= ~op;
  3918.   }
  3919.   

ssl/ssl_lib.c:3918:1: return from a call to SSL_clear_options
  3916.   {
  3917.       return s->options &= ~op;
  3918. > }
  3919.   
  3920.   STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s)

test/handshake_helper.c:173:9: 
171.            */
172.           SSL_clear_options(s, 0xFFFFFFFFL);
173. >         SSL_set_options(s, SSL_CTX_get_options(new_ctx));
174.   
175.           ex_data->servername = SSL_TEST_SERVERNAME_SERVER2;

ssl/ssl_lib.c:3890:1: start of procedure SSL_CTX_get_options()
  3888.    * control interface.
  3889.    */
  3890. > unsigned long SSL_CTX_get_options(const SSL_CTX *ctx)
  3891.   {
  3892.       return ctx->options;

ssl/ssl_lib.c:3892:5: 
  3890.   unsigned long SSL_CTX_get_options(const SSL_CTX *ctx)
  3891.   {
  3892. >     return ctx->options;
  3893.   }
  3894.   

ssl/ssl_lib.c:3893:1: return from a call to SSL_CTX_get_options
  3891.   {
  3892.       return ctx->options;
  3893. > }
  3894.   
  3895.   unsigned long SSL_get_options(const SSL *s)

ssl/ssl_lib.c:3905:1: start of procedure SSL_set_options()
  3903.   }
  3904.   
  3905. > unsigned long SSL_set_options(SSL *s, unsigned long op)
  3906.   {
  3907.       return s->options |= op;

ssl/ssl_lib.c:3907:5: 
  3905.   unsigned long SSL_set_options(SSL *s, unsigned long op)
  3906.   {
  3907. >     return s->options |= op;
  3908.   }
  3909.   

ssl/ssl_lib.c:3908:1: return from a call to SSL_set_options
  3906.   {
  3907.       return s->options |= op;
  3908. > }
  3909.   
  3910.   unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op)

test/handshake_helper.c:175:9: 
173.           SSL_set_options(s, SSL_CTX_get_options(new_ctx));
174.   
175. >         ex_data->servername = SSL_TEST_SERVERNAME_SERVER2;
176.           return 1;
177.       } else if (len == strlen("server1") &&

static int early_select_server_ctx(SSL *s, void *arg, int ignore)
{
    const char *servername;
    const unsigned char *p;
    size_t len, remaining;
    HANDSHAKE_EX_DATA *ex_data =
        (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
    if (!SSL_early_get0_ext(s, TLSEXT_TYPE_server_name, &p, &remaining) ||
        remaining <= 2)
        return 0;
    len = (*(p++) << 1);
    len += *(p++);
    if (len + 2 != remaining)
        return 0;
    remaining = len;
    if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
        return 0;
    remaining--;
    if (remaining <= 2)
        return 0;
    len = (*(p++) << 1);
    len += *(p++);
    if (len + 2 > remaining)
        return 0;
    remaining = len;
    servername = (const char *)p;
    if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
        SSL_CTX *new_ctx = arg;
        SSL_set_SSL_CTX(s, new_ctx);
        SSL_clear_options(s, 0xFFFFFFFFL);
        SSL_set_options(s, SSL_CTX_get_options(new_ctx));
        ex_data->servername = SSL_TEST_SERVERNAME_SERVER2;
        return 1;
    } else if (len == strlen("server1") &&
               strncmp(servername, "server1", len) == 0) {
        ex_data->servername = SSL_TEST_SERVERNAME_SERVER1;
        return 1;
    } else if (ignore) {
        ex_data->servername = SSL_TEST_SERVERNAME_SERVER1;
        return 1;
    }
    return 0;
}
['static int early_select_server_ctx(SSL *s, void *arg, int ignore)\n{\n    const char *servername;\n    const unsigned char *p;\n    size_t len, remaining;\n    HANDSHAKE_EX_DATA *ex_data =\n        (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));\n    if (!SSL_early_get0_ext(s, TLSEXT_TYPE_server_name, &p, &remaining) ||\n        remaining <= 2)\n        return 0;\n    len = (*(p++) << 1);\n    len += *(p++);\n    if (len + 2 != remaining)\n        return 0;\n    remaining = len;\n    if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)\n        return 0;\n    remaining--;\n    if (remaining <= 2)\n        return 0;\n    len = (*(p++) << 1);\n    len += *(p++);\n    if (len + 2 > remaining)\n        return 0;\n    remaining = len;\n    servername = (const char *)p;\n    if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {\n        SSL_CTX *new_ctx = arg;\n        SSL_set_SSL_CTX(s, new_ctx);\n        SSL_clear_options(s, 0xFFFFFFFFL);\n        SSL_set_options(s, SSL_CTX_get_options(new_ctx));\n        ex_data->servername = SSL_TEST_SERVERNAME_SERVER2;\n        return 1;\n    } else if (len == strlen("server1") &&\n               strncmp(servername, "server1", len) == 0) {\n        ex_data->servername = SSL_TEST_SERVERNAME_SERVER1;\n        return 1;\n    } else if (ignore) {\n        ex_data->servername = SSL_TEST_SERVERNAME_SERVER1;\n        return 1;\n    }\n    return 0;\n}', 'void *SSL_get_ex_data(const SSL *s, int idx)\n{\n    return (CRYPTO_get_ex_data(&s->ex_data, idx));\n}', 'void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)\n{\n    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))\n        return NULL;\n    return sk_void_value(ad->sk, idx);\n}', 'SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)\n{\n    CERT *new_cert;\n    if (ssl->ctx == ctx)\n        return ssl->ctx;\n    if (ctx == NULL)\n        ctx = ssl->session_ctx;\n    new_cert = ssl_cert_dup(ctx->cert);\n    if (new_cert == NULL) {\n        return NULL;\n    }\n    ssl_cert_free(ssl->cert);\n    ssl->cert = new_cert;\n    OPENSSL_assert(ssl->sid_ctx_length <= sizeof(ssl->sid_ctx));\n    if ((ssl->ctx != NULL) &&\n        (ssl->sid_ctx_length == ssl->ctx->sid_ctx_length) &&\n        (memcmp(ssl->sid_ctx, ssl->ctx->sid_ctx, ssl->sid_ctx_length) == 0)) {\n        ssl->sid_ctx_length = ctx->sid_ctx_length;\n        memcpy(&ssl->sid_ctx, &ctx->sid_ctx, sizeof(ssl->sid_ctx));\n    }\n    SSL_CTX_up_ref(ctx);\n    SSL_CTX_free(ssl->ctx);\n    ssl->ctx = ctx;\n    return ssl->ctx;\n}', 'void ssl_cert_free(CERT *c)\n{\n    int i;\n    if (c == NULL)\n        return;\n    CRYPTO_DOWN_REF(&c->references, &i, c->lock);\n    REF_PRINT_COUNT("CERT", c);\n    if (i > 0)\n        return;\n    REF_ASSERT_ISNT(i < 0);\n#ifndef OPENSSL_NO_DH\n    EVP_PKEY_free(c->dh_tmp);\n#endif\n    ssl_cert_clear_certs(c);\n    OPENSSL_free(c->conf_sigalgs);\n    OPENSSL_free(c->client_sigalgs);\n    OPENSSL_free(c->shared_sigalgs);\n    OPENSSL_free(c->ctypes);\n    X509_STORE_free(c->verify_store);\n    X509_STORE_free(c->chain_store);\n    custom_exts_free(&c->cli_ext);\n    custom_exts_free(&c->srv_ext);\n#ifndef OPENSSL_NO_PSK\n    OPENSSL_free(c->psk_identity_hint);\n#endif\n    CRYPTO_THREAD_lock_free(c->lock);\n    OPENSSL_free(c);\n}', 'int SSL_CTX_up_ref(SSL_CTX *ctx)\n{\n    int i;\n    if (CRYPTO_UP_REF(&ctx->references, &i, ctx->lock) <= 0)\n        return 0;\n    REF_PRINT_COUNT("SSL_CTX", ctx);\n    REF_ASSERT_ISNT(i < 2);\n    return ((i > 1) ? 1 : 0);\n}', 'static ossl_inline int CRYPTO_UP_REF(_Atomic int *val, int *ret, void *lock)\n{\n    *ret = atomic_fetch_add_explicit(val, 1, memory_order_relaxed) + 1;\n    return 1;\n}', 'unsigned long SSL_clear_options(SSL *s, unsigned long op)\n{\n    return s->options &= ~op;\n}', 'unsigned long SSL_CTX_get_options(const SSL_CTX *ctx)\n{\n    return ctx->options;\n}', 'unsigned long SSL_set_options(SSL *s, unsigned long op)\n{\n    return s->options |= op;\n}']