/openssl/test/certs/ |
H A D | mkcert.sh | 92 local exts=$1; shift 96 -extfile <(printf "%s\n" "$exts") "$@" 111 exts=$(printf "%s\nextendedKeyUsage = %s\n" "$exts" "$eku") 145 exts=$(printf "%s\nextendedKeyUsage = %s\n" "$exts" "$purpose") 148 exts=$(printf "%s\nnameConstraints = %s\n" "$exts" "$NC") 151 exts=$(printf "%s\ncertificatePolicies = %s\n" "$exts" "$certpol") 169 exts=$(printf "%s\n%s\n%s\n" "$skid" "$akid") 170 exts=$(printf "%s\nkeyUsage = %s\n" "$exts" "keyCertSign, cRLSign") 173 exts=$(printf "%s\nextendedKeyUsage = %s\n" "$exts" "$eku") 192 exts=$(printf "%s\n%s\n%s\n%s\n" \ [all …]
|
/openssl/ssl/statem/ |
H A D | extensions_cust.c | 187 meth = exts->meths + i; in custom_ext_add() 336 for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) { in custom_exts_free() 344 OPENSSL_free(exts->meths); in custom_exts_free() 345 exts->meths = NULL; in custom_exts_free() 346 exts->meths_count = 0; in custom_exts_free() 374 if (exts == NULL) in ossl_tls_add_custom_ext_intern() 375 exts = &ctx->cert->custext; in ossl_tls_add_custom_ext_intern() 404 tmp = OPENSSL_realloc(exts->meths, in ossl_tls_add_custom_ext_intern() 409 exts->meths = tmp; in ossl_tls_add_custom_ext_intern() 410 meth = exts->meths + exts->meths_count; in ossl_tls_add_custom_ext_intern() [all …]
|
H A D | extensions.c | 464 RAW_EXTENSION *exts) in tls_validate_all_contexts() argument 479 for (thisext = exts, i = 0; i < num_exts; i++, thisext++) { in tls_validate_all_contexts() 614 custom_ext_methods *exts = &s->cert->custext; in tls_collect_extensions() local 627 num_exts = OSSL_NELEM(ext_defs) + (exts != NULL ? exts->meths_count : 0); in tls_collect_extensions() 650 if (!verify_extension(s, context, type, exts, raw_extensions, &thisex) in tls_collect_extensions() 740 RAW_EXTENSION *exts, X509 *x, size_t chainidx) in tls_parse_extension() argument 742 RAW_EXTENSION *currext = &exts[idx]; in tls_parse_extension() 790 RAW_EXTENSION *exts, X509 *x, in tls_parse_all_extensions() argument 801 if (!tls_parse_extension(s, i, context, exts, x, chainidx)) { in tls_parse_all_extensions() 815 && !thisexd->final(s, context, exts[i].present)) { in tls_parse_all_extensions()
|
H A D | extensions_srvr.c | 323 PACKET responder_id_list, exts; in tls_parse_ctos_status_request() local 401 if (!PACKET_as_length_prefixed_2(pkt, &exts)) { in tls_parse_ctos_status_request() 406 if (PACKET_remaining(&exts) > 0) { in tls_parse_ctos_status_request() 407 const unsigned char *ext_data = PACKET_data(&exts); in tls_parse_ctos_status_request() 409 sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, in tls_parse_ctos_status_request() 411 s->ext.ocsp.exts = in tls_parse_ctos_status_request() 412 d2i_X509_EXTENSIONS(NULL, &ext_data, (int)PACKET_remaining(&exts)); in tls_parse_ctos_status_request() 413 if (s->ext.ocsp.exts == NULL || ext_data != PACKET_end(&exts)) { in tls_parse_ctos_status_request()
|
/openssl/crypto/x509/ |
H A D | x509_req.c | 144 STACK_OF(X509_EXTENSION) *exts = NULL; in STACK_OF() 150 exts = get_extensions_by_nid(req, *pnid); in STACK_OF() 151 if (exts == NULL) in STACK_OF() 153 if (sk_X509_EXTENSION_num(exts) > 0) in STACK_OF() 154 return exts; in STACK_OF() 155 sk_X509_EXTENSION_free(exts); in STACK_OF() 166 const STACK_OF(X509_EXTENSION) *exts, int nid) in X509_REQ_add_extensions_nid() 174 if (sk_X509_EXTENSION_num(exts) <= 0) in X509_REQ_add_extensions_nid() 181 if (X509v3_add_extensions(&mod_exts, exts) == NULL) in X509_REQ_add_extensions_nid() 187 (mod_exts == NULL ? exts : mod_exts), in X509_REQ_add_extensions_nid() [all …]
|
H A D | t_req.c | 43 STACK_OF(X509_EXTENSION) *exts; in X509_REQ_print_ex() 167 exts = X509_REQ_get_extensions(x); in X509_REQ_print_ex() 168 if (exts) { in X509_REQ_print_ex() 171 for (i = 0; i < sk_X509_EXTENSION_num(exts); i++) { in X509_REQ_print_ex() 175 ex = sk_X509_EXTENSION_value(exts, i); in X509_REQ_print_ex() 193 sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free); in X509_REQ_print_ex()
|
H A D | t_acert.c | 234 const STACK_OF(X509_EXTENSION) *exts; in X509_ACERT_print_ex() 236 exts = X509_ACERT_get0_extensions(x); in X509_ACERT_print_ex() 237 if (exts != NULL) { in X509_ACERT_print_ex() 240 for (i = 0; i < sk_X509_EXTENSION_num(exts); i++) { in X509_ACERT_print_ex() 245 ex = sk_X509_EXTENSION_value(exts, i); in X509_ACERT_print_ex()
|
H A D | x_crl.c | 94 STACK_OF(X509_EXTENSION) *exts; 135 exts = rev->extensions; 137 for (j = 0; j < sk_X509_EXTENSION_num(exts); j++) { 138 ext = sk_X509_EXTENSION_value(exts, j); 162 STACK_OF(X509_EXTENSION) *exts; in crl_cb() 233 exts = crl->crl.extensions; in crl_cb() 235 for (idx = 0; idx < sk_X509_EXTENSION_num(exts); idx++) { in crl_cb() 237 ext = sk_X509_EXTENSION_value(exts, idx); in crl_cb()
|
H A D | v3_prn.c | 140 const STACK_OF(X509_EXTENSION) *exts, in X509V3_extensions_print() 145 if (sk_X509_EXTENSION_num(exts) <= 0) in X509V3_extensions_print() 153 for (i = 0; i < sk_X509_EXTENSION_num(exts); i++) { in X509V3_extensions_print() 157 ex = sk_X509_EXTENSION_value(exts, i); in X509V3_extensions_print()
|
H A D | x509_v3.c | 147 const STACK_OF(X509_EXTENSION) *exts) in STACK_OF() 156 for (i = 0; i < sk_X509_EXTENSION_num(exts); i++) { in STACK_OF() 157 X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i); in STACK_OF()
|
H A D | v3_conf.c | 388 STACK_OF(X509_EXTENSION) *exts = NULL; in X509V3_EXT_REQ_add_nconf() 389 int ret = X509V3_EXT_add_nconf_sk(conf, ctx, section, &exts); in X509V3_EXT_REQ_add_nconf() 391 if (ret && req != NULL && exts != NULL) in X509V3_EXT_REQ_add_nconf() 392 ret = X509_REQ_add_extensions(req, exts); in X509V3_EXT_REQ_add_nconf() 393 sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free); in X509V3_EXT_REQ_add_nconf()
|
H A D | v3_utl.c | 488 STACK_OF(X509_EXTENSION) *exts; in STACK_OF() 491 exts = X509_REQ_get_extensions(x); in STACK_OF() 492 gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL); in STACK_OF() 495 sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free); in STACK_OF()
|
/openssl/test/recipes/25-test_eai_data/ |
H A D | kdc.sh | 13 exts=$( 34 printf "%s\n" "$exts" 41 -extfile <(printf "%s\n" "$exts")
|
/openssl/doc/man3/ |
H A D | X509_REQ_get_extensions.pod | 14 int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts); 16 const STACK_OF(X509_EXTENSION) *exts, int nid); 25 X509_REQ_add_extensions_nid() adds to I<req> a list of X.509 extensions I<exts>, 27 I<req> is unchanged if I<exts> is NULL or an empty list.
|
H A D | OSSL_CRMF_MSG_set0_validity.pod | 29 int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts); 58 OSSL_CRMF_MSG_set0_extensions() sets I<exts> as the extensions in the 59 certTemplate of I<crm>. Frees any pre-existing ones and consumes I<exts>.
|
H A D | SSL_CTX_set_client_hello_cb.pod | 21 int SSL_client_hello_get_extension_order(SSL *s, uint16_t *exts, 75 When called with B<exts> set to NULL, returns the number of extensions 76 (e.g., to allocate storage for a subsequent call). Otherwise, B<*exts> is populated 82 A subsequent call with B<exts> set to NULL can retrieve the size of storage needed.
|
H A D | X509v3_get_ext_by_NID.pod | 34 const STACK_OF(X509_EXTENSION) *exts); 90 X509v3_add_extensions() adds the list of extensions I<exts> to STACK I<*target>. 91 The STACK I<*target> is returned unchanged if I<exts> is NULL or an empty list.
|
/openssl/test/recipes/ |
H A D | tconversion.pl | 168 my ($cert, $expected, $exts, $name) = @_; 170 run(app(["openssl", "x509", "-noout", "-ext", $exts, 173 "$cert '$exts' output should contain $expected different lines");
|
/openssl/apps/ |
H A D | x509.c | 208 STACK_OF(X509_EXTENSION) *exts; in x509_to_req() 220 if ((exts = sk_X509_EXTENSION_new_reserve(NULL, n)) == NULL) in x509_to_req() 227 && !sk_X509_EXTENSION_push(exts, ex)) in x509_to_req() 231 if (sk_X509_EXTENSION_num(exts) > 0) { in x509_to_req() 233 && !X509_REQ_add_extensions(req, exts)) { in x509_to_req() 238 sk_X509_EXTENSION_free(exts); in x509_to_req() 242 sk_X509_EXTENSION_free(exts); in x509_to_req() 1249 const STACK_OF(X509_EXTENSION) *exts = NULL; in print_x509v3_exts() 1257 exts = X509_get0_extensions(x); in print_x509v3_exts() 1258 if ((num = sk_X509_EXTENSION_num(exts)) <= 0) { in print_x509v3_exts() [all …]
|
/openssl/crypto/cmp/ |
H A D | cmp_msg.c | 286 X509_EXTENSIONS *exts = NULL; in OSSL_CMP_CTX_setup_CRM() local 325 && (exts = X509_REQ_get_extensions(ctx->p10CSR)) == NULL) in OSSL_CMP_CTX_setup_CRM() 331 && !add1_extension(&exts, NID_subject_alt_name, crit, default_sans)) in OSSL_CMP_CTX_setup_CRM() 334 && X509v3_add_extensions(&exts, ctx->reqExtensions) == NULL) in OSSL_CMP_CTX_setup_CRM() 337 && !add1_extension(&exts, NID_subject_alt_name, in OSSL_CMP_CTX_setup_CRM() 341 && !add1_extension(&exts, NID_certificate_policies, in OSSL_CMP_CTX_setup_CRM() 344 if (!OSSL_CRMF_MSG_set0_extensions(crm, exts)) in OSSL_CMP_CTX_setup_CRM() 346 exts = NULL; in OSSL_CMP_CTX_setup_CRM() 371 sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free); in OSSL_CMP_CTX_setup_CRM()
|
H A D | cmp_ctx.c | 154 #define X509_EXTENSIONS_free(exts) \ argument 155 sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free) 633 int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts) 640 if (sk_GENERAL_NAME_num(ctx->subjectAltNames) > 0 && exts != NULL 641 && X509v3_get_ext_by_NID(exts, NID_subject_alt_name, -1) >= 0) { 646 ctx->reqExtensions = exts;
|
/openssl/crypto/crmf/ |
H A D | crmf_lib.c | 315 X509_EXTENSIONS *exts) in OSSL_CRMF_MSG_set0_extensions() argument 324 if (sk_X509_EXTENSION_num(exts) == 0) { in OSSL_CRMF_MSG_set0_extensions() 325 sk_X509_EXTENSION_free(exts); in OSSL_CRMF_MSG_set0_extensions() 326 exts = NULL; /* do not include empty extensions list */ in OSSL_CRMF_MSG_set0_extensions() 330 tmpl->extensions = exts; in OSSL_CRMF_MSG_set0_extensions()
|
/openssl/test/ |
H A D | cmp_ctx_test.c | 221 X509_EXTENSIONS *exts = NULL; in execute_CTX_reqExtensions_have_SAN_test() local 233 || !TEST_ptr(exts = sk_X509_EXTENSION_new_null()) in execute_CTX_reqExtensions_have_SAN_test() 234 || !TEST_true(sk_X509_EXTENSION_push(exts, ext)) in execute_CTX_reqExtensions_have_SAN_test() 235 || !TEST_true(OSSL_CMP_CTX_set0_reqExtensions(ctx, exts))) { in execute_CTX_reqExtensions_have_SAN_test() 237 sk_X509_EXTENSION_free(exts); in execute_CTX_reqExtensions_have_SAN_test() 241 ext = sk_X509_EXTENSION_pop(exts); in execute_CTX_reqExtensions_have_SAN_test()
|
/openssl/crypto/ocsp/ |
H A D | ocsp_ext.c | 244 static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, in ocsp_add1_nonce() argument 271 if (X509V3_add1_i2d(exts, NID_id_pkix_OCSP_Nonce, in ocsp_add1_nonce()
|
/openssl/crypto/ts/ |
H A D | ts_rsp_sign.c | 608 STACK_OF(X509_EXTENSION) *exts = ctx->request->extensions; in ts_RESP_process_extensions() 612 for (i = 0; ok && i < sk_X509_EXTENSION_num(exts); ++i) { in ts_RESP_process_extensions() 613 X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, i); in ts_RESP_process_extensions()
|