openssl 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of openssl might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc80177aa96ab17f6920d0e790efce7b53562e92
4
- data.tar.gz: dfc39bf0895ae109cb29de4df756695676ee2b39
3
+ metadata.gz: a5fc7434da3c037df14f771cf28ecfe09aca0913
4
+ data.tar.gz: 15266849694e11a7c9b613daac1d72c05381ac2d
5
5
  SHA512:
6
- metadata.gz: 65a3823e00d851a8ced0f6beabc81ec3a100ad01fe4da8e41ca3ae5763fd45c284717ffd1f7257fc632b492662c8234b686dacf12e0a6097727f886bef884dff
7
- data.tar.gz: 66c8d3f98438ef4f8e1dae8658551d5cd92a9ba138ad4ecb0d82b70911e3cf4f54e4095d489ba174d2f20ca5e29ff7c2c64a2d490fa1c29b9636606071d6b94f
6
+ metadata.gz: 4ba1268157ef5e5cf7972df04b0f189412aa3ed66e7d510f4cb2afd2e16010f02eaaf8cd4bfa63919995f0e9258c14004874be7857c81ffa37a33c639f56c57f
7
+ data.tar.gz: ee568fed49aa95b9daf6c0dd58bf140f3af1dbc61f4041d5e3203568a5361f9817be92e0738fc64de1727d82a3be06d2806616b8a31279ce935e994bf23d11ab
@@ -81,6 +81,7 @@ engines.each { |name|
81
81
  # added in 0.9.8X
82
82
  have_func("EVP_CIPHER_CTX_new")
83
83
  have_func("EVP_CIPHER_CTX_free")
84
+ OpenSSL.check_func_or_macro("SSL_CTX_clear_options", "openssl/ssl.h")
84
85
 
85
86
  # added in 1.0.0
86
87
  have_func("ASN1_TIME_adj")
@@ -143,6 +144,7 @@ OpenSSL.check_func_or_macro("SSL_CTX_set_tmp_ecdh_callback", "openssl/ssl.h") #
143
144
  OpenSSL.check_func_or_macro("SSL_CTX_set_min_proto_version", "openssl/ssl.h")
144
145
  have_func("SSL_CTX_get_security_level")
145
146
  have_func("X509_get0_notBefore")
147
+ have_func("SSL_SESSION_get_protocol_version")
146
148
 
147
149
  Logging::message "=== Checking done. ===\n"
148
150
 
@@ -23,7 +23,7 @@
23
23
  /* added in 0.9.8X */
24
24
  #if !defined(HAVE_EVP_CIPHER_CTX_NEW)
25
25
  EVP_CIPHER_CTX *
26
- EVP_CIPHER_CTX_new(void)
26
+ ossl_EVP_CIPHER_CTX_new(void)
27
27
  {
28
28
  EVP_CIPHER_CTX *ctx = OPENSSL_malloc(sizeof(EVP_CIPHER_CTX));
29
29
  if (!ctx)
@@ -35,7 +35,7 @@ EVP_CIPHER_CTX_new(void)
35
35
 
36
36
  #if !defined(HAVE_EVP_CIPHER_CTX_FREE)
37
37
  void
38
- EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
38
+ ossl_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
39
39
  {
40
40
  if (ctx) {
41
41
  EVP_CIPHER_CTX_cleanup(ctx);
@@ -52,7 +52,7 @@ EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
52
52
  * tested on 0.9.7d.
53
53
  */
54
54
  int
55
- EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
55
+ ossl_EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
56
56
  {
57
57
  memcpy(out, in, sizeof(EVP_CIPHER_CTX));
58
58
 
@@ -71,7 +71,7 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
71
71
  #if !defined(OPENSSL_NO_HMAC)
72
72
  #if !defined(HAVE_HMAC_CTX_COPY)
73
73
  int
74
- HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
74
+ ossl_HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
75
75
  {
76
76
  if (!out || !in)
77
77
  return 0;
@@ -112,7 +112,7 @@ static struct {
112
112
  };
113
113
 
114
114
  int
115
- EC_curve_nist2nid(const char *name)
115
+ ossl_EC_curve_nist2nid(const char *name)
116
116
  {
117
117
  size_t i;
118
118
  for (i = 0; i < (sizeof(nist_curves) / sizeof(nist_curves[0])); i++) {
@@ -127,7 +127,7 @@ EC_curve_nist2nid(const char *name)
127
127
  /*** added in 1.1.0 ***/
128
128
  #if !defined(HAVE_HMAC_CTX_NEW)
129
129
  HMAC_CTX *
130
- HMAC_CTX_new(void)
130
+ ossl_HMAC_CTX_new(void)
131
131
  {
132
132
  HMAC_CTX *ctx = OPENSSL_malloc(sizeof(HMAC_CTX));
133
133
  if (!ctx)
@@ -139,7 +139,7 @@ HMAC_CTX_new(void)
139
139
 
140
140
  #if !defined(HAVE_HMAC_CTX_FREE)
141
141
  void
142
- HMAC_CTX_free(HMAC_CTX *ctx)
142
+ ossl_HMAC_CTX_free(HMAC_CTX *ctx)
143
143
  {
144
144
  if (ctx) {
145
145
  HMAC_CTX_cleanup(ctx);
@@ -150,8 +150,8 @@ HMAC_CTX_free(HMAC_CTX *ctx)
150
150
 
151
151
  #if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
152
152
  void
153
- X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
154
- const X509_ALGOR **palg)
153
+ ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
154
+ const X509_ALGOR **palg)
155
155
  {
156
156
  if (psig != NULL)
157
157
  *psig = crl->signature;
@@ -162,8 +162,8 @@ X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
162
162
 
163
163
  #if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
164
164
  void
165
- X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
166
- const X509_ALGOR **palg)
165
+ ossl_X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
166
+ const X509_ALGOR **palg)
167
167
  {
168
168
  if (psig != NULL)
169
169
  *psig = req->signature;
@@ -14,11 +14,17 @@
14
14
 
15
15
  /* added in 0.9.8X */
16
16
  #if !defined(HAVE_EVP_CIPHER_CTX_NEW)
17
- EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
17
+ EVP_CIPHER_CTX *ossl_EVP_CIPHER_CTX_new(void);
18
+ # define EVP_CIPHER_CTX_new ossl_EVP_CIPHER_CTX_new
18
19
  #endif
19
20
 
20
21
  #if !defined(HAVE_EVP_CIPHER_CTX_FREE)
21
- void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
22
+ void ossl_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *);
23
+ # define EVP_CIPHER_CTX_free ossl_EVP_CIPHER_CTX_free
24
+ #endif
25
+
26
+ #if !defined(HAVE_SSL_CTX_CLEAR_OPTIONS)
27
+ # define SSL_CTX_clear_options(ctx, op) ((ctx)->options &= ~(op))
22
28
  #endif
23
29
 
24
30
  /* added in 1.0.0 */
@@ -27,11 +33,13 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx);
27
33
  #endif
28
34
 
29
35
  #if !defined(HAVE_EVP_CIPHER_CTX_COPY)
30
- int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
36
+ int ossl_EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *, const EVP_CIPHER_CTX *);
37
+ # define EVP_CIPHER_CTX_copy ossl_EVP_CIPHER_CTX_copy
31
38
  #endif
32
39
 
33
40
  #if !defined(HAVE_HMAC_CTX_COPY)
34
- int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
41
+ int ossl_HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
42
+ # define HMAC_CTX_copy ossl_HMAC_CTX_copy
35
43
  #endif
36
44
 
37
45
  #if !defined(HAVE_X509_STORE_CTX_GET0_CURRENT_CRL)
@@ -54,7 +62,8 @@ int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
54
62
  /* added in 1.0.2 */
55
63
  #if !defined(OPENSSL_NO_EC)
56
64
  #if !defined(HAVE_EC_CURVE_NIST2NID)
57
- int EC_curve_nist2nid(const char *);
65
+ int ossl_EC_curve_nist2nid(const char *);
66
+ # define EC_curve_nist2nid ossl_EC_curve_nist2nid
58
67
  #endif
59
68
  #endif
60
69
 
@@ -93,11 +102,13 @@ int EC_curve_nist2nid(const char *);
93
102
  #endif
94
103
 
95
104
  #if !defined(HAVE_HMAC_CTX_NEW)
96
- HMAC_CTX *HMAC_CTX_new(void);
105
+ HMAC_CTX *ossl_HMAC_CTX_new(void);
106
+ # define HMAC_CTX_new ossl_HMAC_CTX_new
97
107
  #endif
98
108
 
99
109
  #if !defined(HAVE_HMAC_CTX_FREE)
100
- void HMAC_CTX_free(HMAC_CTX *ctx);
110
+ void ossl_HMAC_CTX_free(HMAC_CTX *);
111
+ # define HMAC_CTX_free ossl_HMAC_CTX_free
101
112
  #endif
102
113
 
103
114
  #if !defined(HAVE_X509_STORE_GET_EX_DATA)
@@ -114,11 +125,13 @@ void HMAC_CTX_free(HMAC_CTX *ctx);
114
125
  #endif
115
126
 
116
127
  #if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
117
- void X509_CRL_get0_signature(const X509_CRL *, const ASN1_BIT_STRING **, const X509_ALGOR **);
128
+ void ossl_X509_CRL_get0_signature(const X509_CRL *, const ASN1_BIT_STRING **, const X509_ALGOR **);
129
+ # define X509_CRL_get0_signature ossl_X509_CRL_get0_signature
118
130
  #endif
119
131
 
120
132
  #if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
121
- void X509_REQ_get0_signature(const X509_REQ *, const ASN1_BIT_STRING **, const X509_ALGOR **);
133
+ void ossl_X509_REQ_get0_signature(const X509_REQ *, const ASN1_BIT_STRING **, const X509_ALGOR **);
134
+ # define X509_REQ_get0_signature ossl_X509_REQ_get0_signature
122
135
  #endif
123
136
 
124
137
  #if !defined(HAVE_X509_REVOKED_GET0_SERIALNUMBER)
@@ -245,4 +258,8 @@ IMPL_PKEY_GETTER(EC_KEY, ec)
245
258
  # define X509_CRL_get0_nextUpdate(x) X509_CRL_get_nextUpdate(x)
246
259
  #endif
247
260
 
261
+ #if !defined(HAVE_SSL_SESSION_GET_PROTOCOL_VERSION)
262
+ # define SSL_SESSION_get_protocol_version(s) ((s)->ssl_version)
263
+ #endif
264
+
248
265
  #endif /* _OSSL_OPENSSL_MISSING_H_ */
@@ -73,10 +73,13 @@ const rb_data_type_t ossl_evp_pkey_type = {
73
73
  static VALUE
74
74
  pkey_new0(EVP_PKEY *pkey)
75
75
  {
76
- if (!pkey)
77
- ossl_raise(ePKeyError, "cannot make new key from NULL");
76
+ VALUE obj;
77
+ int type;
78
78
 
79
- switch (EVP_PKEY_base_id(pkey)) {
79
+ if (!pkey || (type = EVP_PKEY_base_id(pkey)) == EVP_PKEY_NONE)
80
+ ossl_raise(rb_eRuntimeError, "pkey is empty");
81
+
82
+ switch (type) {
80
83
  #if !defined(OPENSSL_NO_RSA)
81
84
  case EVP_PKEY_RSA:
82
85
  return ossl_rsa_new(pkey);
@@ -94,7 +97,9 @@ pkey_new0(EVP_PKEY *pkey)
94
97
  return ossl_ec_new(pkey);
95
98
  #endif
96
99
  default:
97
- ossl_raise(ePKeyError, "unsupported key type");
100
+ obj = NewPKey(cPKey);
101
+ SetPKey(obj, pkey);
102
+ return obj;
98
103
  }
99
104
  }
100
105
 
@@ -260,7 +265,7 @@ static VALUE
260
265
  ossl_pkey_initialize(VALUE self)
261
266
  {
262
267
  if (rb_obj_is_instance_of(self, cPKey)) {
263
- ossl_raise(rb_eNotImpError, "OpenSSL::PKey::PKey is an abstract class.");
268
+ ossl_raise(rb_eTypeError, "OpenSSL::PKey::PKey can't be instantiated directly");
264
269
  }
265
270
  return self;
266
271
  }
@@ -93,23 +93,22 @@ ossl_ssl_session_initialize_copy(VALUE self, VALUE other)
93
93
  return self;
94
94
  }
95
95
 
96
- #if HAVE_SSL_SESSION_CMP == 0
97
- int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b)
96
+ #if !defined(HAVE_SSL_SESSION_CMP)
97
+ int ossl_SSL_SESSION_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
98
98
  {
99
99
  unsigned int a_len;
100
100
  const unsigned char *a_sid = SSL_SESSION_get_id(a, &a_len);
101
101
  unsigned int b_len;
102
102
  const unsigned char *b_sid = SSL_SESSION_get_id(b, &b_len);
103
103
 
104
- #if !defined(HAVE_OPAQUE_OPENSSL) /* missing SSL_SESSION_get_ssl_version() ? */
105
- if (a->ssl_version != b->ssl_version)
104
+ if (SSL_SESSION_get_protocol_version(a) != SSL_SESSION_get_protocol_version(b))
106
105
  return 1;
107
- #endif
108
106
  if (a_len != b_len)
109
107
  return 1;
110
108
 
111
109
  return CRYPTO_memcmp(a_sid, b_sid, a_len);
112
110
  }
111
+ #define SSL_SESSION_cmp(a, b) ossl_SSL_SESSION_cmp(a, b)
113
112
  #endif
114
113
 
115
114
  /*
@@ -10,6 +10,6 @@
10
10
  #if !defined(_OSSL_VERSION_H_)
11
11
  #define _OSSL_VERSION_H_
12
12
 
13
- #define OSSL_VERSION "2.0.1"
13
+ #define OSSL_VERSION "2.0.2"
14
14
 
15
15
  #endif /* _OSSL_VERSION_H_ */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openssl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bosslet
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-12-10 00:00:00.000000000 Z
14
+ date: 2016-12-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -77,8 +77,8 @@ extensions:
77
77
  - ext/openssl/extconf.rb
78
78
  extra_rdoc_files:
79
79
  - CONTRIBUTING.md
80
- - History.md
81
80
  - README.md
81
+ - History.md
82
82
  files:
83
83
  - BSDL
84
84
  - CONTRIBUTING.md