Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 338) sorted by relevance

12345678910>>...14

/openssl/providers/implementations/rands/seeding/
H A Drand_win.c73 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 Drand_unix.c635 ssize_t bytes; in ossl_pool_acquire_entropy()
643 if (bytes > 0) { in ossl_pool_acquire_entropy()
644 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
645 bytes_needed -= bytes; in ossl_pool_acquire_entropy()
666 ssize_t bytes = 0; in ossl_pool_acquire_entropy()
678 if (bytes > 0) { in ossl_pool_acquire_entropy()
679 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
680 bytes_needed -= bytes; in ossl_pool_acquire_entropy()
718 size_t bytes = 0; in ossl_pool_acquire_entropy()
725 bytes = bytes_needed; in ossl_pool_acquire_entropy()
[all …]
/openssl/test/
H A Dcipherbytes_test.c30 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 Dpackettest.c156 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 Dbio_base64_test.c23 unsigned bytes; member
202 raw = OPENSSL_zalloc(t->bytes); in test_bio_base64_run()
204 raw = genbytes(t->bytes); in test_bio_base64_run()
206 if (raw == NULL && t->bytes > 0) { in test_bio_base64_run()
211 out_len = t->bytes + 1024; in test_bio_base64_run()
296 || n != (int) t->bytes in test_bio_base64_run()
334 fprintf(stderr, ", datalen=%u", t->bytes); in generic_case()
356 if (*llen > t->bytes + (t->bytes >> 1)) in generic_case()
389 t.bytes = lengths[lencase]; in test_bio_base64_generated()
392 t.bytes += padcase; in test_bio_base64_generated()
[all …]
H A Dbio_readbuffer_test.c32 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 Dwpackettest.c334 unsigned char *bytes; in test_WPACKET_allocate_bytes() local
339 bytes[0] = 0xfe; in test_WPACKET_allocate_bytes()
340 bytes[1] = 0xff; in test_WPACKET_allocate_bytes()
350 bytes[0] = 0xfe; in test_WPACKET_allocate_bytes()
351 bytes[1] = 0xff; in test_WPACKET_allocate_bytes()
367 || !TEST_true(WPACKET_memcpy(&pkt, bytes, sizeof(bytes))) in test_WPACKET_memcpy()
375 || !TEST_true(WPACKET_sub_memcpy_u8(&pkt, bytes, sizeof(bytes))) in test_WPACKET_memcpy()
461 unsigned char *bytes; in test_WPACKET_quic() local
531 bytes[0] = 0x55; in test_WPACKET_quic()
532 bytes[1] = 0x66; in test_WPACKET_quic()
[all …]
/openssl/test/recipes/30-test_evp_data/
H A Devpciph_aes_cts.txt17 # 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 Devpciph_camellia_cts.txt69 # 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 Dx509name.c148 ne = X509_NAME_ENTRY_create_by_OBJ(NULL, obj, type, bytes, len); in X509_NAME_add_entry_by_OBJ()
162 ne = X509_NAME_ENTRY_create_by_NID(NULL, nid, type, bytes, len); in X509_NAME_add_entry_by_NID()
176 ne = X509_NAME_ENTRY_create_by_txt(NULL, field, type, bytes, len); in X509_NAME_add_entry_by_txt()
256 nentry = X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); in X509_NAME_ENTRY_create_by_txt()
294 if (!X509_NAME_ENTRY_set_data(ret, type, bytes, len)) in X509_NAME_ENTRY_create_by_OBJ()
318 const unsigned char *bytes, int len) in X509_NAME_ENTRY_set_data() argument
322 if ((ne == NULL) || ((bytes == NULL) && (len != 0))) in X509_NAME_ENTRY_set_data()
325 return ASN1_STRING_set_by_NID(&ne->value, bytes, in X509_NAME_ENTRY_set_data()
329 len = strlen((const char *)bytes); in X509_NAME_ENTRY_set_data()
330 i = ASN1_STRING_set(ne->value, bytes, len); in X509_NAME_ENTRY_set_data()
[all …]
H A Dx509_att.c143 attr = X509_ATTRIBUTE_create_by_OBJ(NULL, obj, type, bytes, len); in STACK_OF()
154 const unsigned char *bytes, in STACK_OF()
167 return ossl_x509at_add1_attr_by_OBJ(x, obj, type, bytes, len); in STACK_OF()
178 attr = X509_ATTRIBUTE_create_by_NID(NULL, nid, type, bytes, len); in STACK_OF()
188 const unsigned char *bytes, in STACK_OF()
201 return ossl_x509at_add1_attr_by_NID(x, nid, type, bytes, len); in STACK_OF()
213 attr = X509_ATTRIBUTE_create_by_txt(NULL, attrname, type, bytes, len); in STACK_OF()
224 const unsigned char *bytes, in STACK_OF()
230 attr = X509_ATTRIBUTE_create_by_txt(NULL, attrname, type, bytes, len); in STACK_OF()
317 const unsigned char *bytes, in X509_ATTRIBUTE_create_by_txt() argument
[all …]
/openssl/crypto/cms/
H A Dcms_att.c105 const void *bytes, int len) in CMS_signed_add1_attr_by_OBJ() argument
107 if (ossl_x509at_add1_attr_by_OBJ(&si->signedAttrs, obj, type, bytes, len)) in CMS_signed_add1_attr_by_OBJ()
113 int nid, int type, const void *bytes, int len) in CMS_signed_add1_attr_by_NID() argument
115 if (ossl_x509at_add1_attr_by_NID(&si->signedAttrs, nid, type, bytes, len)) in CMS_signed_add1_attr_by_NID()
122 const void *bytes, int len) in CMS_signed_add1_attr_by_txt() argument
124 if (ossl_x509at_add1_attr_by_txt(&si->signedAttrs, attrname, type, bytes, in CMS_signed_add1_attr_by_txt()
173 const void *bytes, int len) in CMS_unsigned_add1_attr_by_OBJ() argument
175 if (ossl_x509at_add1_attr_by_OBJ(&si->unsignedAttrs, obj, type, bytes, len)) in CMS_unsigned_add1_attr_by_OBJ()
182 const void *bytes, int len) in CMS_unsigned_add1_attr_by_NID() argument
191 const void *bytes, int len) in CMS_unsigned_add1_attr_by_txt() argument
[all …]
/openssl/doc/man3/
H A DEVP_EncodeInit.pod36 bytes of binary data provided 4 bytes of base64 encoded data will be produced
49 For each 48 byte input block encoded 64 bytes of base64 data
51 final block (which may be less than 48 bytes) will output 4 bytes for every 3
52 bytes of input. If the data length is not divisible by 3 then a full 4 bytes is
79 65 bytes plus an additional NUL terminator (i.e. 66 bytes in total).
88 B<n> and stores it in B<t>. For every 3 bytes of input provided 4 bytes of
92 example if 16 bytes of input data is provided then 24 bytes of encoded data is
117 input bytes.
149 For every 4 input bytes exactly 3 output bytes will be produced.
152 bytes at the tail of the returned output.
[all …]
H A DX509_ACERT_add1_attr.pod18 const void *bytes, int len);
20 int type, const void *bytes, int len);
22 const unsigned char *bytes, int len);
32 type I<type> constructed using I<len> bytes from I<bytes>.
35 ASN1 type I<type> constructed using I<len> bytes from I<bytes>.
H A DPKCS12_add1_attr_by_NID.pod13 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 DSSL_pending.pod5 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()
/openssl/crypto/rand/
H A Drandfile.c85 int RAND_load_file(const char *file, long bytes) in RAND_load_file() argument
103 if (bytes == 0) in RAND_load_file()
120 if (bytes < 0) { in RAND_load_file()
122 bytes = sb.st_size; in RAND_load_file()
124 bytes = RAND_DRBG_STRENGTH; in RAND_load_file()
149 if (bytes > 0) in RAND_load_file()
150 n = (bytes <= RAND_LOAD_BUF_SIZE) ? (int)bytes : RAND_BUF_SIZE; in RAND_load_file()
168 if (bytes > 0 && (bytes -= i) <= 0) in RAND_load_file()
H A Drand_egd.c21 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 Dformat_output.c209 int n = bytes * 2, i; in convert_bn_memory()
271 const size_t bytes = bn_bytes; in test_fail_bignum_common() local
300 len = ((l1 > l2 ? l1 : l2) + bytes - 1) / bytes * bytes; in test_fail_bignum_common()
318 cnt = 8 * (len - bytes); in test_fail_bignum_common()
319 n1 = convert_bn_memory(m1, bytes, b1, &lz1, bn1); in test_fail_bignum_common()
350 m1 += bytes; in test_fail_bignum_common()
352 m2 += bytes; in test_fail_bignum_common()
353 len -= bytes; in test_fail_bignum_common()
458 n1 = l1 > bytes ? bytes : l1; in test_fail_memory_common()
462 n2 = l2 > bytes ? bytes : l2; in test_fail_memory_common()
[all …]
/openssl/include/internal/
H A Dpacket.h817 #define WPACKET_sub_allocate_bytes_u8(pkt, len, bytes) \ argument
819 #define WPACKET_sub_allocate_bytes_u16(pkt, len, bytes) \ argument
821 #define WPACKET_sub_allocate_bytes_u24(pkt, len, bytes) \ argument
823 #define WPACKET_sub_allocate_bytes_u32(pkt, len, bytes) \ argument
855 #define WPACKET_sub_reserve_bytes_u8(pkt, len, bytes) \ argument
856 WPACKET_reserve_bytes__((pkt), (len), (bytes), 1)
857 #define WPACKET_sub_reserve_bytes_u16(pkt, len, bytes) \ argument
858 WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 2)
859 #define WPACKET_sub_reserve_bytes_u24(pkt, len, bytes) \ argument
860 WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 3)
[all …]
/openssl/doc/man1/
H A Dopenssl-rand.pod.in6 openssl-rand - generate pseudo-random bytes
21 This command generates I<num> random bytes using a cryptographically
26 (K = 1024 bytes, M = 1024*1024 bytes, etc).
29 maximum number of bytes the CSPRNG can produce per instantiation. Currently,
30 this is restricted to 2^61 bytes as per NIST SP 800-90C.
32 The random bytes are generated using the L<RAND_bytes(3)> function,
/openssl/crypto/whrlpool/
H A Dwp_dgst.c71 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 Dbn_rand.c27 int b, ret = 0, bit, bytes, mask; in bnrand() local
39 bytes = (bits + 7) / 8; in bnrand()
43 buf = OPENSSL_malloc(bytes); in bnrand()
48 b = flag == NORMAL ? RAND_bytes_ex(libctx, buf, bytes, strength) in bnrand()
49 : RAND_priv_bytes_ex(libctx, buf, bytes, strength); in bnrand()
60 for (i = 0; i < bytes; i++) { in bnrand()
86 buf[bytes - 1] |= 1; in bnrand()
87 if (!BN_bin2bn(buf, bytes, rnd)) in bnrand()
91 OPENSSL_clear_free(buf, bytes); in bnrand()
/openssl/test/helpers/
H A Dpkcs12.h79 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,
98 void check_certbag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len,
100 void check_keybag(PKCS12_BUILDER *pb, const unsigned char *bytes, int len,
/openssl/doc/designs/quic-design/
H A Dquic-fc.md11 bytes allowed to be sent on a stream, or across all streams, since the beginning
19 that the total number of logical bytes sent on a given stream is equivalent to
30 bytes transmitted across all streams since the start of the connection.
61 - **Controlled bytes** refers to any byte which counts for purposes of flow
74 controlled bytes since the beginning of the connection or stream.
82 - The **Credit Watermark** (CWM), which is the number of bytes which have
130 number of controlled bytes we are allowed to send since the start of the
189 a stream-level flow controller whenever we receive any controlled bytes.
190 `numBytes` is the number of controlled bytes we received. (This event is
194 stream payload bytes) have been received).
[all …]

Completed in 39 milliseconds

12345678910>>...14