/openssl/providers/implementations/rands/seeding/ |
H A D | rand_win.c | 73 size_t bytes = 0; in ossl_pool_acquire_entropy() local 76 bytes = bytes_needed; in ossl_pool_acquire_entropy() 78 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy() 87 size_t bytes = 0; in ossl_pool_acquire_entropy() local 92 bytes = bytes_needed; in ossl_pool_acquire_entropy() 97 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy() 106 size_t bytes = 0; in ossl_pool_acquire_entropy() local 112 bytes = bytes_needed; in ossl_pool_acquire_entropy() 116 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
|
H A D | rand_unix.c | 638 ssize_t bytes; in ossl_pool_acquire_entropy() 646 if (bytes > 0) { in ossl_pool_acquire_entropy() 647 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy() 648 bytes_needed -= bytes; in ossl_pool_acquire_entropy() 675 ssize_t bytes = 0; in ossl_pool_acquire_entropy() 687 if (bytes > 0) { in ossl_pool_acquire_entropy() 688 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy() 689 bytes_needed -= bytes; in ossl_pool_acquire_entropy() 727 size_t bytes = 0; in ossl_pool_acquire_entropy() 734 bytes = bytes_needed; in ossl_pool_acquire_entropy() [all …]
|
/openssl/test/ |
H A D | cipherbytes_test.c | 30 const unsigned char bytes[] = {0x00}; in test_empty() local 33 if (!TEST_int_eq(SSL_bytes_to_cipher_list(s, bytes, 0, 0, &sk, &scsv), 0) in test_empty() 49 const unsigned char bytes[] = {0xc0, 0x0f, 0x00, 0x2f, 0x01, 0x00}; in test_unsupported() local 52 if (!TEST_true(SSL_bytes_to_cipher_list(s, bytes, sizeof(bytes), in test_unsupported() 74 const unsigned char bytes[] = {0x00, 0x00, 0x35, 0x01, 0x00, 0x80, in test_v2() local 78 if (!TEST_true(SSL_bytes_to_cipher_list(s, bytes, sizeof(bytes), 1, in test_v2() 104 const unsigned char bytes[] = {0x00, 0x2f, 0x00, 0x33, 0x00, 0x9f, 0x00, 0xff, in test_v3() local 108 if (!SSL_bytes_to_cipher_list(s, bytes, sizeof(bytes), 0, &sk, &scsv) in test_v3()
|
H A D | packettest.c | 156 const unsigned char *bytes = NULL; in test_PACKET_get_bytes() local 161 || !TEST_uchar_eq(bytes[0], 2) in test_PACKET_get_bytes() 162 || !TEST_uchar_eq(bytes[1], 4) in test_PACKET_get_bytes() 163 || !TEST_uchar_eq(bytes[2], 6) in test_PACKET_get_bytes() 164 || !TEST_uchar_eq(bytes[3], 8) in test_PACKET_get_bytes() 168 || !TEST_uchar_eq(bytes[0], 0xf8) in test_PACKET_get_bytes() 180 unsigned char bytes[4]; in test_PACKET_copy_bytes() local 185 || !TEST_char_eq(bytes[0], 2) in test_PACKET_copy_bytes() 186 || !TEST_char_eq(bytes[1], 4) in test_PACKET_copy_bytes() 187 || !TEST_char_eq(bytes[2], 6) in test_PACKET_copy_bytes() [all …]
|
H A D | bio_readbuffer_test.c | 32 size_t readbytes = 0, bytes = 0, count = 0; in test_readbuffer_file_bio() local 82 if (!TEST_int_eq(BIO_read_ex(in_bio, buf, len, &bytes), 1)) in test_readbuffer_file_bio() 84 if (!TEST_mem_eq(buf, bytes, expected + count, bytes)) in test_readbuffer_file_bio() 86 count += bytes; in test_readbuffer_file_bio()
|
H A D | sanitytest.c | 18 char bytes[sizeof(p)]; in test_sanity_null_zero() local 22 memset(bytes, 0, sizeof(bytes)); in test_sanity_null_zero() 23 return TEST_mem_eq(&p, sizeof(p), bytes, sizeof(bytes)); in test_sanity_null_zero()
|
H A D | wpackettest.c | 330 unsigned char *bytes; in test_WPACKET_allocate_bytes() local 335 bytes[0] = 0xfe; in test_WPACKET_allocate_bytes() 336 bytes[1] = 0xff; in test_WPACKET_allocate_bytes() 346 bytes[0] = 0xfe; in test_WPACKET_allocate_bytes() 347 bytes[1] = 0xff; in test_WPACKET_allocate_bytes() 363 || !TEST_true(WPACKET_memcpy(&pkt, bytes, sizeof(bytes))) in test_WPACKET_memcpy() 371 || !TEST_true(WPACKET_sub_memcpy_u8(&pkt, bytes, sizeof(bytes))) in test_WPACKET_memcpy() 455 unsigned char *bytes; in test_WPACKET_quic() local 525 bytes[0] = 0x55; in test_WPACKET_quic() 526 bytes[1] = 0x66; in test_WPACKET_quic() [all …]
|
/openssl/test/recipes/30-test_evp_data/ |
H A D | evpciph_aes_cts.txt | 17 # 32 bytes input 24 # 48 bytes input 31 # 64 bytes input 53 # 31 bytes input 62 # 32 bytes input 71 # 47 bytes input 91 # 47 bytes input 99 # 127 bytes 107 # 129 bytes 187 # 47 bytes input [all …]
|
H A D | evpciph_camellia_cts.txt | 69 # Plaintext: 13 bytes byte (31332062797465732062797465) 80 # Plaintext: 30 bytes bytes bytes bytes byt (333020627974657320627974657320627974657320627974657320… 124 # Plaintext: 13 bytes byte (31332062797465732062797465) 135 # Plaintext: 30 bytes bytes bytes bytes byt (333020627974657320627974657320627974657320627974657320…
|
/openssl/crypto/x509/ |
H A D | x509name.c | 145 ne = X509_NAME_ENTRY_create_by_OBJ(NULL, obj, type, bytes, len); in X509_NAME_add_entry_by_OBJ() 159 ne = X509_NAME_ENTRY_create_by_NID(NULL, nid, type, bytes, len); in X509_NAME_add_entry_by_NID() 173 ne = X509_NAME_ENTRY_create_by_txt(NULL, field, type, bytes, len); in X509_NAME_add_entry_by_txt() 253 nentry = X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); in X509_NAME_ENTRY_create_by_txt() 291 if (!X509_NAME_ENTRY_set_data(ret, type, bytes, len)) in X509_NAME_ENTRY_create_by_OBJ() 315 const unsigned char *bytes, int len) in X509_NAME_ENTRY_set_data() argument 319 if ((ne == NULL) || ((bytes == NULL) && (len != 0))) in X509_NAME_ENTRY_set_data() 322 return ASN1_STRING_set_by_NID(&ne->value, bytes, in X509_NAME_ENTRY_set_data() 326 len = strlen((const char *)bytes); in X509_NAME_ENTRY_set_data() 327 i = ASN1_STRING_set(ne->value, bytes, len); in X509_NAME_ENTRY_set_data() [all …]
|
/openssl/doc/man3/ |
H A D | EVP_EncodeInit.pod | 35 bytes of binary data provided 4 bytes of base 64 encoded data will be produced 48 is output plus an additional newline character (i.e. 65 bytes in total). The 49 final block (which may be less than 48 bytes) will output 4 bytes for every 3 50 bytes of input. If the data length is not divisible by 3 then a full 4 bytes is 60 blocks of data (48 bytes) will be immediately processed and output by this 77 65 bytes plus an additional NUL terminator (i.e. 66 bytes in total). 86 B<n> and stores it in B<t>. For every 3 bytes of input provided 4 bytes of 90 example if 16 bytes of input data is provided then 24 bytes of encoded data is 123 by 4. For every 4 input bytes exactly 3 output bytes will be produced. The 125 always 3 bytes for every 4 input bytes. This function will return the length of [all …]
|
H A D | PKCS12_add1_attr_by_NID.pod | 13 const unsigned char *bytes, int len); 15 const unsigned char *bytes, int len); 22 type B<type> constructed using B<len> bytes from B<bytes>. 25 ASN1 type B<type> constructed using B<len> bytes from B<bytes>.
|
H A D | SSL_pending.pod | 5 SSL_pending, SSL_has_pending - check for readable bytes buffered in an 21 SSL_pending() returns the number of bytes which have been processed, buffered 25 L<SSL_CTX_set_read_ahead(3)>), additional protocol bytes (beyond the current 28 additional bytes will be buffered by OpenSSL but will remain unprocessed until 29 they are needed. As these bytes are still in an unprocessed state SSL_pending() 30 will ignore them. Therefore, it is possible for no more bytes to be readable from 32 to return 0, even though readable application data bytes are available (because 48 bytes that are pending and are available for immediate read. SSL_has_pending()
|
H A D | SSL_CTX_set_read_ahead.pod | 8 - manage whether to read as many input bytes as possible 24 many input bytes as possible (for nonblocking reads) or not. For example if 25 B<x> bytes are currently required by OpenSSL, but B<y> bytes are available from 26 the underlying BIO (where B<y> > B<x>), then OpenSSL will read all B<y> bytes 28 on, or B<x> bytes otherwise.
|
/openssl/crypto/cms/ |
H A D | cms_att.c | 104 const void *bytes, int len) in CMS_signed_add1_attr_by_OBJ() argument 106 if (X509at_add1_attr_by_OBJ(&si->signedAttrs, obj, type, bytes, len)) in CMS_signed_add1_attr_by_OBJ() 112 int nid, int type, const void *bytes, int len) in CMS_signed_add1_attr_by_NID() argument 114 if (X509at_add1_attr_by_NID(&si->signedAttrs, nid, type, bytes, len)) in CMS_signed_add1_attr_by_NID() 121 const void *bytes, int len) in CMS_signed_add1_attr_by_txt() argument 171 const void *bytes, int len) in CMS_unsigned_add1_attr_by_OBJ() argument 173 if (X509at_add1_attr_by_OBJ(&si->unsignedAttrs, obj, type, bytes, len)) in CMS_unsigned_add1_attr_by_OBJ() 180 const void *bytes, int len) in CMS_unsigned_add1_attr_by_NID() argument 182 if (X509at_add1_attr_by_NID(&si->unsignedAttrs, nid, type, bytes, len)) in CMS_unsigned_add1_attr_by_NID() 189 const void *bytes, int len) in CMS_unsigned_add1_attr_by_txt() argument [all …]
|
/openssl/crypto/rand/ |
H A D | randfile.c | 84 int RAND_load_file(const char *file, long bytes) in RAND_load_file() argument 102 if (bytes == 0) in RAND_load_file() 119 if (bytes < 0) { in RAND_load_file() 121 bytes = sb.st_size; in RAND_load_file() 123 bytes = RAND_DRBG_STRENGTH; in RAND_load_file() 148 if (bytes > 0) in RAND_load_file() 149 n = (bytes <= RAND_LOAD_BUF_SIZE) ? (int)bytes : RAND_BUF_SIZE; in RAND_load_file() 167 if (bytes > 0 && (bytes -= i) <= 0) in RAND_load_file()
|
H A D | rand_egd.c | 21 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) in RAND_query_egd_bytes() argument 31 int RAND_egd_bytes(const char *path, int bytes) in RAND_egd_bytes() argument 109 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) in RAND_query_egd_bytes() argument 116 if (bytes > (int)sizeof(tempbuf)) in RAND_query_egd_bytes() 178 tempbuf[1] = bytes; in RAND_query_egd_bytes() 204 int RAND_egd_bytes(const char *path, int bytes) in RAND_egd_bytes() argument 208 num = RAND_query_egd_bytes(path, NULL, bytes); in RAND_egd_bytes()
|
/openssl/test/testutil/ |
H A D | format_output.c | 210 int n = bytes * 2, i; in convert_bn_memory() 272 const size_t bytes = bn_bytes; in test_fail_bignum_common() local 301 len = ((l1 > l2 ? l1 : l2) + bytes - 1) / bytes * bytes; in test_fail_bignum_common() 319 cnt = 8 * (len - bytes); in test_fail_bignum_common() 320 n1 = convert_bn_memory(m1, bytes, b1, &lz1, bn1); in test_fail_bignum_common() 351 m1 += bytes; in test_fail_bignum_common() 353 m2 += bytes; in test_fail_bignum_common() 354 len -= bytes; in test_fail_bignum_common() 459 n1 = l1 > bytes ? bytes : l1; in test_fail_memory_common() 463 n2 = l2 > bytes ? bytes : l2; in test_fail_memory_common() [all …]
|
/openssl/include/internal/ |
H A D | packet.h | 908 #define WPACKET_sub_allocate_bytes_u8(pkt, len, bytes) \ argument 910 #define WPACKET_sub_allocate_bytes_u16(pkt, len, bytes) \ argument 912 #define WPACKET_sub_allocate_bytes_u24(pkt, len, bytes) \ argument 914 #define WPACKET_sub_allocate_bytes_u32(pkt, len, bytes) \ argument 946 #define WPACKET_sub_reserve_bytes_u8(pkt, len, bytes) \ argument 947 WPACKET_reserve_bytes__((pkt), (len), (bytes), 1) 948 #define WPACKET_sub_reserve_bytes_u16(pkt, len, bytes) \ argument 949 WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 2) 950 #define WPACKET_sub_reserve_bytes_u24(pkt, len, bytes) \ argument 951 WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 3) [all …]
|
/openssl/crypto/whrlpool/ |
H A D | wp_dgst.c | 71 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *_inp, size_t bytes) in WHIRLPOOL_Update() argument 81 while (bytes >= chunk) { in WHIRLPOOL_Update() 83 bytes -= chunk; in WHIRLPOOL_Update() 86 if (bytes) in WHIRLPOOL_Update() 87 WHIRLPOOL_BitUpdate(c, inp, bytes * 8); in WHIRLPOOL_Update() 253 unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md) in WHIRLPOOL() argument 261 WHIRLPOOL_Update(&ctx, inp, bytes); in WHIRLPOOL()
|
/openssl/crypto/bn/ |
H A D | bn_rand.c | 27 int b, ret = 0, bit, bytes, mask; in bnrand() local 39 bytes = (bits + 7) / 8; in bnrand() 43 buf = OPENSSL_malloc(bytes); in bnrand() 50 b = flag == NORMAL ? RAND_bytes_ex(libctx, buf, bytes, strength) in bnrand() 51 : RAND_priv_bytes_ex(libctx, buf, bytes, strength); in bnrand() 62 for (i = 0; i < bytes; i++) { in bnrand() 88 buf[bytes - 1] |= 1; in bnrand() 89 if (!BN_bin2bn(buf, bytes, rnd)) in bnrand() 93 OPENSSL_clear_free(buf, bytes); in bnrand()
|
/openssl/test/helpers/ |
H A D | pkcs12.h | 79 void add_certbag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len, 81 void add_keybag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len, 97 void check_certbag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len, 99 void check_keybag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len,
|
/openssl/doc/internal/man3/ |
H A D | ossl_rand_get_entropy.pod | 27 The seeding material will have at least I<entropy> bytes of randomness and is 29 bytes. The buffer address is stored in I<*pout> and the buffer length is 34 of length I<len> bytes. 41 most I<max_len> bytes. The buffer address is stored in I<*pout> and the 46 of length I<len> bytes. 50 ossl_rand_get_entropy() and ossl_rand_get_nonce() return the number of bytes
|
/openssl/crypto/asn1/ |
H A D | p8_pkey.c | 75 const unsigned char *bytes, int len) in PKCS8_pkey_add1_attr_by_NID() argument 77 if (X509at_add1_attr_by_NID(&p8->attributes, nid, type, bytes, len) != NULL) in PKCS8_pkey_add1_attr_by_NID() 83 const unsigned char *bytes, int len) in PKCS8_pkey_add1_attr_by_OBJ() argument 85 return (X509at_add1_attr_by_OBJ(&p8->attributes, obj, type, bytes, len) != NULL); in PKCS8_pkey_add1_attr_by_OBJ()
|
/openssl/crypto/pkcs12/ |
H A D | p12_attr.c | 78 const unsigned char *bytes, int len) in PKCS12_add1_attr_by_NID() argument 80 if (X509at_add1_attr_by_NID(&bag->attrib, nid, type, bytes, len) != NULL) in PKCS12_add1_attr_by_NID() 87 const unsigned char *bytes, int len) in PKCS12_add1_attr_by_txt() argument 89 if (X509at_add1_attr_by_txt(&bag->attrib, attrname, type, bytes, len) != NULL) in PKCS12_add1_attr_by_txt()
|