/openssl/crypto/bio/ |
H A D | ossl_core_bio.c | 25 OSSL_CORE_BIO *cb = OPENSSL_malloc(sizeof(*cb)); in core_bio_new() local 27 if (cb == NULL || !CRYPTO_NEW_REF(&cb->ref_cnt, 1)) { in core_bio_new() 28 OPENSSL_free(cb); in core_bio_new() 31 return cb; in core_bio_new() 45 if (cb != NULL) { in ossl_core_bio_free() 50 OPENSSL_free(cb); in ossl_core_bio_free() 64 cb->bio = bio; in ossl_core_bio_new_from_bio() 65 return cb; in ossl_core_bio_new_from_bio() 70 OSSL_CORE_BIO *cb = NULL; in core_bio_new_from_new_bio() local 78 cb->bio = bio; in core_bio_new_from_new_bio() [all …]
|
/openssl/crypto/ |
H A D | indicator_core.c | 18 OSSL_INDICATOR_CALLBACK *cb; member 23 INDICATOR_CB *cb; in ossl_indicator_set_callback_new() local 25 cb = OPENSSL_zalloc(sizeof(*cb)); in ossl_indicator_set_callback_new() 26 return cb; in ossl_indicator_set_callback_new() 29 void ossl_indicator_set_callback_free(void *cb) in ossl_indicator_set_callback_free() argument 31 OPENSSL_free(cb); in ossl_indicator_set_callback_free() 40 OSSL_INDICATOR_CALLBACK *cb) in OSSL_INDICATOR_set_callback() argument 45 icb->cb = cb; in OSSL_INDICATOR_set_callback() 49 OSSL_INDICATOR_CALLBACK **cb) in OSSL_INDICATOR_get_callback() argument 53 if (cb != NULL) in OSSL_INDICATOR_get_callback() [all …]
|
H A D | self_test_core.c | 17 OSSL_CALLBACK *cb; member 26 OSSL_CALLBACK *cb; member 58 stcb->cb = cb; in OSSL_SELF_TEST_set_callback() 68 if (cb != NULL) in OSSL_SELF_TEST_get_callback() 69 *cb = (stcb != NULL ? stcb->cb : NULL); in OSSL_SELF_TEST_get_callback() 79 if (st->cb != NULL) { in self_test_setparams() 100 ret->cb = cb; in OSSL_SELF_TEST_new() 118 if (st != NULL && st->cb != NULL) { in OSSL_SELF_TEST_onbegin() 123 (void)st->cb(st->params, st->cb_arg); in OSSL_SELF_TEST_onbegin() 133 if (st != NULL && st->cb != NULL) { in OSSL_SELF_TEST_onend() [all …]
|
/openssl/crypto/pem/ |
H A D | pem_pk8.c | 24 pem_password_cb *cb, void *u, 31 pem_password_cb *cb, void *u, 57 pem_password_cb *cb, void *u) in i2d_PKCS8PrivateKey_bio() argument 87 if (kstr == NULL && cb == NULL) { in do_pk8pkey() 92 cb = PEM_def_callback; in do_pk8pkey() 120 else if (cb != NULL in do_pk8pkey() 138 klen = cb(buf, PEM_BUFSIZE, 1, u); in do_pk8pkey() 181 if (cb != NULL) in d2i_PKCS8PrivateKey_bio() 182 klen = cb(psbuf, PEM_BUFSIZE, 0, u); in d2i_PKCS8PrivateKey_bio() 210 pem_password_cb *cb, void *u) in i2d_PKCS8PrivateKey_fp() argument [all …]
|
H A D | pem_pkey.c | 53 if (cb == NULL) in pem_read_bio_key_decoder() 54 cb = PEM_def_callback; in pem_read_bio_key_decoder() 56 if (!OSSL_DECODER_CTX_set_pem_password_cb(dctx, cb, u)) in pem_read_bio_key_decoder() 116 bp, cb, u)) { in pem_read_bio_key_legacy() 127 bp, cb, u)) { in pem_read_bio_key_legacy() 154 if (cb != NULL) in pem_read_bio_key_legacy() 155 klen = cb(psbuf, PEM_BUFSIZE, 0, u); in pem_read_bio_key_legacy() 233 if (cb == NULL) in pem_read_bio_key() 234 cb = PEM_def_callback; in pem_read_bio_key() 236 if (!ossl_pw_set_pem_password_cb(&pwdata, cb, u) in pem_read_bio_key() [all …]
|
H A D | pem_all.c | 69 RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb, in PEM_read_bio_RSAPrivateKey() argument 73 pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); in PEM_read_bio_RSAPrivateKey() 82 pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); in PEM_read_RSAPrivateKey() 109 DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb, in PEM_read_bio_DSAPrivateKey() argument 113 pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); in PEM_read_bio_DSAPrivateKey() 123 pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); in IMPLEMENT_PEM_write_cb() 154 pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); in PEM_read_bio_ECPrivateKey() 170 pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); in IMPLEMENT_PEM_rw() 184 DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) in IMPLEMENT_PEM_write() 209 DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u) in PEM_read_DHparams() argument [all …]
|
/openssl/crypto/bn/ |
H A D | bn_prime.c | 101 int BN_GENCB_call(BN_GENCB *cb, int a, int b) in BN_GENCB_call() argument 104 if (!cb) in BN_GENCB_call() 106 switch (cb->ver) { in BN_GENCB_call() 109 if (!cb->cb.cb_1) in BN_GENCB_call() 111 cb->cb.cb_1(a, b, cb->arg); in BN_GENCB_call() 115 return cb->cb.cb_2(a, b, cb); in BN_GENCB_call() 165 if (!BN_GENCB_call(cb, 0, c1++)) in BN_generate_prime_ex2() 196 if (!BN_GENCB_call(cb, 2, c1 - 1)) in BN_generate_prime_ex2() 229 BN_GENCB *cb) in BN_is_prime_ex() argument 312 if (!BN_GENCB_call(cb, 1, -1)) in bn_is_prime_int() [all …]
|
H A D | bn_depr.c | 26 BN_GENCB cb; in BN_generate_prime() local 29 BN_GENCB_set_old(&cb, callback, cb_arg); in BN_generate_prime() 36 if (!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb)) in BN_generate_prime() 50 BN_GENCB cb; in BN_is_prime() local 51 BN_GENCB_set_old(&cb, callback, cb_arg); in BN_is_prime() 52 return ossl_bn_check_prime(a, checks, ctx_passed, 0, &cb); in BN_is_prime() 60 BN_GENCB cb; in BN_is_prime_fasttest() local 61 BN_GENCB_set_old(&cb, callback, cb_arg); in BN_is_prime_fasttest() 62 return ossl_bn_check_prime(a, checks, ctx_passed, do_trial_division, &cb); in BN_is_prime_fasttest()
|
H A D | bn_x931p.c | 24 BN_GENCB *cb) in bn_x931_derive_pi() argument 33 BN_GENCB_call(cb, 0, i); in bn_x931_derive_pi() 35 is_prime = BN_check_prime(pi, ctx, cb); in bn_x931_derive_pi() 43 BN_GENCB_call(cb, 2, i); in bn_x931_derive_pi() 56 BN_GENCB *cb) in BN_X931_derive_prime_ex() argument 82 if (!bn_x931_derive_pi(p1, Xp1, ctx, cb)) in BN_X931_derive_prime_ex() 85 if (!bn_x931_derive_pi(p2, Xp2, ctx, cb)) in BN_X931_derive_prime_ex() 123 BN_GENCB_call(cb, 0, i++); in BN_X931_derive_prime_ex() 136 int r = BN_check_prime(p, ctx, cb); in BN_X931_derive_prime_ex() 146 BN_GENCB_call(cb, 3, 0); in BN_X931_derive_prime_ex() [all …]
|
H A D | bn_rsa_fips186_4.c | 135 BN_GENCB *cb) in bn_rsa_fips186_4_find_aux_prob_prime() argument 148 BN_GENCB_call(cb, 0, i); in bn_rsa_fips186_4_find_aux_prob_prime() 150 tmp = ossl_bn_check_generated_prime(p1, rounds, ctx, cb); in bn_rsa_fips186_4_find_aux_prob_prime() 159 BN_GENCB_call(cb, 2, i); in bn_rsa_fips186_4_find_aux_prob_prime() 189 BN_GENCB *cb) in ossl_bn_rsa_fips186_4_gen_prob_primes() argument 228 if (!bn_rsa_fips186_4_find_aux_prob_prime(Xp1i, p1i, ctx, rounds, cb) in ossl_bn_rsa_fips186_4_gen_prob_primes() 237 ctx, cb)) in ossl_bn_rsa_fips186_4_gen_prob_primes() 278 BN_CTX *ctx, BN_GENCB *cb) in ossl_bn_rsa_fips186_4_derive_prime() argument 375 BN_GENCB_call(cb, 0, 2); in ossl_bn_rsa_fips186_4_derive_prime() 383 int rv = ossl_bn_check_generated_prime(Y, rounds, ctx, cb); in ossl_bn_rsa_fips186_4_derive_prime() [all …]
|
/openssl/crypto/dh/ |
H A D | dh_depr.c | 28 BN_GENCB *cb; in DH_generate_parameters() local 33 cb = BN_GENCB_new(); in DH_generate_parameters() 34 if (cb == NULL) { in DH_generate_parameters() 39 BN_GENCB_set_old(cb, callback, cb_arg); in DH_generate_parameters() 41 if (DH_generate_parameters_ex(ret, prime_len, generator, cb)) { in DH_generate_parameters() 42 BN_GENCB_free(cb); in DH_generate_parameters() 45 BN_GENCB_free(cb); in DH_generate_parameters()
|
H A D | dh_gen.c | 36 BN_GENCB *cb); 40 BN_GENCB *cb) in ossl_dh_generate_ffc_parameters() argument 48 pbits, qbits, &res, cb); in ossl_dh_generate_ffc_parameters() 53 pbits, qbits, &res, cb); in ossl_dh_generate_ffc_parameters() 116 BN_GENCB *cb) in DH_generate_parameters_ex() argument 124 return ret->meth->generate_params(ret, prime_len, generator, cb); in DH_generate_parameters_ex() 125 return dh_builtin_genparams(ret, prime_len, generator, cb); in DH_generate_parameters_ex() 157 BN_GENCB *cb) in dh_builtin_genparams() argument 217 if (!BN_generate_prime_ex2(ret->params.p, prime_len, 1, t1, t2, cb, ctx)) in dh_builtin_genparams() 219 if (!BN_GENCB_call(cb, 3, 0)) in dh_builtin_genparams()
|
/openssl/crypto/dsa/ |
H A D | dsa_depr.c | 37 BN_GENCB *cb; in DSA_generate_parameters() local 42 cb = BN_GENCB_new(); in DSA_generate_parameters() 43 if (cb == NULL) in DSA_generate_parameters() 46 BN_GENCB_set_old(cb, callback, cb_arg); in DSA_generate_parameters() 49 counter_ret, h_ret, cb)) { in DSA_generate_parameters() 50 BN_GENCB_free(cb); in DSA_generate_parameters() 53 BN_GENCB_free(cb); in DSA_generate_parameters()
|
H A D | dsa_gen.c | 27 BN_GENCB *cb) in ossl_dsa_generate_ffc_parameters() argument 35 pbits, qbits, &res, cb); in ossl_dsa_generate_ffc_parameters() 40 pbits, qbits, &res, cb); in ossl_dsa_generate_ffc_parameters() 50 BN_GENCB *cb) in DSA_generate_parameters_ex() argument 54 counter_ret, h_ret, cb); in DSA_generate_parameters_ex() 63 bits, 160, cb)) in DSA_generate_parameters_ex() 67 bits, 0, cb)) in DSA_generate_parameters_ex()
|
H A D | dsa_key.c | 76 OSSL_CALLBACK *cb, void *cbarg) in dsa_keygen_knownanswer_test() argument 86 st = OSSL_SELF_TEST_new(cb, cbarg); in dsa_keygen_knownanswer_test() 114 static int dsa_keygen_pairwise_test(DSA *dsa, OSSL_CALLBACK *cb, void *cbarg) in dsa_keygen_pairwise_test() argument 122 st = OSSL_SELF_TEST_new(cb, cbarg); in dsa_keygen_pairwise_test() 194 OSSL_CALLBACK *cb = NULL; in dsa_keygen() local 197 OSSL_SELF_TEST_get_callback(dsa->libctx, &cb, &cbarg); in dsa_keygen() 198 ok = dsa_keygen_pairwise_test(dsa, cb, cbarg) in dsa_keygen() 199 && dsa_keygen_knownanswer_test(dsa, ctx, cb, cbarg); in dsa_keygen()
|
/openssl/crypto/rsa/ |
H A D | rsa_depr.c | 33 BN_GENCB *cb = BN_GENCB_new(); in RSA_generate_key() local 37 if (cb == NULL || rsa == NULL || e == NULL) in RSA_generate_key() 50 BN_GENCB_set_old(cb, callback, cb_arg); in RSA_generate_key() 52 if (RSA_generate_key_ex(rsa, bits, e, cb)) { in RSA_generate_key() 54 BN_GENCB_free(cb); in RSA_generate_key() 60 BN_GENCB_free(cb); in RSA_generate_key()
|
H A D | rsa_gen.c | 44 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); in RSA_generate_key_ex() 47 e_value, cb); in RSA_generate_key_ex() 51 BIGNUM *e_value, BN_GENCB *cb) in RSA_generate_multi_prime_key() argument 57 e_value, cb); in RSA_generate_multi_prime_key() 66 return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); in RSA_generate_multi_prime_key() 382 cb, ctx)) in rsa_multiprime_keygen() 423 if (!BN_GENCB_call(cb, 2, n++)) in rsa_multiprime_keygen() 440 if (!BN_GENCB_call(cb, 3, i)) in rsa_multiprime_keygen() 481 if (!BN_GENCB_call(cb, 2, n++)) in rsa_multiprime_keygen() 510 if (!BN_GENCB_call(cb, 3, i)) in rsa_multiprime_keygen() [all …]
|
/openssl/include/internal/ |
H A D | bio.h | 88 int ossl_core_bio_read_ex(OSSL_CORE_BIO *cb, void *data, size_t dlen, 90 int ossl_core_bio_write_ex(OSSL_CORE_BIO *cb, const void *data, size_t dlen, 92 int ossl_core_bio_gets(OSSL_CORE_BIO *cb, char *buf, int size); 93 int ossl_core_bio_puts(OSSL_CORE_BIO *cb, const char *buf); 94 long ossl_core_bio_ctrl(OSSL_CORE_BIO *cb, int cmd, long larg, void *parg); 95 int ossl_core_bio_up_ref(OSSL_CORE_BIO *cb); 96 int ossl_core_bio_free(OSSL_CORE_BIO *cb); 97 int ossl_core_bio_vprintf(OSSL_CORE_BIO *cb, const char *format, va_list args);
|
/openssl/include/openssl/ |
H A D | pem.h | 76 pem_password_cb *cb, void *u) 89 pem_password_cb *cb, void *u) 394 pem_password_cb *cb, void *u); 398 pem_password_cb *cb, void *u); 417 pem_password_cb *cb, void *u); 495 pem_password_cb *cb, void *u); 505 pem_password_cb *cb, void *u); 508 pem_password_cb *cb, void *u); 531 EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); 535 pem_password_cb *cb, void *u); [all …]
|
/openssl/test/testutil/ |
H A D | fake_random.c | 20 fake_random_generate_cb *cb; member 78 if (frng->cb != NULL) in fake_rand_generate() 79 return (*frng->cb)(out, outlen, frng->name, frng->ctx); in fake_rand_generate() 215 int (*cb)(unsigned char *out, size_t outlen, in fake_rand_set_callback() 219 ((FAKE_RAND *)rng->algctx)->cb = cb; in fake_rand_set_callback() 223 int (*cb)(unsigned char *out, in fake_rand_set_public_private_callbacks() 228 fake_rand_set_callback(RAND_get0_private(libctx), cb); in fake_rand_set_public_private_callbacks() 229 fake_rand_set_callback(RAND_get0_public(libctx), cb); in fake_rand_set_public_private_callbacks()
|
/openssl/crypto/ffc/ |
H A D | ffc_params_generate.c | 330 if (!BN_GENCB_call(cb, 0, m++)) in generate_q_fips186_4() 367 r = BN_check_prime(q, ctx, cb); in generate_q_fips186_4() 402 if (!BN_GENCB_call(cb, 0, m++)) in generate_q_fips186_2() 694 if (!BN_GENCB_call(cb, 2, 0)) in ossl_ffc_params_FIPS186_4_gen_verify() 696 if (!BN_GENCB_call(cb, 3, 0)) in ossl_ffc_params_FIPS186_4_gen_verify() 716 if(!BN_GENCB_call(cb, 2, 1)) in ossl_ffc_params_FIPS186_4_gen_verify() 766 if (!BN_GENCB_call(cb, 3, 1)) in ossl_ffc_params_FIPS186_4_gen_verify() 941 if (!BN_GENCB_call(cb, 2, 0)) in ossl_ffc_params_FIPS186_2_gen_verify() 943 if (!BN_GENCB_call(cb, 3, 0)) in ossl_ffc_params_FIPS186_2_gen_verify() 968 if (!BN_GENCB_call(cb, 2, 1)) in ossl_ffc_params_FIPS186_2_gen_verify() [all …]
|
/openssl/doc/man3/ |
H A D | PEM_read_bio_PrivateKey.pod | 53 pem_password_cb *cb, void *u); 61 pem_password_cb *cb, void *u); 68 pem_password_cb *cb, void *u, 72 pem_password_cb *cb, void *u); 92 pem_password_cb *cb, void *u, 95 pem_password_cb *cb, void *u); 128 pem_password_cb *cb, void *u); 164 pem_password_cb *cb, void *u); 171 pem_password_cb *cb, void *u); 189 pem_password_cb *cb, void *u); [all …]
|
H A D | DSA_generate_parameters.pod | 18 BN_GENCB *cb); 49 of the key generation. If B<cb> is not B<NULL>, it will be 68 B<BN_GENCB_call(cb, 1, -1)> is called. 70 B<BN_GENCB_call(cb, 1, i)> is called in the outer loop 76 When a prime q has been found, B<BN_GENCB_call(cb, 2, 0)> and 77 B<BN_GENCB_call(cb, 3, 0)> are called. 82 B<BN_GENCB_call(cb, 0, counter)> is called. 87 B<BN_GENCB_call(cb, 1, -1)> is called. 89 B<BN_GENCB_call(cb, 1, i)> is called in the outer loop 95 When p has been found, B<BN_GENCB_call(cb, 2, 1)> is called. [all …]
|
H A D | PEM_read_CMS.pod | 53 TYPE *PEM_read_TYPE(FILE *fp, TYPE **a, pem_password_cb *cb, void *u); 54 TYPE *PEM_read_bio_TYPE(BIO *bp, TYPE **a, pem_password_cb *cb, void *u); 66 EC_GROUP *PEM_read_ECPKParameters(FILE *fp, EC_GROUP **x, pem_password_cb *cb, void *u); 67 EC_GROUP *PEM_read_bio_ECPKParameters(BIO *bp, EC_GROUP **x, pem_password_cb *cb, void *u); 71 EC_KEY *PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u); 72 EC_KEY *PEM_read_bio_EC_PUBKEY(BIO *bp, EC_KEY **x, pem_password_cb *cb, void *u); 76 EC_KEY *PEM_read_ECPrivateKey(FILE *out, EC_KEY **x, pem_password_cb *cb, void *u); 77 EC_KEY *PEM_read_bio_ECPrivateKey(BIO *out, EC_KEY **x, pem_password_cb *cb, void *u); 80 pem_password_cb *cb, void *u); 83 pem_password_cb *cb, void *u); [all …]
|
/openssl/ssl/ |
H A D | d1_msg.c | 42 void (*cb) (const SSL *ssl, int type, int val) = NULL; in dtls1_dispatch_alert() local 69 cb = s->info_callback; in dtls1_dispatch_alert() 71 cb = ssl->ctx->info_callback; in dtls1_dispatch_alert() 73 if (cb != NULL) { in dtls1_dispatch_alert() 75 cb(ssl, SSL_CB_WRITE_ALERT, j); in dtls1_dispatch_alert()
|