/freebsd/crypto/openssl/ssl/ |
H A D | ssl_conf.c | 106 static void ssl_set_option(SSL_CONF_CTX *cctx, unsigned int name_flags, in ssl_set_option() argument 111 if (cctx->poptions == NULL) in ssl_set_option() 118 pflags = cctx->pcert_flags; in ssl_set_option() 122 pflags = cctx->pvfy_flags; in ssl_set_option() 127 *cctx->poptions |= option_value; in ssl_set_option() 129 *cctx->poptions &= ~option_value; in ssl_set_option() 142 static int ssl_match_option(SSL_CONF_CTX *cctx, const ssl_flag_tbl *tbl, in ssl_match_option() argument 146 if (!(cctx->flags & tbl->name_flags & SSL_TFLAG_BOTH)) in ssl_match_option() 154 ssl_set_option(cctx, tbl->name_flags, tbl->option_value, onoff); in ssl_match_option() 160 SSL_CONF_CTX *cctx = usr; in ssl_set_option_list() local [all …]
|
H A D | ssl_mcnf.c | 25 SSL_CONF_CTX *cctx = NULL; in ssl_do_config() local 48 cctx = SSL_CONF_CTX_new(); in ssl_do_config() 49 if (cctx == NULL) in ssl_do_config() 56 SSL_CONF_CTX_set_ssl(cctx, s); in ssl_do_config() 60 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in ssl_do_config() 67 SSL_CONF_CTX_set_flags(cctx, flags); in ssl_do_config() 75 rv = SSL_CONF_cmd(cctx, cmdstr, arg); in ssl_do_config() 79 if (!SSL_CONF_CTX_finish(cctx)) in ssl_do_config() 83 SSL_CONF_CTX_free(cctx); in ssl_do_config()
|
/freebsd/crypto/openssl/crypto/evp/ |
H A D | e_aria.c | 516 EVP_ARIA_CCM_CTX *cctx = EVP_C_DATA(EVP_ARIA_CCM_CTX,ctx); in aria_ccm_init_key() local 524 &cctx->ks.ks); in aria_ccm_init_key() 525 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L, in aria_ccm_init_key() 526 &cctx->ks, (block128_f) ossl_aria_encrypt); in aria_ccm_init_key() 531 cctx->str = NULL; in aria_ccm_init_key() 532 cctx->key_set = 1; in aria_ccm_init_key() 535 memcpy(ctx->iv, iv, 15 - cctx->L); in aria_ccm_init_key() 536 cctx->iv_set = 1; in aria_ccm_init_key() 543 EVP_ARIA_CCM_CTX *cctx = EVP_C_DATA(EVP_ARIA_CCM_CTX,c); in aria_ccm_ctrl() local 547 cctx->key_set = 0; in aria_ccm_ctrl() [all …]
|
H A D | e_aes.c | 317 EVP_AES_CCM_CTX *cctx = EVP_C_DATA(EVP_AES_CCM_CTX,ctx); in aesni_ccm_init_key() local 322 &cctx->ks.ks); in aesni_ccm_init_key() 323 CRYPTO_ccm128_init(&cctx->ccm, cctx->M, cctx->L, in aesni_ccm_init_key() 324 &cctx->ks, (block128_f) aesni_encrypt); in aesni_ccm_init_key() 325 cctx->str = enc ? (ccm128_f) aesni_ccm64_encrypt_blocks : in aesni_ccm_init_key() 327 cctx->key_set = 1; in aesni_ccm_init_key() 330 memcpy(ctx->iv, iv, 15 - cctx->L); in aesni_ccm_init_key() 331 cctx->iv_set = 1; in aesni_ccm_init_key() 672 EVP_AES_CCM_CTX *cctx = EVP_C_DATA(EVP_AES_CCM_CTX,ctx); in aes_t4_ccm_init_key() local 677 aes_t4_set_encrypt_key(key, bits, &cctx->ks.ks); in aes_t4_ccm_init_key() [all …]
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
H A D | zstd_compress.c | 69 static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager) in ZSTD_initCCtx() argument 71 assert(cctx != NULL); in ZSTD_initCCtx() 72 memset(cctx, 0, sizeof(*cctx)); in ZSTD_initCCtx() 73 cctx->customMem = memManager; in ZSTD_initCCtx() 74 cctx->bmi2 = ZSTD_cpuid_bmi2(ZSTD_cpuid()); in ZSTD_initCCtx() 75 { size_t const err = ZSTD_CCtx_reset(cctx, ZSTD_reset_parameters); in ZSTD_initCCtx() 86 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_malloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced() local 87 if (!cctx) return NULL; in ZSTD_createCCtx_advanced() 88 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced() 89 return cctx; in ZSTD_createCCtx_advanced() [all …]
|
/freebsd/sys/contrib/zstd/lib/compress/ |
H A D | zstd_compress.c | 97 static void ZSTD_initCCtx(ZSTD_CCtx* cctx, ZSTD_customMem memManager) in ZSTD_initCCtx() argument 99 assert(cctx != NULL); in ZSTD_initCCtx() 100 ZSTD_memset(cctx, 0, sizeof(*cctx)); in ZSTD_initCCtx() 101 cctx->customMem = memManager; in ZSTD_initCCtx() 102 cctx->bmi2 = ZSTD_cpuSupportsBmi2(); in ZSTD_initCCtx() 103 { size_t const err = ZSTD_CCtx_reset(cctx, ZSTD_reset_parameters); in ZSTD_initCCtx() 114 { ZSTD_CCtx* const cctx = (ZSTD_CCtx*)ZSTD_customMalloc(sizeof(ZSTD_CCtx), customMem); in ZSTD_createCCtx_advanced() local 115 if (!cctx) return NULL; in ZSTD_createCCtx_advanced() 116 ZSTD_initCCtx(cctx, customMem); in ZSTD_createCCtx_advanced() 117 return cctx; in ZSTD_createCCtx_advanced() [all …]
|
/freebsd/crypto/openssl/crypto/cmac/ |
H A D | cmac.c | 25 EVP_CIPHER_CTX *cctx; member 60 ctx->cctx = EVP_CIPHER_CTX_new(); in CMAC_CTX_new() 61 if (ctx->cctx == NULL) { in CMAC_CTX_new() 71 EVP_CIPHER_CTX_reset(ctx->cctx); in CMAC_CTX_cleanup() 81 return ctx->cctx; in CMAC_CTX_get0_cipher_ctx() 89 EVP_CIPHER_CTX_free(ctx->cctx); in CMAC_CTX_free() 99 if ((bl = EVP_CIPHER_CTX_get_block_size(in->cctx)) < 0) in CMAC_CTX_copy() 101 if (!EVP_CIPHER_CTX_copy(out->cctx, in->cctx)) in CMAC_CTX_copy() 121 if (!EVP_EncryptInit_ex(ctx->cctx, NULL, NULL, NULL, zero_iv)) in CMAC_Init() 123 memset(ctx->tbl, 0, EVP_CIPHER_CTX_get_block_size(ctx->cctx)); in CMAC_Init() [all …]
|
/freebsd/crypto/heimdal/lib/gssapi/ |
H A D | test_context.c | 114 gss_ctx_id_t *sctx, gss_ctx_id_t *cctx, in loop() argument 161 cctx, in loop() 246 wrapunwrap(gss_ctx_id_t cctx, gss_ctx_id_t sctx, int flags, gss_OID mechoid) in wrapunwrap() argument 256 maj_stat = gss_wrap(&min_stat, cctx, flags, 0, &input_token, in wrapunwrap() 283 wrapunwrap_iov(gss_ctx_id_t cctx, gss_ctx_id_t sctx, int flags, gss_OID mechoid) in wrapunwrap_iov() argument 358 maj_stat = gss_wrap_iov(&min_stat, cctx, dce_style_flag || flags & USE_CONF, 0, &conf_state, in wrapunwrap_iov() 419 getverifymic(gss_ctx_id_t cctx, gss_ctx_id_t sctx, gss_OID mechoid) in getverifymic() argument 428 maj_stat = gss_get_mic(&min_stat, cctx, 0, &input_token, in getverifymic() 506 gss_ctx_id_t cctx, sctx; in main() local 520 cctx = sctx = GSS_C_NO_CONTEXT; in main() [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | sslapitest.c | 350 SSL_CTX *cctx = NULL, *sctx = NULL; in test_keylog() local 366 &sctx, &cctx, cert, privkey))) in test_keylog() 370 SSL_CTX_set_options(cctx, SSL_OP_NO_TLSv1_3); in test_keylog() 374 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "RSA"))) in test_keylog() 377 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog() 380 SSL_CTX_set_keylog_callback(cctx, client_keylog_callback); in test_keylog() 381 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog() 390 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog() 422 SSL_CTX_free(cctx); in test_keylog() 431 SSL_CTX *cctx = NULL, *sctx = NULL; in test_keylog_no_master_key() local [all …]
|
H A D | dtlstest.c | 73 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_unprocessed() local 83 &sctx, &cctx, cert, privkey))) in test_dtls_unprocessed() 87 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES128-SHA"))) in test_dtls_unprocessed() 92 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_unprocessed() 102 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in test_dtls_unprocessed() 141 SSL_CTX_free(cctx); in test_dtls_unprocessed() 193 SSL_CTX *sctx = NULL, *cctx = NULL; in test_dtls_drop_records() local 205 &sctx, &cctx, cert, privkey))) in test_dtls_drop_records() 211 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_drop_records() 225 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_dtls_drop_records() [all …]
|
H A D | fatalerrtest.c | 21 SSL_CTX *sctx = NULL, *cctx = NULL; in test_fatalerr() local 33 &sctx, &cctx, cert, privkey))) in test_fatalerr() 41 || !TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-SHA")) in test_fatalerr() 44 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_fatalerr() 46 || !TEST_true(create_ssl_objects(sctx, cctx, &sssl, &cssl, NULL, in test_fatalerr() 80 SSL_CTX_free(cctx); in test_fatalerr()
|
/freebsd/usr.bin/mkuzip/ |
H A D | mkuz_zstd.c | 49 ZSTD_CCtx *cctx; in mkuz_zstd_init() local 60 cctx = ZSTD_createCCtx(); in mkuz_zstd_init() 61 if (cctx == NULL) in mkuz_zstd_init() 64 rc = ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, in mkuz_zstd_init() 70 rc = ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1); in mkuz_zstd_init() 75 return (cctx); in mkuz_zstd_init() 81 ZSTD_CCtx *cctx; in mkuz_zstd_compress() local 84 cctx = p; in mkuz_zstd_compress() 86 rc = ZSTD_compress2(cctx, oblk->data, oblk->alen, iblk->data, in mkuz_zstd_compress()
|
/freebsd/sys/dev/bnxt/bnxt_re/ |
H A D | qplib_res.h | 72 #define BNXT_RE_PPP_ENABLED(cctx) ((cctx)->modes.db_push_mode ==\ argument 115 static inline bool _is_chip_p7(struct bnxt_qplib_chip_ctx *cctx) in _is_chip_p7() argument 117 return _is_chip_num_p7(cctx->chip_num); in _is_chip_p7() 121 static inline bool _is_chip_gen_p5(struct bnxt_qplib_chip_ctx *cctx) in _is_chip_gen_p5() argument 123 return (cctx->chip_num == CHIP_NUM_57508 || in _is_chip_gen_p5() 124 cctx->chip_num == CHIP_NUM_57504 || in _is_chip_gen_p5() 125 cctx->chip_num == CHIP_NUM_57502); in _is_chip_gen_p5() 128 static inline bool _is_chip_gen_p5_p7(struct bnxt_qplib_chip_ctx *cctx) in _is_chip_gen_p5_p7() argument 130 return (_is_chip_gen_p5(cctx) || _is_chip_p7(cctx)); in _is_chip_gen_p5_p7() 133 static inline bool _is_wqe_mode_variable(struct bnxt_qplib_chip_ctx *cctx) in _is_wqe_mode_variable() argument [all …]
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/ |
H A D | zstd.h | 197 ZSTDLIB_API size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx); 207 ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx, 445 ZSTDLIB_API size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value); 462 ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize); 484 ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset); 496 ZSTDLIB_API size_t ZSTD_compress2( ZSTD_CCtx* cctx, 682 ZSTDLIB_API size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, 839 ZSTDLIB_API size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx, 921 ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize); 935 ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); [all …]
|
/freebsd/crypto/openssl/demos/bio/ |
H A D | client-conf.c | 21 SSL_CONF_CTX *cctx = NULL; in main() local 47 cctx = SSL_CONF_CTX_new(); in main() 48 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_CLIENT); in main() 49 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_FILE); in main() 50 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in main() 53 rv = SSL_CONF_cmd(cctx, cnf->name, cnf->value); in main() 70 if (!SSL_CONF_CTX_finish(cctx)) { in main() 112 SSL_CONF_CTX_free(cctx); in main()
|
H A D | server-conf.c | 30 SSL_CONF_CTX *cctx = NULL; in main() local 57 cctx = SSL_CONF_CTX_new(); in main() 58 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_SERVER); in main() 59 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_CERTIFICATE); in main() 60 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_FILE); in main() 61 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in main() 65 rv = SSL_CONF_cmd(cctx, cnf->name, cnf->value); in main() 82 if (!SSL_CONF_CTX_finish(cctx)) { in main()
|
H A D | client-arg.c | 20 SSL_CONF_CTX *cctx; in main() local 27 cctx = SSL_CONF_CTX_new(); in main() 28 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_CLIENT); in main() 29 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in main() 33 rv = SSL_CONF_cmd_argv(cctx, &nargs, &args); in main() 62 if (!SSL_CONF_CTX_finish(cctx)) { in main() 104 SSL_CONF_CTX_free(cctx); in main()
|
H A D | server-arg.c | 28 SSL_CONF_CTX *cctx; in main() local 37 cctx = SSL_CONF_CTX_new(); in main() 38 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_SERVER); in main() 39 SSL_CONF_CTX_set_flags(cctx, SSL_CONF_FLAG_CERTIFICATE); in main() 40 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in main() 44 rv = SSL_CONF_cmd_argv(cctx, &nargs, &args); in main() 73 if (!SSL_CONF_CTX_finish(cctx)) { in main()
|
/freebsd/sys/contrib/zstd/lib/ |
H A D | zstd.h | 204 ZSTDLIB_API size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx); /* accept NULL pointer */ 214 ZSTDLIB_API size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx, 471 ZSTDLIB_API size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value); 488 ZSTDLIB_API size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize); 510 ZSTDLIB_API size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset); 522 ZSTDLIB_API size_t ZSTD_compress2( ZSTD_CCtx* cctx, 713 ZSTDLIB_API size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, 871 ZSTDLIB_API size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx, 960 ZSTDLIB_API size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize); 974 ZSTDLIB_API size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); [all …]
|
/freebsd/crypto/openssh/ |
H A D | mux.c | 337 struct mux_session_confirm_ctx *cctx; in mux_master_process_new_session() local 343 cctx = xcalloc(1, sizeof(*cctx)); in mux_master_process_new_session() 344 cctx->term = NULL; in mux_master_process_new_session() 345 cctx->rid = rid; in mux_master_process_new_session() 347 cctx->env = NULL; in mux_master_process_new_session() 350 (r = sshbuf_get_u32(m, &cctx->want_tty)) != 0 || in mux_master_process_new_session() 351 (r = sshbuf_get_u32(m, &cctx->want_x_fwd)) != 0 || in mux_master_process_new_session() 352 (r = sshbuf_get_u32(m, &cctx->want_agent_fwd)) != 0 || in mux_master_process_new_session() 353 (r = sshbuf_get_u32(m, &cctx->want_subsys)) != 0 || in mux_master_process_new_session() 355 (r = sshbuf_get_cstring(m, &cctx->term, NULL)) != 0 || in mux_master_process_new_session() [all …]
|
/freebsd/sys/contrib/zstd/examples/ |
H A D | multiple_streaming_compression.c | 28 ZSTD_CCtx* cctx; member 38 ress.cctx = ZSTD_createCCtx(); in createResources_orDie() 39 CHECK(ress.cctx != NULL, "ZSTD_createCCtx() failed!"); in createResources_orDie() 45 CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_compressionLevel, cLevel) ); in createResources_orDie() 46 CHECK_ZSTD( ZSTD_CCtx_setParameter(ress.cctx, ZSTD_c_checksumFlag, 1) ); in createResources_orDie() 52 ZSTD_freeCCtx(ress.cctx); in freeResources() 67 CHECK_ZSTD( ZSTD_CCtx_reset(ress.cctx, ZSTD_reset_session_only) ); in compressFile_orDie() 82 size_t const remaining = ZSTD_compressStream2(ress.cctx, &output, &input, mode); in compressFile_orDie()
|
H A D | streaming_compression.c | 37 ZSTD_CCtx* const cctx = ZSTD_createCCtx(); in compressFile_orDie() local 38 CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); in compressFile_orDie() 43 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, cLevel) ); in compressFile_orDie() 44 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); in compressFile_orDie() 45 ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads); in compressFile_orDie() 72 size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); in compressFile_orDie() 89 ZSTD_freeCCtx(cctx); in compressFile_orDie()
|
H A D | streaming_memory_usage.c | 84 ZSTD_CCtx* const cctx = ZSTD_createCCtx(); in main() local 85 CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); in main() 86 CHECK_ZSTD( ZSTD_CCtx_setParametersUsingCCtxParams(cctx, cctxParams) ); in main() 91 CHECK_ZSTD( ZSTD_compressStream(cctx, &outBuff, &inBuff) ); in main() 92 size_t const remaining = ZSTD_endStream(cctx, &outBuff); in main() 116 size_t const cstreamSize = ZSTD_sizeof_CStream(cctx); in main() 132 ZSTD_freeCCtx(cctx); in main()
|
H A D | streaming_compression_thread_pool.c | 48 ZSTD_CCtx* const cctx = ZSTD_createCCtx(); in compressFile_orDie() local 49 CHECK(cctx != NULL, "ZSTD_createCCtx() failed!"); in compressFile_orDie() 52 size_t r = ZSTD_CCtx_refThreadPool(cctx, args->pool); in compressFile_orDie() 59 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, args->cLevel) ); in compressFile_orDie() 60 CHECK_ZSTD( ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1) ); in compressFile_orDie() 61 ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers, nbThreads); in compressFile_orDie() 88 size_t const remaining = ZSTD_compressStream2(cctx, &output , &input, mode); in compressFile_orDie() 107 ZSTD_freeCCtx(cctx); in compressFile_orDie()
|
/freebsd/sys/contrib/zstd/lib/deprecated/ |
H A D | zbuff.h | 73 ZBUFF_DEPRECATED("use ZSTD_freeCStream") size_t ZBUFF_freeCCtx(ZBUFF_CCtx* cctx); 75 ZBUFF_DEPRECATED("use ZSTD_initCStream") size_t ZBUFF_compressInit(ZBUFF_CCtx* cctx, int … 76 …D_initCStream_usingDict") size_t ZBUFF_compressInitDictionary(ZBUFF_CCtx* cctx, const void* dict, … 78 ZBUFF_DEPRECATED("use ZSTD_compressStream") size_t ZBUFF_compressContinue(ZBUFF_CCtx* cctx, void* d… 79 ZBUFF_DEPRECATED("use ZSTD_flushStream") size_t ZBUFF_compressFlush(ZBUFF_CCtx* cctx, void* dst,… 80 ZBUFF_DEPRECATED("use ZSTD_endStream") size_t ZBUFF_compressEnd(ZBUFF_CCtx* cctx, void* dst, s…
|