| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/rsa/ |
| H A D | rsa_meth.c | 16 RSA_METHOD *meth = OPENSSL_zalloc(sizeof(*meth)); in RSA_meth_new() local 18 if (meth != NULL) { in RSA_meth_new() 19 meth->flags = flags; in RSA_meth_new() 21 meth->name = OPENSSL_strdup(name); in RSA_meth_new() 22 if (meth->name != NULL) in RSA_meth_new() 23 return meth; in RSA_meth_new() 25 OPENSSL_free(meth); in RSA_meth_new() 32 void RSA_meth_free(RSA_METHOD *meth) in RSA_meth_free() argument 34 if (meth != NULL) { in RSA_meth_free() 35 OPENSSL_free(meth->name); in RSA_meth_free() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/rsa/ |
| H A D | rsa_meth.c | 22 RSA_METHOD *meth = OPENSSL_zalloc(sizeof(*meth)); in RSA_meth_new() local 24 if (meth != NULL) { in RSA_meth_new() 25 meth->flags = flags; in RSA_meth_new() 27 meth->name = OPENSSL_strdup(name); in RSA_meth_new() 28 if (meth->name != NULL) in RSA_meth_new() 29 return meth; in RSA_meth_new() 31 OPENSSL_free(meth); in RSA_meth_new() 38 void RSA_meth_free(RSA_METHOD *meth) in RSA_meth_free() argument 40 if (meth != NULL) { in RSA_meth_free() 41 OPENSSL_free(meth->name); in RSA_meth_free() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/ec/ |
| H A D | ec_kmeth.c | 50 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth) in EC_KEY_set_default_method() argument 52 if (meth == NULL) in EC_KEY_set_default_method() 55 default_ec_key_meth = meth; in EC_KEY_set_default_method() 60 return key->meth; in EC_KEY_get_method() 63 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) in EC_KEY_set_method() argument 65 void (*finish)(EC_KEY *key) = key->meth->finish; in EC_KEY_set_method() 75 key->meth = meth; in EC_KEY_set_method() 76 if (meth->init != NULL) in EC_KEY_set_method() 77 return meth->init(key); in EC_KEY_set_method() 107 ret->meth = EC_KEY_get_default_method(); in ossl_ec_key_new_method_int() [all …]
|
| H A D | ecp_smpl.c | 174 if (group->meth->field_encode) { in ossl_ec_GFp_simple_group_set_curve() 175 if (!group->meth->field_encode(group, group->a, tmp_a, ctx)) in ossl_ec_GFp_simple_group_set_curve() 183 if (group->meth->field_encode) in ossl_ec_GFp_simple_group_set_curve() 184 if (!group->meth->field_encode(group, group->b, group->b, ctx)) in ossl_ec_GFp_simple_group_set_curve() 212 if (group->meth->field_decode) { in ossl_ec_GFp_simple_group_get_curve() 219 if (!group->meth->field_decode(group, a, group->a, ctx)) in ossl_ec_GFp_simple_group_get_curve() 223 if (!group->meth->field_decode(group, b, group->b, ctx)) in ossl_ec_GFp_simple_group_get_curve() 274 if (group->meth->field_decode) { in ossl_ec_GFp_simple_group_check_discriminant() 275 if (!group->meth->field_decode(group, a, group->a, ctx)) in ossl_ec_GFp_simple_group_check_discriminant() 277 if (!group->meth->field_decode(group, b, group->b, ctx)) in ossl_ec_GFp_simple_group_check_discriminant() [all …]
|
| H A D | ec_lib.c | 29 const EC_METHOD *meth) in ossl_ec_group_new_ex() argument 33 if (meth == NULL) { in ossl_ec_group_new_ex() 37 if (meth->group_init == 0) { in ossl_ec_group_new_ex() 56 ret->meth = meth; in ossl_ec_group_new_ex() 57 if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) { in ossl_ec_group_new_ex() 67 if (!meth->group_init(ret)) in ossl_ec_group_new_ex() 81 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) in EC_GROUP_new() argument 83 return ossl_ec_group_new_ex(NULL, NULL, meth); in EC_GROUP_new() 126 if (group->meth->group_finish != 0) in EC_GROUP_free() 127 group->meth->group_finish(group); in EC_GROUP_free() [all …]
|
| H A D | ec_oct.c | 27 if (group->meth->point_set_compressed_coordinates == NULL in EC_POINT_set_compressed_coordinates() 28 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_set_compressed_coordinates() 36 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_set_compressed_coordinates() 37 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_set_compressed_coordinates() 51 return group->meth->point_set_compressed_coordinates(group, point, x, in EC_POINT_set_compressed_coordinates() 77 if (group->meth->point2oct == 0 in EC_POINT_point2oct() 78 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_point2oct() 86 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_point2oct() 87 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_point2oct() 102 return group->meth->point2oct(group, point, form, buf, len, ctx); in EC_POINT_point2oct() [all …]
|
| H A D | ec_key.c | 55 if (ret->meth->set_group != NULL in EC_KEY_new_by_curve_name_ex() 56 && ret->meth->set_group(ret, ret->group) == 0) { in EC_KEY_new_by_curve_name_ex() 83 if (r->meth != NULL && r->meth->finish != NULL) in EC_KEY_free() 84 r->meth->finish(r); in EC_KEY_free() 90 if (r->group && r->group->meth->keyfinish) in EC_KEY_free() 91 r->group->meth->keyfinish(r); in EC_KEY_free() 111 if (src->meth != dest->meth) { in EC_KEY_copy() 112 if (dest->meth->finish != NULL) in EC_KEY_copy() 113 dest->meth->finish(dest); in EC_KEY_copy() 114 if (dest->group && dest->group->meth->keyfinish) in EC_KEY_copy() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/ec/ |
| H A D | ec_kmeth.c | 42 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth) in EC_KEY_set_default_method() argument 44 if (meth == NULL) in EC_KEY_set_default_method() 47 default_ec_key_meth = meth; in EC_KEY_set_default_method() 52 return key->meth; in EC_KEY_get_method() 55 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) in EC_KEY_set_method() argument 57 void (*finish)(EC_KEY *key) = key->meth->finish; in EC_KEY_set_method() 67 key->meth = meth; in EC_KEY_set_method() 68 if (meth->init != NULL) in EC_KEY_set_method() 69 return meth->init(key); in EC_KEY_set_method() 90 ret->meth = EC_KEY_get_default_method(); in EC_KEY_new_method() [all …]
|
| H A D | ec_lib.c | 20 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) in EC_GROUP_new() argument 24 if (meth == NULL) { in EC_GROUP_new() 28 if (meth->group_init == 0) { in EC_GROUP_new() 39 ret->meth = meth; in EC_GROUP_new() 40 if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) { in EC_GROUP_new() 50 if (!meth->group_init(ret)) in EC_GROUP_new() 99 if (group->meth->group_finish != 0) in EC_GROUP_free() 100 group->meth->group_finish(group); in EC_GROUP_free() 116 if (group->meth->group_clear_finish != 0) in EC_GROUP_clear_free() 117 group->meth->group_clear_finish(group); in EC_GROUP_clear_free() [all …]
|
| H A D | ec_key.c | 34 if (ret->meth->set_group != NULL in EC_KEY_new_by_curve_name() 35 && ret->meth->set_group(ret, ret->group) == 0) { in EC_KEY_new_by_curve_name() 55 if (r->meth != NULL && r->meth->finish != NULL) in EC_KEY_free() 56 r->meth->finish(r); in EC_KEY_free() 62 if (r->group && r->group->meth->keyfinish) in EC_KEY_free() 63 r->group->meth->keyfinish(r); in EC_KEY_free() 80 if (src->meth != dest->meth) { in EC_KEY_copy() 81 if (dest->meth->finish != NULL) in EC_KEY_copy() 82 dest->meth->finish(dest); in EC_KEY_copy() 83 if (dest->group && dest->group->meth->keyfinish) in EC_KEY_copy() [all …]
|
| H A D | ecp_smpl.c | 167 if (group->meth->field_encode) { in ec_GFp_simple_group_set_curve() 168 if (!group->meth->field_encode(group, group->a, tmp_a, ctx)) in ec_GFp_simple_group_set_curve() 176 if (group->meth->field_encode) in ec_GFp_simple_group_set_curve() 177 if (!group->meth->field_encode(group, group->b, group->b, ctx)) in ec_GFp_simple_group_set_curve() 205 if (group->meth->field_decode) { in ec_GFp_simple_group_get_curve() 212 if (!group->meth->field_decode(group, a, group->a, ctx)) in ec_GFp_simple_group_get_curve() 216 if (!group->meth->field_decode(group, b, group->b, ctx)) in ec_GFp_simple_group_get_curve() 267 if (group->meth->field_decode) { in ec_GFp_simple_group_check_discriminant() 268 if (!group->meth->field_decode(group, a, group->a, ctx)) in ec_GFp_simple_group_check_discriminant() 270 if (!group->meth->field_decode(group, b, group->b, ctx)) in ec_GFp_simple_group_check_discriminant() [all …]
|
| H A D | ec_oct.c | 21 if (group->meth->point_set_compressed_coordinates == NULL in EC_POINT_set_compressed_coordinates() 22 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_set_compressed_coordinates() 32 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_set_compressed_coordinates() 33 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_set_compressed_coordinates() 48 return group->meth->point_set_compressed_coordinates(group, point, x, in EC_POINT_set_compressed_coordinates() 74 if (group->meth->point2oct == 0 in EC_POINT_point2oct() 75 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { in EC_POINT_point2oct() 83 if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) { in EC_POINT_point2oct() 84 if (group->meth->field_type == NID_X9_62_prime_field) in EC_POINT_point2oct() 98 return group->meth->point2oct(group, point, form, buf, len, ctx); in EC_POINT_point2oct() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/ssl/statem/ |
| H A D | extensions_cust.c | 86 custom_ext_method *meth = exts->meths; in custom_ext_find() local 88 for (i = 0; i < exts->meths_count; i++, meth++) { in custom_ext_find() 89 if (ext_type == meth->ext_type in custom_ext_find() 90 && (role == ENDPOINT_BOTH || role == meth->role in custom_ext_find() 91 || meth->role == ENDPOINT_BOTH)) { in custom_ext_find() 94 return meth; in custom_ext_find() 106 custom_ext_method *meth = exts->meths; in custom_ext_init() local 108 for (i = 0; i < exts->meths_count; i++, meth++) in custom_ext_init() 109 meth->ext_flags = 0; in custom_ext_init() 119 custom_ext_method *meth; in custom_ext_parse() local [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/ssl/statem/ |
| H A D | extensions_cust.c | 86 custom_ext_method *meth = exts->meths; in custom_ext_find() local 88 for (i = 0; i < exts->meths_count; i++, meth++) { in custom_ext_find() 89 if (ext_type == meth->ext_type in custom_ext_find() 90 && (role == ENDPOINT_BOTH || role == meth->role in custom_ext_find() 91 || meth->role == ENDPOINT_BOTH)) { in custom_ext_find() 94 return meth; in custom_ext_find() 106 custom_ext_method *meth = exts->meths; in custom_ext_init() local 108 for (i = 0; i < exts->meths_count; i++, meth++) in custom_ext_init() 109 meth->ext_flags = 0; in custom_ext_init() 119 custom_ext_method *meth; in custom_ext_parse() local [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/comp/ |
| H A D | comp_lib.c | 18 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) in COMP_CTX_new() argument 26 ret->meth = meth; in COMP_CTX_new() 27 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in COMP_CTX_new() 36 return ctx->meth; in COMP_CTX_get_method() 39 int COMP_get_type(const COMP_METHOD *meth) in COMP_get_type() argument 41 return meth->type; in COMP_get_type() 44 const char *COMP_get_name(const COMP_METHOD *meth) in COMP_get_name() argument 46 return meth->name; in COMP_get_name() 53 if (ctx->meth->finish != NULL) in COMP_CTX_free() 54 ctx->meth->finish(ctx); in COMP_CTX_free() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/comp/ |
| H A D | comp_lib.c | 18 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth) in COMP_CTX_new() argument 26 ret->meth = meth; in COMP_CTX_new() 27 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in COMP_CTX_new() 36 return ctx->meth; in COMP_CTX_get_method() 39 int COMP_get_type(const COMP_METHOD *meth) in COMP_get_type() argument 41 return meth->type; in COMP_get_type() 44 const char *COMP_get_name(const COMP_METHOD *meth) in COMP_get_name() argument 46 return meth->name; in COMP_get_name() 53 if (ctx->meth->finish != NULL) in COMP_CTX_free() 54 ctx->meth->finish(ctx); in COMP_CTX_free() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/dso/ |
| H A D | dso_lib.c | 15 static DSO *DSO_new_method(DSO_METHOD *meth) in DSO_new_method() argument 39 ret->meth = default_DSO_meth; in DSO_new_method() 49 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in DSO_new_method() 78 if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) { in DSO_free() 84 if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) { in DSO_free() 119 DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) in DSO_load() argument 125 ret = DSO_new_method(meth); in DSO_load() 157 if (ret->meth->dso_load == NULL) { in DSO_load() 161 if (!ret->meth->dso_load(ret)) { in DSO_load() 181 if (dso->meth->dso_bind_func == NULL) { in DSO_bind_func() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/dso/ |
| H A D | dso_lib.c | 13 static DSO *DSO_new_method(DSO_METHOD *meth) in DSO_new_method() argument 29 ret->meth = DSO_METHOD_openssl(); in DSO_new_method() 39 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { in DSO_new_method() 68 if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) { in DSO_free() 74 if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) { in DSO_free() 109 DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags) in DSO_load() argument 115 ret = DSO_new_method(meth); in DSO_load() 147 if (ret->meth->dso_load == NULL) { in DSO_load() 151 if (!ret->meth->dso_load(ret)) { in DSO_load() 171 if (dso->meth->dso_bind_func == NULL) { in DSO_bind_func() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/evp/ |
| H A D | kdf_lib.c | 40 ctx->meth = kdf; in EVP_KDF_CTX_new() 49 ctx->meth->freectx(ctx->algctx); in EVP_KDF_CTX_free() 51 EVP_KDF_free(ctx->meth); in EVP_KDF_CTX_free() 59 if (src == NULL || src->algctx == NULL || src->meth->dupctx == NULL) in EVP_KDF_CTX_dup() 69 if (!EVP_KDF_up_ref(dst->meth)) { in EVP_KDF_CTX_dup() 75 dst->algctx = src->meth->dupctx(src->algctx); in EVP_KDF_CTX_dup() 110 return ctx->meth; in EVP_KDF_CTX_kdf() 118 if (ctx->meth->reset != NULL) in EVP_KDF_CTX_reset() 119 ctx->meth->reset(ctx->algctx); in EVP_KDF_CTX_reset() 131 if (ctx->meth->get_ctx_params != NULL in EVP_KDF_CTX_get_kdf_size() [all …]
|
| H A D | mac_lib.c | 35 ctx->meth = mac; in EVP_MAC_CTX_new() 44 ctx->meth->freectx(ctx->algctx); in EVP_MAC_CTX_free() 47 EVP_MAC_free(ctx->meth); in EVP_MAC_CTX_free() 65 if (!EVP_MAC_up_ref(dst->meth)) { in EVP_MAC_CTX_dup() 71 dst->algctx = src->meth->dupctx(src->algctx); in EVP_MAC_CTX_dup() 82 return ctx->meth; in EVP_MAC_CTX_get0_mac() 93 if (ctx->meth->get_ctx_params != NULL) { in get_size_t_ctx_param() 94 if (ctx->meth->get_ctx_params(ctx->algctx, params)) in get_size_t_ctx_param() 96 } else if (ctx->meth->get_params != NULL) { in get_size_t_ctx_param() 97 if (ctx->meth->get_params(params)) in get_size_t_ctx_param() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/rand/ |
| H A D | rand_lib.c | 81 const RAND_METHOD *meth = default_RAND_meth; in ossl_rand_cleanup_int() local 86 if (meth != NULL && meth->cleanup != NULL) in ossl_rand_cleanup_int() 87 meth->cleanup(); in ossl_rand_cleanup_int() 126 const RAND_METHOD *meth = RAND_get_rand_method(); in RAND_poll() local 127 int ret = meth == RAND_OpenSSL(); in RAND_poll() 129 if (meth == NULL) in RAND_poll() 144 if (meth->add == NULL in RAND_poll() 145 || meth->add(ossl_rand_pool_buffer(pool), in RAND_poll() 162 static int rand_set_rand_method_internal(const RAND_METHOD *meth, in rand_set_rand_method_internal() argument 174 default_RAND_meth = meth; in rand_set_rand_method_internal() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/rand/ |
| H A D | rand_lib.c | 346 const RAND_METHOD *meth = default_RAND_meth; in rand_cleanup_int() local 351 if (meth != NULL && meth->cleanup != NULL) in rand_cleanup_int() 352 meth->cleanup(); in rand_cleanup_int() 389 const RAND_METHOD *meth = RAND_get_rand_method(); in RAND_poll() local 391 if (meth == NULL) in RAND_poll() 394 if (meth == RAND_OpenSSL()) { in RAND_poll() 418 if (meth->add == NULL in RAND_poll() 419 || meth->add(rand_pool_buffer(pool), in RAND_poll() 833 int RAND_set_rand_method(const RAND_METHOD *meth) in RAND_set_rand_method() argument 843 default_RAND_meth = meth; in RAND_set_rand_method() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/ |
| H A D | ex_data.c | 30 STACK_OF(EX_CALLBACK) *meth; 100 sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb); in crypto_cleanup_all_ex_data_int() 101 ip->meth = NULL; in crypto_cleanup_all_ex_data_int() 138 if (idx < 0 || idx >= sk_EX_CALLBACK_num(ip->meth)) in CRYPTO_free_ex_index() 140 a = sk_EX_CALLBACK_value(ip->meth, idx); in CRYPTO_free_ex_index() 166 if (ip->meth == NULL) { in CRYPTO_get_ex_new_index() 167 ip->meth = sk_EX_CALLBACK_new_null(); in CRYPTO_get_ex_new_index() 170 if (ip->meth == NULL in CRYPTO_get_ex_new_index() 171 || !sk_EX_CALLBACK_push(ip->meth, NULL)) { in CRYPTO_get_ex_new_index() 188 if (!sk_EX_CALLBACK_push(ip->meth, NULL)) { in CRYPTO_get_ex_new_index() [all …]
|
| /netbsd-src/crypto/external/bsd/heimdal/dist/lib/hcrypto/ |
| H A D | rsa.c | 117 rsa->meth = ENGINE_get_RSA(rsa->engine); in RSA_new_method() 118 if (rsa->meth == NULL) { in RSA_new_method() 125 if (rsa->meth == NULL) in RSA_new_method() 126 rsa->meth = rk_UNCONST(RSA_get_default_method()); in RSA_new_method() 128 (*rsa->meth->init)(rsa); in RSA_new_method() 149 (*rsa->meth->finish)(rsa); in RSA_free() 200 return rsa->meth; in RSA_get_method() 217 (*rsa->meth->finish)(rsa); in RSA_set_method() 224 rsa->meth = method; in RSA_set_method() 225 (*rsa->meth->init)(rsa); in RSA_set_method() [all …]
|
| H A D | dh.c | 101 dh->meth = ENGINE_get_DH(dh->engine); in DH_new_method() 102 if (dh->meth == NULL) { in DH_new_method() 109 if (dh->meth == NULL) in DH_new_method() 110 dh->meth = DH_get_default_method(); in DH_new_method() 112 (*dh->meth->init)(dh); in DH_new_method() 135 (*dh->meth->finish)(dh); in DH_free() 240 if (dh->meth->generate_params) in DH_generate_parameters_ex() 241 return dh->meth->generate_params(dh, prime_len, generator, cb); in DH_generate_parameters_ex() 344 return dh->meth->generate_key(dh); in DH_generate_key() 374 return dh->meth->compute_key(shared_key, peer_pub_key, dh); in DH_compute_key() [all …]
|