openssl-custom 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/BSDL +22 -0
- data/CONTRIBUTING.md +132 -0
- data/History.md +485 -0
- data/LICENSE.txt +56 -0
- data/README.md +66 -0
- data/ext/openssl/extconf.rb +190 -0
- data/ext/openssl/openssl_missing.c +106 -0
- data/ext/openssl/openssl_missing.h +257 -0
- data/ext/openssl/ossl.c +1282 -0
- data/ext/openssl/ossl.h +181 -0
- data/ext/openssl/ossl_asn1.c +1878 -0
- data/ext/openssl/ossl_asn1.h +62 -0
- data/ext/openssl/ossl_bio.c +42 -0
- data/ext/openssl/ossl_bio.h +16 -0
- data/ext/openssl/ossl_bn.c +1270 -0
- data/ext/openssl/ossl_bn.h +26 -0
- data/ext/openssl/ossl_cipher.c +1075 -0
- data/ext/openssl/ossl_cipher.h +20 -0
- data/ext/openssl/ossl_config.c +89 -0
- data/ext/openssl/ossl_config.h +19 -0
- data/ext/openssl/ossl_digest.c +425 -0
- data/ext/openssl/ossl_digest.h +20 -0
- data/ext/openssl/ossl_engine.c +567 -0
- data/ext/openssl/ossl_engine.h +19 -0
- data/ext/openssl/ossl_hmac.c +389 -0
- data/ext/openssl/ossl_hmac.h +18 -0
- data/ext/openssl/ossl_kdf.c +303 -0
- data/ext/openssl/ossl_kdf.h +6 -0
- data/ext/openssl/ossl_ns_spki.c +405 -0
- data/ext/openssl/ossl_ns_spki.h +19 -0
- data/ext/openssl/ossl_ocsp.c +2013 -0
- data/ext/openssl/ossl_ocsp.h +23 -0
- data/ext/openssl/ossl_pkcs12.c +257 -0
- data/ext/openssl/ossl_pkcs12.h +13 -0
- data/ext/openssl/ossl_pkcs7.c +1098 -0
- data/ext/openssl/ossl_pkcs7.h +36 -0
- data/ext/openssl/ossl_pkey.c +673 -0
- data/ext/openssl/ossl_pkey.h +241 -0
- data/ext/openssl/ossl_pkey_dh.c +650 -0
- data/ext/openssl/ossl_pkey_dsa.c +664 -0
- data/ext/openssl/ossl_pkey_ec.c +1827 -0
- data/ext/openssl/ossl_pkey_rsa.c +966 -0
- data/ext/openssl/ossl_rand.c +200 -0
- data/ext/openssl/ossl_rand.h +18 -0
- data/ext/openssl/ossl_ssl.c +3080 -0
- data/ext/openssl/ossl_ssl.h +36 -0
- data/ext/openssl/ossl_ssl_session.c +332 -0
- data/ext/openssl/ossl_ts.c +1524 -0
- data/ext/openssl/ossl_ts.h +16 -0
- data/ext/openssl/ossl_x509.c +262 -0
- data/ext/openssl/ossl_x509.h +115 -0
- data/ext/openssl/ossl_x509attr.c +324 -0
- data/ext/openssl/ossl_x509cert.c +846 -0
- data/ext/openssl/ossl_x509crl.c +542 -0
- data/ext/openssl/ossl_x509ext.c +491 -0
- data/ext/openssl/ossl_x509name.c +590 -0
- data/ext/openssl/ossl_x509req.c +441 -0
- data/ext/openssl/ossl_x509revoked.c +300 -0
- data/ext/openssl/ossl_x509store.c +902 -0
- data/ext/openssl/ruby_missing.h +24 -0
- data/lib/openssl/bn.rb +40 -0
- data/lib/openssl/buffering.rb +478 -0
- data/lib/openssl/cipher.rb +67 -0
- data/lib/openssl/config.rb +501 -0
- data/lib/openssl/digest.rb +73 -0
- data/lib/openssl/hmac.rb +13 -0
- data/lib/openssl/marshal.rb +30 -0
- data/lib/openssl/pkcs5.rb +22 -0
- data/lib/openssl/pkey.rb +42 -0
- data/lib/openssl/ssl.rb +542 -0
- data/lib/openssl/version.rb +5 -0
- data/lib/openssl/x509.rb +369 -0
- data/lib/openssl.rb +38 -0
- metadata +196 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
/*
|
2
|
+
* 'OpenSSL for Ruby' team members
|
3
|
+
* Copyright (C) 2003
|
4
|
+
* All rights reserved.
|
5
|
+
*/
|
6
|
+
/*
|
7
|
+
* This program is licensed under the same licence as Ruby.
|
8
|
+
* (See the file 'LICENCE'.)
|
9
|
+
*/
|
10
|
+
#if !defined(_OSSL_ASN1_H_)
|
11
|
+
#define _OSSL_ASN1_H_
|
12
|
+
|
13
|
+
/*
|
14
|
+
* ASN1_DATE conversions
|
15
|
+
*/
|
16
|
+
VALUE asn1time_to_time(const ASN1_TIME *);
|
17
|
+
/* Splits VALUE to seconds and offset days. VALUE is typically a Time or an
|
18
|
+
* Integer. This is used when updating ASN1_*TIME with ASN1_TIME_adj() or
|
19
|
+
* X509_time_adj_ex(). We can't use ASN1_TIME_set() and X509_time_adj() because
|
20
|
+
* they have the Year 2038 issue on sizeof(time_t) == 4 environment */
|
21
|
+
void ossl_time_split(VALUE, time_t *, int *);
|
22
|
+
|
23
|
+
/*
|
24
|
+
* ASN1_STRING conversions
|
25
|
+
*/
|
26
|
+
VALUE asn1str_to_str(const ASN1_STRING *);
|
27
|
+
|
28
|
+
/*
|
29
|
+
* ASN1_INTEGER conversions
|
30
|
+
*/
|
31
|
+
VALUE asn1integer_to_num(const ASN1_INTEGER *);
|
32
|
+
ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);
|
33
|
+
|
34
|
+
/*
|
35
|
+
* ASN1 module
|
36
|
+
*/
|
37
|
+
extern VALUE mASN1;
|
38
|
+
extern VALUE eASN1Error;
|
39
|
+
|
40
|
+
extern VALUE cASN1Data;
|
41
|
+
extern VALUE cASN1Primitive;
|
42
|
+
extern VALUE cASN1Constructive;
|
43
|
+
|
44
|
+
extern VALUE cASN1Boolean; /* BOOLEAN */
|
45
|
+
extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
|
46
|
+
extern VALUE cASN1BitString; /* BIT STRING */
|
47
|
+
extern VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
|
48
|
+
extern VALUE cASN1NumericString, cASN1PrintableString;
|
49
|
+
extern VALUE cASN1T61String, cASN1VideotexString;
|
50
|
+
extern VALUE cASN1IA5String, cASN1GraphicString;
|
51
|
+
extern VALUE cASN1ISO64String, cASN1GeneralString;
|
52
|
+
extern VALUE cASN1UniversalString, cASN1BMPString;
|
53
|
+
extern VALUE cASN1Null; /* NULL */
|
54
|
+
extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
|
55
|
+
extern VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
|
56
|
+
extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
|
57
|
+
|
58
|
+
ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);
|
59
|
+
|
60
|
+
void Init_ossl_asn1(void);
|
61
|
+
|
62
|
+
#endif
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/*
|
2
|
+
* 'OpenSSL for Ruby' team members
|
3
|
+
* Copyright (C) 2003
|
4
|
+
* All rights reserved.
|
5
|
+
*/
|
6
|
+
/*
|
7
|
+
* This program is licensed under the same licence as Ruby.
|
8
|
+
* (See the file 'LICENCE'.)
|
9
|
+
*/
|
10
|
+
#include "ossl.h"
|
11
|
+
|
12
|
+
BIO *
|
13
|
+
ossl_obj2bio(volatile VALUE *pobj)
|
14
|
+
{
|
15
|
+
VALUE obj = *pobj;
|
16
|
+
BIO *bio;
|
17
|
+
|
18
|
+
if (RB_TYPE_P(obj, T_FILE))
|
19
|
+
obj = rb_funcallv(obj, rb_intern("read"), 0, NULL);
|
20
|
+
StringValue(obj);
|
21
|
+
bio = BIO_new_mem_buf(RSTRING_PTR(obj), RSTRING_LENINT(obj));
|
22
|
+
if (!bio)
|
23
|
+
ossl_raise(eOSSLError, "BIO_new_mem_buf");
|
24
|
+
*pobj = obj;
|
25
|
+
return bio;
|
26
|
+
}
|
27
|
+
|
28
|
+
VALUE
|
29
|
+
ossl_membio2str(BIO *bio)
|
30
|
+
{
|
31
|
+
VALUE ret;
|
32
|
+
int state;
|
33
|
+
BUF_MEM *buf;
|
34
|
+
|
35
|
+
BIO_get_mem_ptr(bio, &buf);
|
36
|
+
ret = ossl_str_new(buf->data, buf->length, &state);
|
37
|
+
BIO_free(bio);
|
38
|
+
if (state)
|
39
|
+
rb_jump_tag(state);
|
40
|
+
|
41
|
+
return ret;
|
42
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/*
|
2
|
+
* 'OpenSSL for Ruby' team members
|
3
|
+
* Copyright (C) 2003
|
4
|
+
* All rights reserved.
|
5
|
+
*/
|
6
|
+
/*
|
7
|
+
* This program is licensed under the same licence as Ruby.
|
8
|
+
* (See the file 'LICENCE'.)
|
9
|
+
*/
|
10
|
+
#if !defined(_OSSL_BIO_H_)
|
11
|
+
#define _OSSL_BIO_H_
|
12
|
+
|
13
|
+
BIO *ossl_obj2bio(volatile VALUE *);
|
14
|
+
VALUE ossl_membio2str(BIO*);
|
15
|
+
|
16
|
+
#endif
|