/freebsd/contrib/bearssl/samples/ |
H A D | custom_profile.c | 108 br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12); in example_client_profile() 122 br_ssl_engine_set_prf10(&cc->eng, &br_tls10_prf); in example_client_profile() 123 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in example_client_profile() 124 br_ssl_engine_set_prf_sha384(&cc->eng, &br_tls12_sha384_prf); in example_client_profile() 152 br_ssl_engine_set_hash(&cc->eng, br_md5_ID, &br_md5_vtable); in example_client_profile() 153 br_ssl_engine_set_hash(&cc->eng, br_sha1_ID, &br_sha1_vtable); in example_client_profile() 154 br_ssl_engine_set_hash(&cc->eng, br_sha224_ID, &br_sha224_vtable); in example_client_profile() 155 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in example_client_profile() 156 br_ssl_engine_set_hash(&cc->eng, br_sha384_ID, &br_sha384_vtable); in example_client_profile() 157 br_ssl_engine_set_hash(&cc->eng, br_sha512_ID, &br_sha512_vtable); in example_client_profile() [all …]
|
H A D | client_basic.c | 292 br_ssl_engine_set_buffer(&sc.eng, iobuf, sizeof iobuf, 1); in main() 305 br_sslio_init(&ioc, &sc.eng, sock_read, &fd, sock_write, &fd); in main() 364 if (br_ssl_engine_current_state(&sc.eng) == BR_SSL_CLOSED) { in main() 367 err = br_ssl_engine_last_error(&sc.eng); in main()
|
/freebsd/contrib/bearssl/src/ssl/ |
H A D | ssl_client_full.c | 121 br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12); in br_ssl_client_init_full() 136 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_client_init_full() 139 br_ssl_engine_set_default_rsavrfy(&cc->eng); in br_ssl_client_init_full() 140 br_ssl_engine_set_default_ecdsa(&cc->eng); in br_ssl_client_init_full() 141 br_x509_minimal_set_rsa(xc, br_ssl_engine_get_rsavrfy(&cc->eng)); in br_ssl_client_init_full() 143 br_ssl_engine_get_ec(&cc->eng), in br_ssl_client_init_full() 144 br_ssl_engine_get_ecdsa(&cc->eng)); in br_ssl_client_init_full() 154 br_ssl_engine_set_hash(&cc->eng, id, hc); in br_ssl_client_init_full() 161 br_ssl_engine_set_x509(&cc->eng, &xc->vtable); in br_ssl_client_init_full() 166 br_ssl_engine_set_prf10(&cc->eng, &br_tls10_prf); in br_ssl_client_init_full() [all …]
|
H A D | ssl_server_full_ec.c | 100 br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12); in br_ssl_server_init_full_ec() 105 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_full_ec() 107 br_ssl_engine_set_default_ec(&cc->eng); in br_ssl_server_init_full_ec() 116 br_ssl_engine_get_ec(&cc->eng), in br_ssl_server_init_full_ec() 131 br_ssl_engine_set_hash(&cc->eng, id, hc); in br_ssl_server_init_full_ec() 137 br_ssl_engine_set_prf10(&cc->eng, &br_tls10_prf); in br_ssl_server_init_full_ec() 138 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_full_ec() 139 br_ssl_engine_set_prf_sha384(&cc->eng, &br_tls12_sha384_prf); in br_ssl_server_init_full_ec() 144 br_ssl_engine_set_default_aes_cbc(&cc->eng); in br_ssl_server_init_full_ec() 145 br_ssl_engine_set_default_aes_ccm(&cc->eng); in br_ssl_server_init_full_ec() [all …]
|
H A D | ssl_client.c | 47 br_ssl_engine_set_buffer(&cc->eng, NULL, 0, 0); in br_ssl_client_reset() 48 cc->eng.version_out = cc->eng.version_min; in br_ssl_client_reset() 52 if (!br_ssl_engine_init_rand(&cc->eng)) { in br_ssl_client_reset() 62 cc->eng.reneg = 0; in br_ssl_client_reset() 65 cc->eng.server_name[0] = 0; in br_ssl_client_reset() 68 if (n > sizeof cc->eng.server_name) { in br_ssl_client_reset() 69 br_ssl_engine_fail(&cc->eng, BR_ERR_BAD_PARAM); in br_ssl_client_reset() 72 memcpy(cc->eng.server_name, server_name, n); in br_ssl_client_reset() 75 br_ssl_engine_hs_reset(&cc->eng, in br_ssl_client_reset() 77 return br_ssl_engine_last_error(&cc->eng) == BR_ERR_OK; in br_ssl_client_reset()
|
H A D | ssl_server_full_rsa.c | 89 br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12); in br_ssl_server_init_full_rsa() 94 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_full_rsa() 96 br_ssl_engine_set_default_ec(&cc->eng); in br_ssl_server_init_full_rsa() 114 br_ssl_engine_set_hash(&cc->eng, id, hc); in br_ssl_server_init_full_rsa() 120 br_ssl_engine_set_prf10(&cc->eng, &br_tls10_prf); in br_ssl_server_init_full_rsa() 121 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_full_rsa() 122 br_ssl_engine_set_prf_sha384(&cc->eng, &br_tls12_sha384_prf); in br_ssl_server_init_full_rsa() 127 br_ssl_engine_set_default_aes_cbc(&cc->eng); in br_ssl_server_init_full_rsa() 128 br_ssl_engine_set_default_aes_ccm(&cc->eng); in br_ssl_server_init_full_rsa() 129 br_ssl_engine_set_default_aes_gcm(&cc->eng); in br_ssl_server_init_full_rsa() [all …]
|
H A D | ssl_hs_client.c | 112 xc = ctx->eng.x509ctx; in make_pms_rsa() 135 if (nlen > sizeof ctx->eng.pad) { in make_pms_rsa() 142 pms = ctx->eng.pad + nlen - 48; in make_pms_rsa() 143 br_enc16be(pms, ctx->eng.version_max); in make_pms_rsa() 144 br_hmac_drbg_generate(&ctx->eng.rng, pms + 2, 46); in make_pms_rsa() 145 br_ssl_engine_compute_master(&ctx->eng, prf_id, pms, 48); in make_pms_rsa() 150 ctx->eng.pad[0] = 0x00; in make_pms_rsa() 151 ctx->eng.pad[1] = 0x02; in make_pms_rsa() 152 ctx->eng.pad[nlen - 49] = 0x00; in make_pms_rsa() 153 br_hmac_drbg_generate(&ctx->eng.rng, ctx->eng.pad + 2, nlen - 51); in make_pms_rsa() [all …]
|
H A D | ssl_server_mine2c.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_mine2c() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_mine2c() 48 br_ssl_engine_set_ec(&cc->eng, &br_ec_all_m15); in br_ssl_server_init_mine2c() 60 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_mine2c() 65 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_mine2c() 70 br_ssl_engine_set_default_chapol(&cc->eng); in br_ssl_server_init_mine2c()
|
H A D | ssl_server_mine2g.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_mine2g() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_mine2g() 48 br_ssl_engine_set_ec(&cc->eng, &br_ec_all_m15); in br_ssl_server_init_mine2g() 60 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_mine2g() 65 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_mine2g() 70 br_ssl_engine_set_default_aes_gcm(&cc->eng); in br_ssl_server_init_mine2g()
|
H A D | ssl_server_minf2c.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_minf2c() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_minf2c() 48 br_ssl_engine_set_ec(&cc->eng, &br_ec_all_m15); in br_ssl_server_init_minf2c() 60 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_minf2c() 65 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_minf2c() 70 br_ssl_engine_set_default_chapol(&cc->eng); in br_ssl_server_init_minf2c()
|
H A D | ssl_server_minf2g.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_minf2g() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_minf2g() 48 br_ssl_engine_set_ec(&cc->eng, &br_ec_all_m15); in br_ssl_server_init_minf2g() 60 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_minf2g() 65 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_minf2g() 70 br_ssl_engine_set_default_aes_gcm(&cc->eng); in br_ssl_server_init_minf2g()
|
H A D | ssl_hs_server.c | 123 br_hmac_drbg_generate(&ctx->eng.rng, rpms, sizeof rpms); in do_rsa_decrypt() 129 br_ssl_engine_compute_master(&ctx->eng, prf_id, epms, 48); in do_rsa_decrypt() 157 br_hmac_drbg_generate(&ctx->eng.rng, rpms, xcoor_len); in ecdh_common() 163 br_ssl_engine_compute_master(&ctx->eng, prf_id, xcoor, xcoor_len); in ecdh_common() 203 xc = ctx->eng.x509ctx; in do_static_ecdh() 228 hf = br_multihash_getimpl(&ctx->eng.mhash, br_md5_ID); in hash_data() 235 hf = br_multihash_getimpl(&ctx->eng.mhash, br_sha1_ID); in hash_data() 245 hf = br_multihash_getimpl(&ctx->eng.mhash, hash_id); in hash_data() 272 if (!((ctx->eng.iec->supported_curves >> curve) & 1)) { in do_ecdhe_part1() 275 ctx->eng.ecdhe_curve = curve; in do_ecdhe_part1() [all …]
|
H A D | ssl_server.c | 44 br_ssl_engine_set_buffer(&cc->eng, NULL, 0, 0); in br_ssl_server_reset() 45 if (!br_ssl_engine_init_rand(&cc->eng)) { in br_ssl_server_reset() 48 cc->eng.reneg = 0; in br_ssl_server_reset() 49 br_ssl_engine_hs_reset(&cc->eng, in br_ssl_server_reset() 51 return br_ssl_engine_last_error(&cc->eng) == BR_ERR_OK; in br_ssl_server_reset()
|
H A D | ssl_server_minr2g.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_minr2g() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_minr2g() 59 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_minr2g() 64 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_minr2g() 69 br_ssl_engine_set_default_aes_gcm(&cc->eng); in br_ssl_server_init_minr2g()
|
H A D | ssl_server_minu2g.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_minu2g() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_minu2g() 59 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_minu2g() 64 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_minu2g() 69 br_ssl_engine_set_default_aes_gcm(&cc->eng); in br_ssl_server_init_minu2g()
|
H A D | ssl_server_minv2g.c | 41 br_ssl_engine_set_versions(&cc->eng, BR_TLS12, BR_TLS12); in br_ssl_server_init_minv2g() 46 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_server_init_minv2g() 59 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in br_ssl_server_init_minv2g() 64 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in br_ssl_server_init_minv2g() 69 br_ssl_engine_set_default_aes_gcm(&cc->eng); in br_ssl_server_init_minv2g()
|
H A D | ssl_hs_client.t0 | 32 * first field of the br_ssl_client_context structure ('eng'), then 57 xc = ctx->eng.x509ctx; 80 if (nlen > sizeof ctx->eng.pad) { 87 pms = ctx->eng.pad + nlen - 48; 88 br_enc16be(pms, ctx->eng.version_max); 89 br_hmac_drbg_generate(&ctx->eng.rng, pms + 2, 46); 90 br_ssl_engine_compute_master(&ctx->eng, prf_id, pms, 48); 95 ctx->eng.pad[0] = 0x00; 96 ctx->eng.pad[1] = 0x02; 97 ctx->eng.pad[nlen - 49] = 0x00; [all …]
|
H A D | ssl_hs_server.t0 | 32 * first field of the br_ssl_server_context structure ('eng'), then 68 br_hmac_drbg_generate(&ctx->eng.rng, rpms, sizeof rpms); 74 br_ssl_engine_compute_master(&ctx->eng, prf_id, epms, 48); 102 br_hmac_drbg_generate(&ctx->eng.rng, rpms, xcoor_len); 108 br_ssl_engine_compute_master(&ctx->eng, prf_id, xcoor, xcoor_len); 148 xc = ctx->eng.x509ctx; 173 hf = br_multihash_getimpl(&ctx->eng.mhash, br_md5_ID); 180 hf = br_multihash_getimpl(&ctx->eng.mhash, br_sha1_ID); 190 hf = br_multihash_getimpl(&ctx->eng.mhash, hash_id); 217 if (!((ctx->eng.iec->supported_curves >> curve) & 1)) { [all …]
|
/freebsd/crypto/openssl/ssl/ |
H A D | tls_depr.c | 32 ENGINE *eng; in tls_get_cipher_from_engine() local 38 eng = ENGINE_get_cipher_engine(nid); in tls_get_cipher_from_engine() 39 if (eng != NULL) { in tls_get_cipher_from_engine() 40 ret = ENGINE_get_cipher(eng, nid); in tls_get_cipher_from_engine() 41 ENGINE_finish(eng); in tls_get_cipher_from_engine() 51 ENGINE *eng; in tls_get_digest_from_engine() local 57 eng = ENGINE_get_digest_engine(nid); in tls_get_digest_from_engine() 58 if (eng != NULL) { in tls_get_digest_from_engine() 59 ret = ENGINE_get_digest(eng, nid); in tls_get_digest_from_engine() 60 ENGINE_finish(eng); in tls_get_digest_from_engine()
|
/freebsd/contrib/bearssl/tools/ |
H A D | twrch.c | 263 br_ssl_engine_context eng; in do_twrch() member 681 br_ssl_engine_set_versions(&cc.eng, vmin, vmax); in do_twrch() 682 br_ssl_engine_set_all_flags(&cc.eng, flags); in do_twrch() 724 br_ssl_engine_set_default_aes_cbc(&cc.eng); in do_twrch() 727 br_ssl_engine_set_default_aes_ccm(&cc.eng); in do_twrch() 730 br_ssl_engine_set_default_aes_gcm(&cc.eng); in do_twrch() 733 br_ssl_engine_set_default_chapol(&cc.eng); in do_twrch() 736 br_ssl_engine_set_default_des_cbc(&cc.eng); in do_twrch() 742 br_ssl_engine_set_default_rsavrfy(&cc.eng); in do_twrch() 745 br_ssl_engine_set_default_ec(&cc.eng); in do_twrch() [all …]
|
H A D | client.c | 894 br_ssl_engine_set_versions(&cc.eng, vmin, vmax); in do_client() 953 br_ssl_engine_set_default_aes_cbc(&cc.eng); in do_client() 956 br_ssl_engine_set_default_aes_ccm(&cc.eng); in do_client() 959 br_ssl_engine_set_default_aes_gcm(&cc.eng); in do_client() 962 br_ssl_engine_set_default_chapol(&cc.eng); in do_client() 965 br_ssl_engine_set_default_des_cbc(&cc.eng); in do_client() 971 br_ssl_engine_set_default_ec(&cc.eng); in do_client() 972 br_ssl_engine_set_default_rsavrfy(&cc.eng); in do_client() 975 br_ssl_engine_set_default_ecdsa(&cc.eng); in do_client() 978 br_ssl_engine_set_default_ec(&cc.eng); in do_client() [all …]
|
H A D | server.c | 394 if (br_ssl_engine_get_version(&cc->eng) in sp_choose() 419 if (br_ssl_engine_get_version(&cc->eng) in sp_choose() 1016 br_ssl_engine_set_versions(&cc.eng, vmin, vmax); in do_server() 1017 br_ssl_engine_set_all_flags(&cc.eng, flags); in do_server() 1059 br_ssl_engine_set_default_aes_cbc(&cc.eng); in do_server() 1062 br_ssl_engine_set_default_aes_ccm(&cc.eng); in do_server() 1065 br_ssl_engine_set_default_aes_gcm(&cc.eng); in do_server() 1068 br_ssl_engine_set_default_chapol(&cc.eng); in do_server() 1071 br_ssl_engine_set_default_des_cbc(&cc.eng); in do_server() 1074 br_ssl_engine_set_default_ec(&cc.eng); in do_server() [all …]
|
/freebsd/crypto/openssl/apps/lib/ |
H A D | engine.c | 170 ENGINE *eng; in get_digest_from_engine() local 172 eng = ENGINE_get_digest_engine(OBJ_sn2nid(name)); in get_digest_from_engine() 173 if (eng != NULL) { in get_digest_from_engine() 174 ENGINE_finish(eng); in get_digest_from_engine() 184 ENGINE *eng; in get_cipher_from_engine() local 186 eng = ENGINE_get_cipher_engine(OBJ_sn2nid(name)); in get_cipher_from_engine() 187 if (eng != NULL) { in get_cipher_from_engine() 188 ENGINE_finish(eng); in get_cipher_from_engine()
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
H A D | CheckerManager.cpp | 160 const Stmt *s, ExprEngine &eng, bool wasInlined = false) in CheckStmtContext() 161 : IsPreVisit(isPreVisit), Checkers(checkers), S(s), Eng(eng), in CheckStmtContext() 206 const ObjCMethodCall &msg, ExprEngine &eng, in CheckObjCMessageContext() 209 Eng(eng) {} in CheckObjCMessageContext() 276 const CallEvent &call, ExprEngine &eng, in CheckCallContext() 279 Call(call), Eng(eng) {} in CheckCallContext() 324 ExprEngine &eng) in CheckLocationContext() 326 BoundEx(BoundEx), Eng(eng) {} in CheckLocationContext() 372 SVal loc, SVal val, const Stmt *s, ExprEngine &eng, in CheckBindContext() 374 : Checkers(checkers), Loc(loc), Val(val), S(s), Eng(eng), PP(pp) {} in CheckBindContext() [all …]
|
/freebsd/crypto/openssl/apps/ |
H A D | genrsa.c | 80 ENGINE *eng = NULL; in genrsa_main() local 120 eng = setup_engine(opt_arg(), 0); in genrsa_main() 182 if (!init_gen_str(&ctx, "RSA", eng, 0, app_get0_libctx(), in genrsa_main() 244 release_engine(eng); in genrsa_main()
|