/openssl/crypto/objects/ |
H A D | obj_dat.pl | 53 my %nid; 80 $nid{$d} = $1; 113 if (!defined $nid{$i}) { 118 my $sn = defined $sn{$nid{$i}} ? "$sn{$nid{$i}}" : "NULL"; 119 my $ln = defined $ln{$nid{$i}} ? "$ln{$nid{$i}}" : "NULL"; 122 $sn{$nid{$i}} = $ln; 126 $ln{$nid{$i}} = $sn; 130 if (defined $obj{$nid{$i}} && $objd{$obj{$nid{$i}}} =~ /,/) { 186 foreach (sort { $sn{$nid{$a}} cmp $sn{$nid{$b}} } @a) { 197 foreach (sort { $ln{$nid{$a}} cmp $ln{$nid{$b}} } @a) { [all …]
|
H A D | obj_dat.c | 185 return a->nid - b->nid; in added_obj_cmp() 201 a->obj->nid++; in cleanup2_doall() 319 return o->nid; in ossl_obj_add_object() 341 ob.nid = n; in OBJ_nid2obj() 411 nid = adp->obj->nid; in ossl_obj_obj2nid() 414 return nid; in ossl_obj_obj2nid() 633 return nid; in OBJ_txt2nid() 657 nid = adp->obj->nid; in OBJ_ln2nid() 660 return nid; in OBJ_ln2nid() 684 nid = adp->obj->nid; in OBJ_sn2nid() [all …]
|
H A D | objects.pl | 34 if (defined($nid{$Cname})) 35 …{ die "$ARGV[1]:$o:There's already an object with name ",$Cname," on line ",$order{$nid{$Cname}},"… 36 $nid{$Cname} = $mynum; 119 if (!defined($nid{$Cname})) 122 $nid{$Cname} = $max_nid; 175 print expand("#define NID_$Cname\t\t$nid{$Cname}\n") if $nid{$Cname} ne "";
|
/openssl/crypto/x509/ |
H A D | x509_ext.c | 24 int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos) in X509_CRL_get_ext_by_NID() argument 26 return X509v3_get_ext_by_NID(x->crl.extensions, nid, lastpos); in X509_CRL_get_ext_by_NID() 52 return X509V3_get_d2i(x->crl.extensions, nid, crit, idx); in X509_CRL_get_ext_d2i() 55 int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, in X509_CRL_add1_ext_i2d() argument 71 int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos) in X509_get_ext_by_NID() argument 102 void *X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx) in X509_get_ext_d2i() argument 104 return X509V3_get_d2i(x->cert_info.extensions, nid, crit, idx); in X509_get_ext_d2i() 107 int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, in X509_add1_ext_i2d() argument 121 return X509v3_get_ext_by_NID(x->extensions, nid, lastpos); in X509_REVOKED_get_ext_by_NID() 152 return X509V3_get_d2i(x->extensions, nid, crit, idx); in X509_REVOKED_get_ext_d2i() [all …]
|
H A D | v3_lib.c | 52 const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid) in X509V3_EXT_get_nid() argument 58 if (nid < 0) in X509V3_EXT_get_nid() 60 tmp.ext_nid = nid; in X509V3_EXT_get_nid() 75 int nid; in X509V3_EXT_get() local 76 if ((nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext))) == NID_undef) in X509V3_EXT_get() 78 return X509V3_EXT_get_nid(nid); in X509V3_EXT_get() 163 void *X509V3_get_d2i(const STACK_OF(X509_EXTENSION) *x, int nid, int *crit, in X509V3_get_d2i() argument 184 if (OBJ_obj2nid(X509_EXTENSION_get_object(ex)) == nid) { in X509V3_get_d2i() 219 int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, in X509V3_add1_i2d() argument 232 extidx = X509v3_get_ext_by_NID(*x, nid, -1); in X509V3_add1_i2d() [all …]
|
H A D | x509_req.c | 99 int i, nid; in X509_REQ_extension_nid() local 102 nid = ext_nids[i]; in X509_REQ_extension_nid() 103 if (nid == NID_undef) in X509_REQ_extension_nid() 105 else if (req_nid == nid) in X509_REQ_extension_nid() 121 int nid) in STACK_OF() 126 int idx = X509_REQ_get_attr_by_NID(req, nid, -1); in STACK_OF() 177 loc = X509at_get_attr_by_NID(req->req_info.attributes, nid, -1); in X509_REQ_add_extensions_nid() 179 if ((mod_exts = get_extensions_by_nid(req, nid)) == NULL) in X509_REQ_add_extensions_nid() 220 int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos) in X509_REQ_get_attr_by_NID() argument 278 int nid, int type, in X509_REQ_add1_attr_by_NID() argument [all …]
|
/openssl/crypto/asn1/ |
H A D | a_strnid.c | 90 tbl = ASN1_STRING_TABLE_get(nid); in ASN1_STRING_set_by_NID() 115 return (*a)->nid - (*b)->nid; in sk_table_cmp() 122 return a->nid - b->nid; in table_cmp() 127 ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid) in ASN1_STRING_TABLE_get() argument 137 fnd.nid = nid; in ASN1_STRING_TABLE_get() 153 static ASN1_STRING_TABLE *stable_get(int nid) in stable_get() argument 163 tmp = ASN1_STRING_TABLE_get(nid); in stable_get() 173 rv->nid = tmp->nid; in stable_get() 179 rv->nid = nid; in stable_get() 187 int ASN1_STRING_TABLE_add(int nid, in ASN1_STRING_TABLE_add() argument [all …]
|
H A D | asn_mstbl.c | 60 int nid, i, rv = 0; in do_tcreate() local 65 nid = OBJ_sn2nid(name); in do_tcreate() 66 if (nid == NID_undef) in do_tcreate() 67 nid = OBJ_ln2nid(name); in do_tcreate() 68 if (nid == NID_undef) in do_tcreate() 110 rv = ASN1_STRING_TABLE_add(nid, tbl_min, tbl_max, in do_tcreate()
|
/openssl/crypto/evp/ |
H A D | ec_support.c | 17 int nid; member 118 const char *OSSL_EC_curve_nid2name(int nid) in OSSL_EC_curve_nid2name() argument 122 if (nid <= 0) in OSSL_EC_curve_nid2name() 126 if (curve_list[i].nid == nid) in OSSL_EC_curve_nid2name() 135 int nid; in ossl_ec_curve_name2nid() local 138 if ((nid = ossl_ec_curve_nist2nid_int(name)) != NID_undef) in ossl_ec_curve_name2nid() 139 return nid; in ossl_ec_curve_name2nid() 143 return curve_list[i].nid; in ossl_ec_curve_name2nid() 170 const char *ossl_ec_curve_nid2nist_int(int nid) in ossl_ec_curve_nid2nist_int() argument 174 if (nist_curves[i].nid == nid) in ossl_ec_curve_nid2nist_int() [all …]
|
/openssl/crypto/cms/ |
H A D | cms_att.c | 40 int nid; /* The attribute id */ member 77 return X509at_get_attr_by_NID(si->signedAttrs, nid, lastpos); in CMS_signed_get_attr_by_NID() 142 int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, in CMS_unsigned_get_attr_by_NID() argument 181 int nid, int type, in CMS_unsigned_add1_attr_by_NID() argument 211 static X509_ATTRIBUTE *cms_attrib_get(int nid, in cms_attrib_get() argument 218 loc = X509at_get_attr_by_NID(attrs, nid, *lastpos); in cms_attrib_get() 227 static int cms_check_attribute(int nid, int flags, int type, in cms_check_attribute() argument 232 X509_ATTRIBUTE *at = cms_attrib_get(nid, attrs, &lastpos); in cms_check_attribute() 241 && cms_attrib_get(nid, attrs, &lastpos) != NULL) in cms_check_attribute() 275 int nid = cms_attribute_properties[i].nid; in ossl_cms_si_check_attributes() local [all …]
|
/openssl/test/ |
H A D | ssl_cert_table_internal_test.c | 21 #define test_cert_table(nid, amask, idx) \ argument 22 do_test_cert_table(nid, amask, idx, #idx) 24 static int do_test_cert_table(int nid, uint32_t amask, size_t idx, in do_test_cert_table() argument 29 if (clu->nid == nid && clu->amask == amask) in do_test_cert_table() 34 if (clu->nid != nid) in do_test_cert_table() 35 TEST_note("Expected %s, got %s\n", OBJ_nid2sn(nid), in do_test_cert_table() 36 OBJ_nid2sn(clu->nid)); in do_test_cert_table()
|
H A D | asn1_string_table_test.c | 21 int nid = 12345678, nid2 = 87654321, rv = 0, ret = 0; in test_string_tbl() local 23 tmp = ASN1_STRING_TABLE_get(nid); in test_string_tbl() 29 ret = ASN1_STRING_TABLE_add(nid, -1, -1, MBSTRING_ASC, 0); in test_string_tbl() 31 TEST_info("asn1 string table: add NID(%d) failed", nid); in test_string_tbl() 41 tmp = ASN1_STRING_TABLE_get(nid); in test_string_tbl() 43 TEST_info("asn1 string table: get NID(%d) failed", nid); in test_string_tbl() 56 tmp = ASN1_STRING_TABLE_get(nid); in test_string_tbl() 58 TEST_info("asn1 string table: get NID(%d) failed", nid); in test_string_tbl()
|
H A D | ecdsatest.c | 75 int nid, md_nid, ret = 0; in x9_62_tests() local 89 nid = ecdsa_cavs_kats[n].nid; in x9_62_tests() 100 if (EC_curve_nid2nist(nid) == NULL) in x9_62_tests() 111 || !TEST_ptr(key = EC_KEY_new_by_curve_name(nid)) in x9_62_tests() 196 int nid, ret = 0; in test_builtin() local 199 nid = curves[n].nid; in test_builtin() 202 if (nid == NID_ipsec4 || nid == NID_ipsec3) { in test_builtin() 211 if (nid == NID_sm2 && as == EVP_PKEY_EC) { in test_builtin() 213 OBJ_nid2sn(nid)); in test_builtin() 215 } else if (nid != NID_sm2 && as == EVP_PKEY_SM2) { in test_builtin() [all …]
|
/openssl/crypto/ocsp/ |
H A D | ocsp_ext.c | 28 int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos) in OCSP_REQUEST_get_ext_by_NID() argument 31 (x->tbsRequest.requestExtensions, nid, lastpos)); in OCSP_REQUEST_get_ext_by_NID() 65 return X509V3_add1_i2d(&x->tbsRequest.requestExtensions, nid, value, in OCSP_REQUEST_add1_ext_i2d() 82 int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos) in OCSP_ONEREQ_get_ext_by_NID() argument 111 return X509V3_get_d2i(x->singleRequestExtensions, nid, crit, idx); in OCSP_ONEREQ_get1_ext_d2i() 136 (x->tbsResponseData.responseExtensions, nid, lastpos)); in OCSP_BASICRESP_get_ext_by_NID() 173 return X509V3_add1_i2d(&x->tbsResponseData.responseExtensions, nid, in OCSP_BASICRESP_add1_ext_i2d() 192 return X509v3_get_ext_by_NID(x->singleExtensions, nid, lastpos); in OCSP_SINGLERESP_get_ext_by_NID() 220 return X509V3_get_d2i(x->singleExtensions, nid, crit, idx); in OCSP_SINGLERESP_get1_ext_d2i() 394 int nid; in OCSP_accept_responses_new() local [all …]
|
/openssl/crypto/engine/ |
H A D | eng_table.c | 19 int nid; member 57 return c->nid; in engine_pile_hash() 62 return a->nid - b->nid; in engine_pile_cmp() 103 tmplate.nid = *nids; in engine_table_register() 110 fnd->nid = *nids; in engine_table_register() 215 f, l, nid); in ossl_engine_table_select() 229 tmplate.nid = nid; in ossl_engine_table_select() 250 f, l, nid); in ossl_engine_table_select() 271 f, l, nid, ret->id); in ossl_engine_table_select() 285 f, l, nid, ret->id); in ossl_engine_table_select() [all …]
|
/openssl/crypto/dh/ |
H A D | dh_group_params.c | 35 dh->params.nid = ossl_ffc_named_group_get_uid(group); in dh_param_init() 40 DH *ossl_dh_new_by_nid_ex(OSSL_LIB_CTX *libctx, int nid) in ossl_dh_new_by_nid_ex() argument 44 if ((group = ossl_ffc_uid_to_dh_named_group(nid)) != NULL) in ossl_dh_new_by_nid_ex() 51 DH *DH_new_by_nid(int nid) in DH_new_by_nid() argument 53 return ossl_dh_new_by_nid_ex(NULL, nid); in DH_new_by_nid() 63 dh->params.nid = NID_undef; /* flush cached value */ in ossl_dh_cache_named_group() 76 dh->params.nid = ossl_ffc_named_group_get_uid(group); in ossl_dh_cache_named_group() 98 return dh->params.nid; in DH_get_nid()
|
H A D | dh_gen.c | 68 int nid; in ossl_dh_get_named_group_uid_from_size() local 72 nid = NID_ffdhe2048; in ossl_dh_get_named_group_uid_from_size() 75 nid = NID_ffdhe3072; in ossl_dh_get_named_group_uid_from_size() 78 nid = NID_ffdhe4096; in ossl_dh_get_named_group_uid_from_size() 81 nid = NID_ffdhe6144; in ossl_dh_get_named_group_uid_from_size() 84 nid = NID_ffdhe8192; in ossl_dh_get_named_group_uid_from_size() 90 return nid; in ossl_dh_get_named_group_uid_from_size() 99 int nid = ossl_dh_get_named_group_uid_from_size(prime_len); in dh_gen_named_group() local 101 if (nid == NID_undef) in dh_gen_named_group() 104 dh = ossl_dh_new_by_nid_ex(libctx, nid); in dh_gen_named_group()
|
/openssl/ssl/ |
H A D | tls_depr.c | 28 const EVP_CIPHER *tls_get_cipher_from_engine(int nid) in tls_get_cipher_from_engine() argument 38 eng = ENGINE_get_cipher_engine(nid); in tls_get_cipher_from_engine() 40 ret = ENGINE_get_cipher(eng, nid); in tls_get_cipher_from_engine() 47 const EVP_MD *tls_get_digest_from_engine(int nid) in tls_get_digest_from_engine() argument 57 eng = ENGINE_get_digest_engine(nid); in tls_get_digest_from_engine() 59 ret = ENGINE_get_digest(eng, nid); in tls_get_digest_from_engine() 177 int nid; in ssl_set_tmp_ecdh_groups() local 183 nid = EC_GROUP_get_curve_name(group); in ssl_set_tmp_ecdh_groups() 184 if (nid == NID_undef) in ssl_set_tmp_ecdh_groups() 186 return tls1_set_groups(pext, pextlen, &nid, 1); in ssl_set_tmp_ecdh_groups()
|
/openssl/crypto/pem/ |
H A D | pem_pk8.c | 22 int nid, const EVP_CIPHER *enc, 29 int nid, const EVP_CIPHER *enc, 41 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid, in PEM_write_bio_PKCS8PrivateKey_nid() argument 45 return do_pk8pkey(bp, x, 0, nid, NULL, kstr, klen, cb, u, NULL); in PEM_write_bio_PKCS8PrivateKey_nid() 62 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid, in i2d_PKCS8PrivateKey_nid_bio() argument 66 return do_pk8pkey(bp, x, 1, nid, NULL, kstr, klen, cb, u, NULL); in i2d_PKCS8PrivateKey_nid_bio() 69 static int do_pk8pkey(BIO *bp, const EVP_PKEY *x, int isder, int nid, in do_pk8pkey() argument 102 if (nid == -1 && OSSL_ENCODER_CTX_get_num_encoders(ctx) != 0) { in do_pk8pkey() 136 if (enc || (nid != -1)) { in do_pk8pkey() 215 int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid, in i2d_PKCS8PrivateKey_nid_fp() argument [all …]
|
/openssl/crypto/property/ |
H A D | property.c | 60 int nid; member 284 return ossl_sa_ALGORITHM_get(store->algs, nid); in ossl_method_store_retrieve() 366 ossl_method_cache_flush(store, nid); in ossl_method_store_add() 388 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_add() 394 alg->nid = nid; in ossl_method_store_add() 414 nid, properties, in ossl_method_store_add() 442 ossl_method_cache_flush(store, nid); in ossl_method_store_remove() 443 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_remove() 550 fn(alg->nid, impl->method.method, fnarg); in alg_do_one() 642 alg = ossl_method_store_retrieve(store, nid); in ossl_method_store_fetch() [all …]
|
/openssl/engines/ |
H A D | e_devcrypto.c | 117 int nid; member 174 if (nid == cipher_data[i].nid) in find_cipher_data_index() 179 static size_t get_cipher_data_index(int nid) in get_cipher_data_index() argument 181 size_t i = find_cipher_data_index(nid); in get_cipher_data_index() 530 cipher_data[i].nid; in prepare_cipher_methods() 549 size_t i = get_cipher_data_index(nid); in get_cipher_method() 562 static void destroy_cipher_method(int nid) in destroy_cipher_method() argument 587 *cipher = get_cipher_method(nid); in devcrypto_ciphers() 683 int nid; member 716 if (nid == digest_data[i].nid) in find_digest_data_index() [all …]
|
/openssl/providers/common/ |
H A D | securitycheck_fips.c | 85 int nid = ossl_digest_get_approved_nid(md); in ossl_fips_ind_digest_exch_check() local 86 int approved = (nid != NID_undef && nid != NID_sha1); in ossl_fips_ind_digest_exch_check() 100 int nid, int sha1_allowed, in ossl_fips_ind_digest_sign_check() argument 106 if (nid == NID_undef) in ossl_fips_ind_digest_sign_check() 109 approved = sha1_allowed || nid != NID_sha1; in ossl_fips_ind_digest_sign_check()
|
/openssl/crypto/ec/ |
H A D | ec_check.c | 22 int nid; in EC_GROUP_check_named_curve() local 38 nid = ossl_ec_curve_nid_from_params(group, ctx); in EC_GROUP_check_named_curve() 39 if (nid > 0 && nist_only && EC_curve_nid2nist(nid) == NULL) in EC_GROUP_check_named_curve() 40 nid = NID_undef; in EC_GROUP_check_named_curve() 43 return nid; in EC_GROUP_check_named_curve()
|
H A D | ec_curve.c | 2828 int nid; member 3140 if (nid <= 0) in ec_curve_nid2curve() 3144 if (curve_list[i].nid == nid) in ec_curve_nid2curve() 3228 EC_GROUP_set_curve_name(group, curve.nid); in ec_group_new_from_data() 3334 EC_GROUP *EC_GROUP_new_by_curve_name(int nid) in EC_GROUP_new_by_curve_name() argument 3350 r[i].nid = curve_list[i].nid; in EC_get_builtin_curves() 3357 const char *EC_curve_nid2nist(int nid) in EC_curve_nid2nist() argument 3359 return ossl_ec_curve_nid2nist_int(nid); in EC_curve_nid2nist() 3389 nid = EC_GROUP_get_curve_name(group); in ossl_ec_curve_nid_from_params() 3452 && (nid <= 0 || nid == curve.nid) in ossl_ec_curve_nid_from_params() [all …]
|
/openssl/crypto/ |
H A D | core_namemap.c | 394 if (nid != NID_undef) { in get_legacy_evp_names() 395 num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid)); in get_legacy_evp_names() 396 num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid)); in get_legacy_evp_names() 397 if ((obj = OBJ_nid2obj(nid)) != NULL) { in get_legacy_evp_names() 427 int nid = 0, base_nid = 0, flags = 0; in get_legacy_pkey_meth_names() local 431 if (nid != NID_undef) { in get_legacy_pkey_meth_names() 433 switch (nid) { in get_legacy_pkey_meth_names() 436 get_legacy_evp_names(0, nid, "DHX", arg); in get_legacy_pkey_meth_names() 439 get_legacy_evp_names(0, nid, pem_name, arg); in get_legacy_pkey_meth_names() 447 switch (nid) { in get_legacy_pkey_meth_names() [all …]
|