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.

Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +4 -3
  3. data/etc/roots.pem +335 -326
  4. data/src/ruby/ext/grpc/extconf.rb +1 -1
  5. data/src/ruby/lib/grpc/version.rb +1 -1
  6. data/third_party/boringssl-with-bazel/err_data.c +278 -272
  7. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +1 -1
  8. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +0 -2
  9. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +5 -0
  10. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +15 -22
  11. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +13 -7
  12. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +19 -29
  13. data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/a_strex.c +268 -271
  14. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +6 -43
  15. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +2 -2
  16. data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +0 -39
  17. data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +1 -1
  18. data/third_party/boringssl-with-bazel/src/crypto/{x509 → asn1}/charmap.h +0 -0
  19. data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +25 -0
  20. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +8 -8
  21. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +289 -198
  22. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +8 -8
  23. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +9 -13
  24. data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +1 -0
  25. data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +11 -8
  26. data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +1 -7
  27. data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +1 -5
  28. data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +0 -4
  29. data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +1 -7
  30. data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +1 -6
  31. data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +3 -17
  32. data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +9 -0
  33. data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +8 -0
  34. data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +45 -65
  35. data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +1 -0
  36. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +21 -3
  37. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +3 -2
  38. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +5 -2
  39. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +10 -0
  40. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +1 -1
  41. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +1 -1
  42. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +1 -1
  43. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +24 -9
  44. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +4 -2
  45. data/third_party/boringssl-with-bazel/src/crypto/mem.c +12 -9
  46. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +0 -9
  47. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +0 -2
  48. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +0 -8
  49. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +0 -2
  50. data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +0 -4
  51. data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +16 -7
  52. data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +9 -4
  53. data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +151 -12
  54. data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1 -1
  55. data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +2 -0
  56. data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +181 -1
  57. data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
  58. data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +11 -2
  59. data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +0 -2
  60. data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +0 -179
  61. data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +4 -2
  62. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +0 -5
  63. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -0
  64. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +11 -50
  65. data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +1 -1
  66. data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +2 -4
  67. data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +0 -16
  68. data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +22 -18
  69. data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +11 -8
  70. data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +16 -0
  71. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +1 -0
  72. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +1 -1
  73. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_int.h +1 -1
  74. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +1 -0
  75. data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +4 -3
  76. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +24 -5
  77. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +17 -8
  78. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -0
  79. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +6 -6
  80. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +4 -0
  81. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +5 -0
  82. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +112 -55
  83. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +2 -1
  84. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +0 -2
  85. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +1 -0
  86. data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +71 -26
  87. data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +304 -192
  88. data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +2 -9
  89. data/third_party/boringssl-with-bazel/src/include/openssl/base.h +5 -3
  90. data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +3 -1
  91. data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +3 -3
  92. data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +9 -0
  93. data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +8 -2
  94. data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +4 -0
  95. data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +9 -3
  96. data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +0 -20
  97. data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +12 -5
  98. data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +5 -0
  99. data/third_party/boringssl-with-bazel/src/include/openssl/span.h +37 -15
  100. data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +26 -12
  101. data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +31 -32
  102. data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +50 -76
  103. data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +0 -131
  104. data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +48 -8
  105. data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +266 -357
  106. data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +90 -152
  107. data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +15 -13
  108. data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +75 -79
  109. data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +96 -97
  110. data/third_party/boringssl-with-bazel/src/ssl/internal.h +63 -43
  111. data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +2 -2
  112. data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +2 -2
  113. data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +6 -12
  114. data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +14 -16
  115. data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +14 -27
  116. data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +203 -203
  117. data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +30 -41
  118. data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +47 -33
  119. 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) && !is_printable(c)) {
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
- /* Return 1 if the character is permitted in a PrintableString */
286
- static int is_printable(uint32_t value)
286
+ int asn1_is_printable(uint32_t value)
287
287
  {
288
- int ch;
289
- if (value > 0x7f)
288
+ if (value > 0x7f) {
290
289
  return 0;
291
- ch = (int)value;
292
- /*
293
- * Note: we can't use 'isalnum' because certain accented characters may
294
- * count as alphanumeric in some environments.
295
- */
296
- if ((ch >= 'a') && (ch <= 'z'))
297
- return 1;
298
- if ((ch >= 'A') && (ch <= 'Z'))
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
- unsigned char *p, *allocated = NULL;
73
- int objsize;
72
+ if (a == NULL) {
73
+ OPENSSL_PUT_ERROR(ASN1, ERR_R_PASSED_NULL_PARAMETER);
74
+ return -1;
75
+ }
74
76
 
75
- if ((a == NULL) || (a->data == NULL))
76
- return (0);
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 0;
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 <openssl/err.h>
60
- #include <openssl/mem.h>
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
- int c;
65
- int ia5 = 0;
66
- int t61 = 0;
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
- while ((*s) && (len-- != 0)) {
74
- c = *(s++);
75
- if (!(((c >= 'a') && (c <= 'z')) ||
76
- ((c >= 'A') && (c <= 'Z')) ||
77
- (c == ' ') ||
78
- ((c >= '0') && (c <= '9')) ||
79
- (c == ' ') || (c == '\'') ||
80
- (c == '(') || (c == ')') ||
81
- (c == '+') || (c == ',') ||
82
- (c == '-') || (c == '.') ||
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
- if (t61)
89
- return (V_ASN1_T61STRING);
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
  }