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


test/handshake_helper.c:142:1: start of procedure early_select_server_ctx()
140.   }
141.   
142. > static int early_select_server_ctx(SSL *s, void *arg, int ignore)
143.   {
144.       const char *servername;

test/handshake_helper.c:147:5: 
145.       const unsigned char *p;
146.       size_t len, remaining;
147. >     HANDSHAKE_EX_DATA *ex_data =
148.           (HANDSHAKE_EX_DATA*)(SSL_get_ex_data(s, ex_data_idx));
149.   

ssl/ssl_lib.c:3738:1: start of procedure SSL_get_ex_data()
  3736.   }
  3737.   
  3738. > void *SSL_get_ex_data(const SSL *s, int idx)
  3739.   {
  3740.       return (CRYPTO_get_ex_data(&s->ex_data, idx));

ssl/ssl_lib.c:3740:5: 
  3738.   void *SSL_get_ex_data(const SSL *s, int idx)
  3739.   {
  3740. >     return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3741.   }
  3742.   

crypto/ex_data.c:387:1: start of procedure CRYPTO_get_ex_data()
    385.    * particular index in the class used by this variable
    386.    */
    387. > void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    388.   {
    389.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))

crypto/ex_data.c:389:9: Taking true branch
    387.   void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
    388.   {
    389.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
                   ^
    390.           return NULL;
    391.       return sk_void_value(ad->sk, idx);

crypto/ex_data.c:390:9: 
    388.   {
    389.       if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
    390. >         return NULL;
    391.       return sk_void_value(ad->sk, idx);
    392.   }

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

ssl/ssl_lib.c:3741:1: return from a call to SSL_get_ex_data
  3739.   {
  3740.       return (CRYPTO_get_ex_data(&s->ex_data, idx));
  3741. > }
  3742.   
  3743.   int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)

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

test/handshake_helper.c:155:9: Taking false branch
153.        */
154.       if (!SSL_early_get0_ext(s, TLSEXT_TYPE_server_name, &p, &remaining) ||
155.           remaining <= 2)
               ^
156.           return 0;
157.       /* Extract the length of the supplied list of names. */

test/handshake_helper.c:158:5: 
156.           return 0;
157.       /* Extract the length of the supplied list of names. */
158. >     len = (*(p++) << 1);
159.       len += *(p++);
160.       if (len + 2 != remaining)

test/handshake_helper.c:159:5: 
157.       /* Extract the length of the supplied list of names. */
158.       len = (*(p++) << 1);
159. >     len += *(p++);
160.       if (len + 2 != remaining)
161.           return 0;

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

test/handshake_helper.c:162:5: 
160.       if (len + 2 != remaining)
161.           return 0;
162. >     remaining = len;
163.       /*
164.        * The list in practice only has a single element, so we only consider

test/handshake_helper.c:167:9: Taking false branch
165.        * the first one.
166.        */
167.       if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
               ^
168.           return 0;
169.       remaining--;

test/handshake_helper.c:167:27: Taking false branch
165.        * the first one.
166.        */
167.       if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
                                 ^
168.           return 0;
169.       remaining--;

test/handshake_helper.c:169:5: 
167.       if (remaining == 0 || *p++ != TLSEXT_NAMETYPE_host_name)
168.           return 0;
169. >     remaining--;
170.       /* Now we can finally pull out the byte array with the actual hostname. */
171.       if (remaining <= 2)

test/handshake_helper.c:171:9: Taking false branch
169.       remaining--;
170.       /* Now we can finally pull out the byte array with the actual hostname. */
171.       if (remaining <= 2)
               ^
172.           return 0;
173.       len = (*(p++) << 1);

test/handshake_helper.c:173:5: 
171.       if (remaining <= 2)
172.           return 0;
173. >     len = (*(p++) << 1);
174.       len += *(p++);
175.       if (len + 2 > remaining)

test/handshake_helper.c:174:5: 
172.           return 0;
173.       len = (*(p++) << 1);
174. >     len += *(p++);
175.       if (len + 2 > remaining)
176.           return 0;

test/handshake_helper.c:175:9: Taking false branch
173.       len = (*(p++) << 1);
174.       len += *(p++);
175.       if (len + 2 > remaining)
               ^
176.           return 0;
177.       remaining = len;

test/handshake_helper.c:177:5: 
175.       if (len + 2 > remaining)
176.           return 0;
177. >     remaining = len;
178.       servername = (const char *)p;
179.   

test/handshake_helper.c:178:5: 
176.           return 0;
177.       remaining = len;
178. >     servername = (const char *)p;
179.   
180.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {

test/handshake_helper.c:180:9: Taking true branch
178.       servername = (const char *)p;
179.   
180.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
               ^
181.           SSL_CTX *new_ctx = arg;
182.           SSL_set_SSL_CTX(s, new_ctx);

test/handshake_helper.c:180:37: Taking true branch
178.       servername = (const char *)p;
179.   
180.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
                                           ^
181.           SSL_CTX *new_ctx = arg;
182.           SSL_set_SSL_CTX(s, new_ctx);

test/handshake_helper.c:181:9: 
179.   
180.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
181. >         SSL_CTX *new_ctx = arg;
182.           SSL_set_SSL_CTX(s, new_ctx);
183.           /*

test/handshake_helper.c:182:9: 
180.       if (len == strlen("server2") && strncmp(servername, "server2", len) == 0) {
181.           SSL_CTX *new_ctx = arg;
182. >         SSL_set_SSL_CTX(s, new_ctx);
183.           /*
184.            * Copy over all the SSL_CTX options - reasonable behavior

ssl/ssl_lib.c:3588:1: start of procedure SSL_set_SSL_CTX()
  3586.   }
  3587.   
  3588. > SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)
  3589.   {
  3590.       CERT *new_cert;

ssl/ssl_lib.c:3591:9: Taking false branch
  3589.   {
  3590.       CERT *new_cert;
  3591.       if (ssl->ctx == ctx)
                  ^
  3592.           return ssl->ctx;
  3593.       if (ctx == NULL)

ssl/ssl_lib.c:3593:9: Taking false branch
  3591.       if (ssl->ctx == ctx)
  3592.           return ssl->ctx;
  3593.       if (ctx == NULL)
                  ^
  3594.           ctx = ssl->session_ctx;
  3595.       new_cert = ssl_cert_dup(ctx->cert);

ssl/ssl_lib.c:3595:5: Skipping ssl_cert_dup(): empty list of specs
  3593.       if (ctx == NULL)
  3594.           ctx = ssl->session_ctx;
  3595.       new_cert = ssl_cert_dup(ctx->cert);
              ^
  3596.       if (new_cert == NULL) {
  3597.           return NULL;

ssl/ssl_lib.c:3596:9: Taking false branch
  3594.           ctx = ssl->session_ctx;
  3595.       new_cert = ssl_cert_dup(ctx->cert);
  3596.       if (new_cert == NULL) {
                  ^
  3597.           return NULL;
  3598.       }

ssl/ssl_lib.c:3600:10: Taking false branch
  3598.       }
  3599.   
  3600.       if (!custom_exts_copy_flags(&new_cert->custext, &ssl->cert->custext)) {
                   ^
  3601.           ssl_cert_free(new_cert);
  3602.           return NULL;

ssl/ssl_lib.c:3605:5: 
  3603.       }
  3604.   
  3605. >     ssl_cert_free(ssl->cert);
  3606.       ssl->cert = new_cert;
  3607.   

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

ssl/ssl_cert.c:235:9: Taking true branch
    233.       int i;
    234.   
    235.       if (c == NULL)
                   ^
    236.           return;
    237.   

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

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

ssl/ssl_lib.c:3606:5: 
  3604.   
  3605.       ssl_cert_free(ssl->cert);
  3606. >     ssl->cert = new_cert;
  3607.   
  3608.       /*

ssl/ssl_lib.c:3612:5: Condition is true
  3610.        * so setter APIs must prevent invalid lengths from entering the system.
  3611.        */
  3612.       OPENSSL_assert(ssl->sid_ctx_length <= sizeof(ssl->sid_ctx));
              ^
  3613.   
  3614.       /*

ssl/ssl_lib.c:3620:10: Taking false branch
  3618.        * leave it unchanged.
  3619.        */
  3620.       if ((ssl->ctx != NULL) &&
                   ^
  3621.           (ssl->sid_ctx_length == ssl->ctx->sid_ctx_length) &&
  3622.           (memcmp(ssl->sid_ctx, ssl->ctx->sid_ctx, ssl->sid_ctx_length) == 0)) {

ssl/ssl_lib.c:3627:5: 
  3625.       }
  3626.   
  3627. >     SSL_CTX_up_ref(ctx);
  3628.       SSL_CTX_free(ssl->ctx);     /* decrement reference count */
  3629.       ssl->ctx = ctx;

ssl/ssl_lib.c:2771:1: start of procedure SSL_CTX_up_ref()
    2769.   }
    2770.   
    2771. > int SSL_CTX_up_ref(SSL_CTX *ctx)
    2772.   {
    2773.       int i;

ssl/ssl_lib.c:2775:9: 
    2773.       int i;
    2774.   
    2775. >     if (CRYPTO_UP_REF(&ctx->references, &i, ctx->lock) <= 0)
    2776.           return 0;
    2777.   

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

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

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

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

ssl/ssl_lib.c:2775:9: Taking false branch
    2773.       int i;
    2774.   
    2775.       if (CRYPTO_UP_REF(&ctx->references, &i, ctx->lock) <= 0)
                    ^
    2776.           return 0;
    2777.   

ssl/ssl_lib.c:2780:14: Condition is false
    2778.       REF_PRINT_COUNT("SSL_CTX", ctx);
    2779.       REF_ASSERT_ISNT(i < 2);
    2780.       return ((i > 1) ? 1 : 0);
                         ^
    2781.   }
    2782.   

ssl/ssl_lib.c:2780:13: 
    2778.       REF_PRINT_COUNT("SSL_CTX", ctx);
    2779.       REF_ASSERT_ISNT(i < 2);
    2780. >     return ((i > 1) ? 1 : 0);
    2781.   }
    2782.   

ssl/ssl_lib.c:2780:5: 
    2778.       REF_PRINT_COUNT("SSL_CTX", ctx);
    2779.       REF_ASSERT_ISNT(i < 2);
    2780. >     return ((i > 1) ? 1 : 0);
    2781.   }
    2782.   

ssl/ssl_lib.c:2781:1: return from a call to SSL_CTX_up_ref
    2779.       REF_ASSERT_ISNT(i < 2);
    2780.       return ((i > 1) ? 1 : 0);
    2781. > }
    2782.   
    2783.   void SSL_CTX_free(SSL_CTX *a)

ssl/ssl_lib.c:3628:5: Skipping SSL_CTX_free(): empty list of specs
  3626.   
  3627.       SSL_CTX_up_ref(ctx);
  3628.       SSL_CTX_free(ssl->ctx);     /* decrement reference count */
              ^
  3629.       ssl->ctx = ctx;
  3630.   

ssl/ssl_lib.c:3629:5: 
  3627.       SSL_CTX_up_ref(ctx);
  3628.       SSL_CTX_free(ssl->ctx);     /* decrement reference count */
  3629. >     ssl->ctx = ctx;
  3630.   
  3631.       return ssl->ctx;

ssl/ssl_lib.c:3631:5: 
  3629.       ssl->ctx = ctx;
  3630.   
  3631. >     return ssl->ctx;
  3632.   }
  3633.   

ssl/ssl_lib.c:3632:1: return from a call to SSL_set_SSL_CTX
  3630.   
  3631.       return ssl->ctx;
  3632. > }
  3633.   
  3634.   int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)

test/handshake_helper.c:188:9: 
186.            * contexts differ/conflict
187.            */
188. >         SSL_clear_options(s, 0xFFFFFFFFL);
189.           SSL_set_options(s, SSL_CTX_get_options(new_ctx));
190.   

ssl/ssl_lib.c:4134:1: start of procedure SSL_clear_options()
  4132.   }
  4133.   
  4134. > unsigned long SSL_clear_options(SSL *s, unsigned long op)
  4135.   {
  4136.       return s->options &= ~op;

ssl/ssl_lib.c:4136:5: 
  4134.   unsigned long SSL_clear_options(SSL *s, unsigned long op)
  4135.   {
  4136. >     return s->options &= ~op;
  4137.   }
  4138.   

ssl/ssl_lib.c:4137:1: return from a call to SSL_clear_options
  4135.   {
  4136.       return s->options &= ~op;
  4137. > }
  4138.   
  4139.   STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s)

test/handshake_helper.c:189:9: 
187.            */
188.           SSL_clear_options(s, 0xFFFFFFFFL);
189. >         SSL_set_options(s, SSL_CTX_get_options(new_ctx));
190.   
191.           ex_data->servername = SSL_TEST_SERVERNAME_SERVER2;

ssl/ssl_lib.c:4109:1: start of procedure SSL_CTX_get_options()
  4107.    * control interface.
  4108.    */
  4109. > unsigned long SSL_CTX_get_options(const SSL_CTX *ctx)
  4110.   {
  4111.       return ctx->options;

ssl/ssl_lib.c:4111:5: 
  4109.   unsigned long SSL_CTX_get_options(const SSL_CTX *ctx)
  4110.   {
  4111. >     return ctx->options;
  4112.   }
  4113.   

ssl/ssl_lib.c:4112:1: return from a call to SSL_CTX_get_options
  4110.   {
  4111.       return ctx->options;
  4112. > }
  4113.   
  4114.   unsigned long SSL_get_options(const SSL *s)

ssl/ssl_lib.c:4124:1: start of procedure SSL_set_options()
  4122.   }
  4123.   
  4124. > unsigned long SSL_set_options(SSL *s, unsigned long op)
  4125.   {
  4126.       return s->options |= op;

ssl/ssl_lib.c:4126:5: 
  4124.   unsigned long SSL_set_options(SSL *s, unsigned long op)
  4125.   {
  4126. >     return s->options |= op;
  4127.   }
  4128.   

ssl/ssl_lib.c:4127:1: return from a call to SSL_set_options
  4125.   {
  4126.       return s->options |= op;
  4127. > }
  4128.   
  4129.   unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op)

test/handshake_helper.c:191:9: 
189.           SSL_set_options(s, SSL_CTX_get_options(new_ctx));
190.   
191. >         ex_data->servername = SSL_TEST_SERVERNAME_SERVER2;
192.           return 1;
193.       } 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    if (!custom_exts_copy_flags(&new_cert->custext, &ssl->cert->custext)) {\n        ssl_cert_free(new_cert);\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->ctype);\n    X509_STORE_free(c->verify_store);\n    X509_STORE_free(c->chain_store);\n    custom_exts_free(&c->custext);\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}']