openssl 2.1.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +35 -45
- data/History.md +232 -0
- data/README.md +2 -2
- data/ext/openssl/extconf.rb +61 -46
- data/ext/openssl/openssl_missing.c +0 -66
- data/ext/openssl/openssl_missing.h +60 -44
- data/ext/openssl/ossl.c +112 -66
- data/ext/openssl/ossl.h +28 -11
- data/ext/openssl/ossl_asn1.c +42 -5
- data/ext/openssl/ossl_bn.c +276 -146
- data/ext/openssl/ossl_bn.h +2 -1
- data/ext/openssl/ossl_cipher.c +38 -29
- data/ext/openssl/ossl_config.c +412 -41
- data/ext/openssl/ossl_config.h +4 -7
- data/ext/openssl/ossl_digest.c +31 -62
- data/ext/openssl/ossl_engine.c +18 -27
- data/ext/openssl/ossl_hmac.c +52 -145
- data/ext/openssl/ossl_kdf.c +11 -19
- data/ext/openssl/ossl_ns_spki.c +1 -1
- data/ext/openssl/ossl_ocsp.c +9 -62
- data/ext/openssl/ossl_ocsp.h +3 -3
- data/ext/openssl/ossl_pkcs12.c +21 -3
- data/ext/openssl/ossl_pkcs7.c +45 -78
- data/ext/openssl/ossl_pkcs7.h +16 -0
- data/ext/openssl/ossl_pkey.c +1255 -178
- data/ext/openssl/ossl_pkey.h +40 -77
- data/ext/openssl/ossl_pkey_dh.c +125 -335
- data/ext/openssl/ossl_pkey_dsa.c +93 -398
- data/ext/openssl/ossl_pkey_ec.c +155 -318
- data/ext/openssl/ossl_pkey_rsa.c +105 -484
- data/ext/openssl/ossl_rand.c +2 -40
- data/ext/openssl/ossl_ssl.c +395 -364
- data/ext/openssl/ossl_ssl_session.c +24 -29
- data/ext/openssl/ossl_ts.c +1539 -0
- data/ext/openssl/ossl_ts.h +16 -0
- data/ext/openssl/ossl_x509.c +86 -1
- data/ext/openssl/ossl_x509cert.c +166 -10
- data/ext/openssl/ossl_x509crl.c +10 -7
- data/ext/openssl/ossl_x509ext.c +15 -2
- data/ext/openssl/ossl_x509name.c +16 -5
- data/ext/openssl/ossl_x509req.c +10 -7
- data/ext/openssl/ossl_x509store.c +193 -92
- data/lib/openssl/bn.rb +1 -1
- data/lib/openssl/buffering.rb +42 -17
- data/lib/openssl/cipher.rb +1 -1
- data/lib/openssl/digest.rb +10 -12
- data/lib/openssl/hmac.rb +78 -0
- data/lib/openssl/marshal.rb +30 -0
- data/lib/openssl/pkcs5.rb +1 -1
- data/lib/openssl/pkey.rb +435 -1
- data/lib/openssl/ssl.rb +53 -14
- data/lib/openssl/version.rb +5 -0
- data/lib/openssl/x509.rb +177 -1
- data/lib/openssl.rb +24 -9
- metadata +13 -69
- data/ext/openssl/deprecation.rb +0 -23
- data/ext/openssl/ossl_version.h +0 -15
- data/ext/openssl/ruby_missing.h +0 -24
- data/lib/openssl/config.rb +0 -474
@@ -34,43 +34,38 @@ static VALUE ossl_ssl_session_alloc(VALUE klass)
|
|
34
34
|
* Creates a new Session object from an instance of SSLSocket or DER/PEM encoded
|
35
35
|
* String.
|
36
36
|
*/
|
37
|
-
static VALUE
|
37
|
+
static VALUE
|
38
|
+
ossl_ssl_session_initialize(VALUE self, VALUE arg1)
|
38
39
|
{
|
39
|
-
|
40
|
-
|
41
|
-
if (RDATA(self)->data)
|
42
|
-
ossl_raise(eSSLSession, "SSL Session already initialized");
|
43
|
-
|
44
|
-
if (rb_obj_is_instance_of(arg1, cSSLSocket)) {
|
45
|
-
SSL *ssl;
|
46
|
-
|
47
|
-
GetSSL(arg1, ssl);
|
48
|
-
|
49
|
-
if ((ctx = SSL_get1_session(ssl)) == NULL)
|
50
|
-
ossl_raise(eSSLSession, "no session available");
|
51
|
-
} else {
|
52
|
-
BIO *in = ossl_obj2bio(&arg1);
|
40
|
+
SSL_SESSION *ctx;
|
53
41
|
|
54
|
-
|
42
|
+
if (RTYPEDDATA_DATA(self))
|
43
|
+
ossl_raise(eSSLSession, "SSL Session already initialized");
|
55
44
|
|
56
|
-
|
57
|
-
|
58
|
-
ctx = d2i_SSL_SESSION_bio(in, NULL);
|
59
|
-
}
|
45
|
+
if (rb_obj_is_instance_of(arg1, cSSLSocket)) {
|
46
|
+
SSL *ssl;
|
60
47
|
|
61
|
-
|
48
|
+
GetSSL(arg1, ssl);
|
62
49
|
|
63
|
-
|
64
|
-
|
65
|
-
|
50
|
+
if ((ctx = SSL_get1_session(ssl)) == NULL)
|
51
|
+
ossl_raise(eSSLSession, "no session available");
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
BIO *in = ossl_obj2bio(&arg1);
|
66
55
|
|
67
|
-
|
68
|
-
|
69
|
-
|
56
|
+
ctx = d2i_SSL_SESSION_bio(in, NULL);
|
57
|
+
if (!ctx) {
|
58
|
+
OSSL_BIO_reset(in);
|
59
|
+
ctx = PEM_read_bio_SSL_SESSION(in, NULL, NULL, NULL);
|
60
|
+
}
|
61
|
+
BIO_free(in);
|
62
|
+
if (!ctx)
|
63
|
+
ossl_raise(rb_eArgError, "unknown type");
|
64
|
+
}
|
70
65
|
|
71
|
-
|
66
|
+
RTYPEDDATA_DATA(self) = ctx;
|
72
67
|
|
73
|
-
|
68
|
+
return self;
|
74
69
|
}
|
75
70
|
|
76
71
|
static VALUE
|