Lines Matching full:x

16 int __X509_show_info(X509 *x)  in __X509_show_info()  argument
18 return X509_METHOD_CALL(show_info, x); in __X509_show_info()
27 X509 *x; in __X509_new() local
29 x = ssl_mem_zalloc(sizeof(X509)); in __X509_new()
30 if (!x) { in __X509_new()
31 SSL_DEBUG(SSL_X509_ERROR_LEVEL, "no enough memory > (x)"); in __X509_new()
35 x->ref_counter = 1; in __X509_new()
38 x->method = ix->method; in __X509_new()
40 x->method = X509_method(); in __X509_new()
42 ret = X509_METHOD_CALL(new, x, ix); in __X509_new()
48 return x; in __X509_new()
51 ssl_mem_free(x); in __X509_new()
67 void X509_free(X509 *x) in X509_free() argument
69 SSL_ASSERT3(x); in X509_free()
71 if (--x->ref_counter > 0) { in X509_free()
75 X509_METHOD_CALL(free, x); in X509_free()
77 ssl_mem_free(x); in X509_free()
88 X509 *x; in d2i_X509() local
94 x = *cert; in d2i_X509()
96 x = X509_new(); in d2i_X509()
97 if (!x) { in d2i_X509()
104 ret = X509_METHOD_CALL(load, x, buffer, len); in d2i_X509()
110 return x; in d2i_X509()
114 X509_free(x); in d2i_X509()
153 int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x) in SSL_CTX_add_client_CA() argument
156 SSL_ASSERT1(x); in SSL_CTX_add_client_CA()
158 if (ctx->client_CA == x) in SSL_CTX_add_client_CA()
163 ctx->client_CA = x; in SSL_CTX_add_client_CA()
171 int SSL_add_client_CA(SSL *ssl, X509 *x) in SSL_add_client_CA() argument
174 SSL_ASSERT1(x); in SSL_add_client_CA()
176 if (ssl->client_CA == x) in SSL_add_client_CA()
181 ssl->client_CA = x; in SSL_add_client_CA()
189 int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) in SSL_CTX_use_certificate() argument
192 SSL_ASSERT1(x); in SSL_CTX_use_certificate()
194 if (ctx->cert->x509 == x) in SSL_CTX_use_certificate()
199 ctx->cert->x509 = x; in SSL_CTX_use_certificate()
200 x->ref_counter++; in SSL_CTX_use_certificate()
208 int SSL_use_certificate(SSL *ssl, X509 *x) in SSL_use_certificate() argument
211 SSL_ASSERT1(x); in SSL_use_certificate()
213 if (ssl->cert->x509 == x) in SSL_use_certificate()
218 ssl->cert->x509 = x; in SSL_use_certificate()
223 long SSL_CTX_add_extra_chain_cert(SSL_CTX *ctx, X509 *x) in SSL_CTX_add_extra_chain_cert() argument
225 return SSL_CTX_use_certificate(ctx, x); in SSL_CTX_add_extra_chain_cert()
245 X509 *x; in SSL_CTX_use_certificate_ASN1() local
247 x = d2i_X509(NULL, d, len); in SSL_CTX_use_certificate_ASN1()
248 if (!x) { in SSL_CTX_use_certificate_ASN1()
253 ret = SSL_CTX_use_certificate(ctx, x); // This uses the "x" so increments ref_count in SSL_CTX_use_certificate_ASN1()
259 X509_free(x); // decrements ref_count, so in case of happy flow doesn't free the "x" in SSL_CTX_use_certificate_ASN1()
263 X509_free(x); in SSL_CTX_use_certificate_ASN1()
275 X509 *x; in SSL_use_certificate_ASN1() local
277 x = d2i_X509(NULL, d, len); in SSL_use_certificate_ASN1()
278 if (!x) { in SSL_use_certificate_ASN1()
283 ret = SSL_use_certificate(ssl, x); in SSL_use_certificate_ASN1()
292 X509_free(x); in SSL_use_certificate_ASN1()
326 int X509_STORE_add_cert(X509_STORE *store, X509 *x) { in X509_STORE_add_cert() argument
328 x->ref_counter++; in X509_STORE_add_cert()
332 SSL_ASSERT1(x); in X509_STORE_add_cert()
334 if (ctx->client_CA == x) { in X509_STORE_add_cert()
342 ctx->client_CA = x; in X509_STORE_add_cert()
355 X509 *x; in PEM_read_bio_X509() local
362 x = *cert; in PEM_read_bio_X509()
364 x = X509_new(); in PEM_read_bio_X509()
365 if (!x) { in PEM_read_bio_X509()
372 ret = X509_METHOD_CALL(load, x, bp->data, bp->dlen); in PEM_read_bio_X509()
381 return x; in PEM_read_bio_X509()
385 X509_free(x); in PEM_read_bio_X509()