/openssl/test/ |
H A D | rand_test.c | 26 unsigned char outbuf[3]; in test_rand() local 34 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 35 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy1, sizeof(outbuf)) in test_rand() 36 || !TEST_int_le(RAND_priv_bytes(outbuf, sizeof(outbuf) + 1), 0) in test_rand() 37 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 38 || !TEST_mem_eq(outbuf, sizeof(outbuf), in test_rand() 39 entropy1 + sizeof(outbuf), sizeof(outbuf))) in test_rand() 45 || !TEST_int_gt(RAND_priv_bytes(outbuf, sizeof(outbuf)), 0) in test_rand() 46 || !TEST_mem_eq(outbuf, sizeof(outbuf), entropy2, sizeof(outbuf))) in test_rand()
|
H A D | tls13encryptiontest.c | 207 unsigned char *outbuf; in multihexstr2buf() local 218 outbuf = OPENSSL_malloc(totlen); in multihexstr2buf() 219 if (outbuf == NULL) in multihexstr2buf() 230 OPENSSL_free(outbuf); in multihexstr2buf() 233 outbuf[curr++] = (hi << 4) | lo; in multihexstr2buf() 238 return outbuf; in multihexstr2buf()
|
H A D | aesgcmtest.c | 44 unsigned char outbuf[64]; in do_encrypt() local 56 && TEST_true(EVP_EncryptFinal_ex(ctx, outbuf, &outlen) > 0) in do_encrypt() 73 unsigned char outbuf[32]; in do_decrypt() local 86 && TEST_true(EVP_DecryptFinal_ex(ctx, outbuf, &outlen) > 0) in do_decrypt()
|
H A D | evp_extra_test.c | 4311 unsigned char outbuf[1024]; in test_evp_init_seq() local 4457 unsigned char outbuf[1024]; in test_evp_reset() local 4568 unsigned char outbuf[1024]; in test_evp_updated_iv() local 4653 unsigned char outbuf[1024]; in test_gcm_reinit() local 4763 unsigned char outbuf[1024]; in test_ivlen_change() local 4831 unsigned char outbuf[1024]; in test_keylen_change() local 5659 unsigned char outbuf[1024]; in aes_gcm_encrypt() local 5708 unsigned char outbuf[1024]; in aes_gcm_decrypt() local 5797 unsigned char outbuf[1024]; in rc4_encrypt() local 5815 if (!TEST_mem_eq(outbuf, outlen, rc4_ct, rc4_ct_s)) in rc4_encrypt() [all …]
|
H A D | sslapitest.c | 11784 unsigned char inbuf[1200], outbuf[1200]; in test_data_retry() local 11795 memset(outbuf, 0, sizeof(outbuf)); in test_data_retry() 11855 while (SSL_read_ex(serverssl, outbuf + totread, sizeof(outbuf) - totread, in test_data_retry() 11858 if (!TEST_mem_eq(inbuf, sizeof(inbuf), outbuf, totread)) in test_data_retry()
|
/openssl/crypto/comp/ |
H A D | c_zstd.c | 190 ZSTD_outBuffer outbuf; in zstd_stateful_compress_block() local 198 outbuf.dst = out; in zstd_stateful_compress_block() 199 outbuf.size = olen; in zstd_stateful_compress_block() 200 outbuf.pos = 0; in zstd_stateful_compress_block() 249 ZSTD_outBuffer outbuf; in zstd_stateful_expand_block() local 257 outbuf.dst = out; in zstd_stateful_expand_block() 258 outbuf.size = olen; in zstd_stateful_expand_block() 259 outbuf.pos = 0; in zstd_stateful_expand_block() 464 ZSTD_outBuffer outbuf; member 713 ctx->compress.outbuf.pos = 0; in bio_zstd_flush() [all …]
|
/openssl/demos/cipher/ |
H A D | aeskeywrap.c | 62 unsigned char outbuf[1024]; in aes_wrap_encrypt() local 86 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, wrap_pt, sizeof(wrap_pt))) in aes_wrap_encrypt() 90 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_encrypt() 96 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_encrypt() 98 if (sizeof(wrap_ct) == outlen && !CRYPTO_memcmp(outbuf, wrap_ct, outlen)) in aes_wrap_encrypt() 120 unsigned char outbuf[1024]; in aes_wrap_decrypt() local 143 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, wrap_ct, sizeof(wrap_ct))) in aes_wrap_decrypt() 147 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_decrypt() 153 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_decrypt() 155 if (sizeof(wrap_pt) == outlen && !CRYPTO_memcmp(outbuf, wrap_pt, outlen)) in aes_wrap_decrypt()
|
H A D | ariacbc.c | 61 unsigned char outbuf[1024]; in aria_cbc_encrypt() local 83 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, cbc_pt, sizeof(cbc_pt))) in aria_cbc_encrypt() 87 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_encrypt() 93 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_encrypt() 95 if (sizeof(cbc_ct) == outlen && !CRYPTO_memcmp(outbuf, cbc_ct, outlen)) in aria_cbc_encrypt() 117 unsigned char outbuf[1024]; in aria_cbc_decrypt() local 138 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, cbc_ct, sizeof(cbc_ct))) in aria_cbc_decrypt() 142 if (!EVP_DecryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_decrypt() 148 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_decrypt() 150 if (sizeof(cbc_pt) == outlen && !CRYPTO_memcmp(outbuf, cbc_pt, outlen)) in aria_cbc_decrypt()
|
H A D | aesgcm.c | 77 unsigned char outbuf[1024]; in aes_gcm_encrypt() local 114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt() 119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt() 122 if (!EVP_EncryptFinal_ex(ctx, outbuf, &tmplen)) in aes_gcm_encrypt() 154 unsigned char outbuf[1024]; in aes_gcm_decrypt() local 186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt() 191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt() 201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
|
H A D | aesccm.c | 79 unsigned char outbuf[1024]; in aes_ccm_encrypt() local 124 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt))) in aes_ccm_encrypt() 129 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt() 164 unsigned char outbuf[1024]; in aes_ccm_decrypt() local 208 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt() 213 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()
|
/openssl/crypto/ct/ |
H A D | ct_b64.c | 28 unsigned char *outbuf = NULL; in ct_base64_decode() local 36 outbuf = OPENSSL_malloc(outlen); in ct_base64_decode() 37 if (outbuf == NULL) in ct_base64_decode() 40 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode() 54 *out = outbuf; in ct_base64_decode() 57 OPENSSL_free(outbuf); in ct_base64_decode()
|
/openssl/crypto/crmf/ |
H A D | crmf_lib.c | 634 unsigned char *outbuf = NULL; /* decryption output buffer */ in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() local 684 if ((p = outbuf = OPENSSL_malloc(ecert->encValue->length + in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() 691 || !EVP_DecryptUpdate(evp_ctx, outbuf, &outlen, in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() 694 || !EVP_DecryptFinal(evp_ctx, outbuf + outlen, &n)) { in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() 707 OPENSSL_free(outbuf); in OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert()
|
/openssl/providers/implementations/kdfs/ |
H A D | argon2.c | 855 uint8_t outbuf[BLAKE2B_OUTBYTES]; in blake2b_long() local 877 && EVP_DigestFinal_ex(ctx, (outlen > BLAKE2B_OUTBYTES) ? outbuf : out, in blake2b_long() 884 memcpy(out, outbuf, BLAKE2B_OUTBYTES / 2); in blake2b_long() 889 memcpy(inbuf, outbuf, BLAKE2B_OUTBYTES); in blake2b_long() 890 if (blake2b(md, mac, outbuf, BLAKE2B_OUTBYTES, inbuf, in blake2b_long() 893 memcpy(out, outbuf, BLAKE2B_OUTBYTES / 2); in blake2b_long() 898 memcpy(inbuf, outbuf, BLAKE2B_OUTBYTES); in blake2b_long() 899 if (blake2b(md, mac, outbuf, outlen_curr, inbuf, BLAKE2B_OUTBYTES, in blake2b_long() 902 memcpy(out, outbuf, outlen_curr); in blake2b_long()
|
/openssl/fuzz/ |
H A D | provider.c | 392 unsigned char outbuf[1024]; in do_evp_cipher() local 412 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, (const unsigned char *) intext, strlen(intext))) { in do_evp_cipher() 421 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) { in do_evp_cipher()
|
/openssl/doc/man3/ |
H A D | EVP_EncryptInit.pod | 1637 unsigned char outbuf[1024]; 1656 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, intext, strlen(intext))) { 1665 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) { 1683 fwrite(outbuf, 1, outlen, out); 1700 unsigned char inbuf[1024], outbuf[1024 + EVP_MAX_BLOCK_LENGTH]; 1732 if (!EVP_CipherUpdate(ctx, outbuf, &outlen, inbuf, inlen)) { 1737 fwrite(outbuf, 1, outlen, out); 1739 if (!EVP_CipherFinal_ex(ctx, outbuf, &outlen)) { 1744 fwrite(outbuf, 1, outlen, out);
|
/openssl/apps/ |
H A D | speed.c | 997 unsigned char *outbuf = tempargs->buf2; in EVP_Update_loop_aead_dec() local 1062 if (!EVP_DecryptUpdate(ctx, outbuf, &outl, buf, lengths[testnum])) { in EVP_Update_loop_aead_dec() 1067 if (EVP_DecryptFinal_ex(ctx, outbuf, &outl)) in EVP_Update_loop_aead_dec()
|