grpc 1.41.0 → 1.41.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +4 -3
- data/etc/roots.pem +335 -326
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/err_data.c +278 -272
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +15 -22
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +13 -7
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +19 -29
- data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/a_strex.c +268 -271
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +6 -43
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +0 -39
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/charmap.h +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +8 -8
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +289 -198
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +8 -8
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +9 -13
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +11 -8
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +1 -7
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +1 -5
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +0 -4
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +1 -7
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +1 -6
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +3 -17
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +9 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +8 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +45 -65
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +21 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +5 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +24 -9
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +12 -9
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +0 -9
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +0 -8
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +0 -4
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +16 -7
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +9 -4
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +151 -12
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +181 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +11 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +0 -179
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +0 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +11 -50
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +2 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +0 -16
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +22 -18
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +11 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_int.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +4 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +24 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +17 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +112 -55
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +71 -26
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +304 -192
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +2 -9
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +5 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +3 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +3 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +9 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +8 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +9 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +0 -20
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +12 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +5 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +37 -15
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +26 -12
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +31 -32
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +50 -76
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +0 -131
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +48 -8
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +266 -357
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +90 -152
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +15 -13
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +75 -79
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +96 -97
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +63 -43
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +6 -12
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +14 -16
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +14 -27
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +203 -203
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +30 -41
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +47 -33
- metadata +39 -38
@@ -66,8 +66,6 @@
|
|
66
66
|
#include "internal.h"
|
67
67
|
#include "../bytestring/internal.h"
|
68
68
|
|
69
|
-
static int is_printable(uint32_t value);
|
70
|
-
|
71
69
|
/*
|
72
70
|
* These functions take a string in UTF8, ASCII or multibyte form and a mask
|
73
71
|
* of permissible ASN1 string types. It then works out the minimal type
|
@@ -153,7 +151,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|
153
151
|
}
|
154
152
|
|
155
153
|
/* Update which output formats are still possible. */
|
156
|
-
if ((mask & B_ASN1_PRINTABLESTRING) && !
|
154
|
+
if ((mask & B_ASN1_PRINTABLESTRING) && !asn1_is_printable(c)) {
|
157
155
|
mask &= ~B_ASN1_PRINTABLESTRING;
|
158
156
|
}
|
159
157
|
if ((mask & B_ASN1_IA5STRING) && (c > 127)) {
|
@@ -208,11 +206,14 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|
208
206
|
encode_func = cbb_add_utf32_be;
|
209
207
|
size_estimate = 4 * nchar;
|
210
208
|
outform = MBSTRING_UNIV;
|
211
|
-
} else {
|
209
|
+
} else if (mask & B_ASN1_UTF8STRING) {
|
212
210
|
str_type = V_ASN1_UTF8STRING;
|
213
211
|
outform = MBSTRING_UTF8;
|
214
212
|
encode_func = cbb_add_utf8;
|
215
213
|
size_estimate = utf8_len;
|
214
|
+
} else {
|
215
|
+
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_CHARACTERS);
|
216
|
+
return -1;
|
216
217
|
}
|
217
218
|
|
218
219
|
if (!out)
|
@@ -282,24 +283,16 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
|
282
283
|
return -1;
|
283
284
|
}
|
284
285
|
|
285
|
-
|
286
|
-
static int is_printable(uint32_t value)
|
286
|
+
int asn1_is_printable(uint32_t value)
|
287
287
|
{
|
288
|
-
|
289
|
-
if (value > 0x7f)
|
288
|
+
if (value > 0x7f) {
|
290
289
|
return 0;
|
291
|
-
|
292
|
-
/*
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
return 1;
|
300
|
-
if ((ch >= '0') && (ch <= '9'))
|
301
|
-
return 1;
|
302
|
-
if ((ch == ' ') || strchr("'()+,-./:=?", ch))
|
303
|
-
return 1;
|
304
|
-
return 0;
|
290
|
+
}
|
291
|
+
/* Note we cannot use |isalnum| because it is locale-dependent. */
|
292
|
+
return ('a' <= value && value <= 'z') || //
|
293
|
+
('A' <= value && value <= 'Z') || //
|
294
|
+
('0' <= value && value <= '9') || //
|
295
|
+
value == ' ' || value == '\'' || value == '(' || value == ')' ||
|
296
|
+
value == '+' || value == ',' || value == '-' || value == '.' ||
|
297
|
+
value == '/' || value == ':' || value == '=' || value == '?';
|
305
298
|
}
|
@@ -69,20 +69,26 @@
|
|
69
69
|
|
70
70
|
int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp)
|
71
71
|
{
|
72
|
-
|
73
|
-
|
72
|
+
if (a == NULL) {
|
73
|
+
OPENSSL_PUT_ERROR(ASN1, ERR_R_PASSED_NULL_PARAMETER);
|
74
|
+
return -1;
|
75
|
+
}
|
74
76
|
|
75
|
-
if (
|
76
|
-
|
77
|
+
if (a->length == 0) {
|
78
|
+
OPENSSL_PUT_ERROR(ASN1, ASN1_R_ILLEGAL_OBJECT);
|
79
|
+
return -1;
|
80
|
+
}
|
77
81
|
|
78
|
-
objsize = ASN1_object_size(0, a->length, V_ASN1_OBJECT);
|
79
|
-
if (pp == NULL || objsize == -1)
|
82
|
+
int objsize = ASN1_object_size(0, a->length, V_ASN1_OBJECT);
|
83
|
+
if (pp == NULL || objsize == -1) {
|
80
84
|
return objsize;
|
85
|
+
}
|
81
86
|
|
87
|
+
unsigned char *p, *allocated = NULL;
|
82
88
|
if (*pp == NULL) {
|
83
89
|
if ((p = allocated = OPENSSL_malloc(objsize)) == NULL) {
|
84
90
|
OPENSSL_PUT_ERROR(ASN1, ERR_R_MALLOC_FAILURE);
|
85
|
-
return
|
91
|
+
return -1;
|
86
92
|
}
|
87
93
|
} else {
|
88
94
|
p = *pp;
|
@@ -56,38 +56,28 @@
|
|
56
56
|
|
57
57
|
#include <openssl/asn1.h>
|
58
58
|
|
59
|
-
#include <
|
60
|
-
|
59
|
+
#include <string.h>
|
60
|
+
|
61
|
+
#include "internal.h"
|
62
|
+
|
61
63
|
|
62
64
|
int ASN1_PRINTABLE_type(const unsigned char *s, int len)
|
63
65
|
{
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
if (len <= 0)
|
69
|
-
len = -1;
|
70
|
-
if (s == NULL)
|
71
|
-
return (V_ASN1_PRINTABLESTRING);
|
66
|
+
if (len < 0) {
|
67
|
+
len = strlen((const char *)s);
|
68
|
+
}
|
72
69
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
(c == '/') || (c == ':') || (c == '=') || (c == '?')))
|
84
|
-
ia5 = 1;
|
85
|
-
if (c & 0x80)
|
86
|
-
t61 = 1;
|
70
|
+
int printable = 1;
|
71
|
+
for (int i = 0; i < len; i++) {
|
72
|
+
unsigned char c = s[i];
|
73
|
+
if (c & 0x80) {
|
74
|
+
/* No need to continue iterating. */
|
75
|
+
return V_ASN1_T61STRING;
|
76
|
+
}
|
77
|
+
if (!asn1_is_printable(c)) {
|
78
|
+
printable = 0;
|
79
|
+
}
|
87
80
|
}
|
88
|
-
|
89
|
-
|
90
|
-
if (ia5)
|
91
|
-
return (V_ASN1_IA5STRING);
|
92
|
-
return (V_ASN1_PRINTABLESTRING);
|
81
|
+
|
82
|
+
return printable ? V_ASN1_PRINTABLESTRING : V_ASN1_IA5STRING;
|
93
83
|
}
|