openssl-custom 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/BSDL +22 -0
  3. data/CONTRIBUTING.md +132 -0
  4. data/History.md +485 -0
  5. data/LICENSE.txt +56 -0
  6. data/README.md +66 -0
  7. data/ext/openssl/extconf.rb +190 -0
  8. data/ext/openssl/openssl_missing.c +106 -0
  9. data/ext/openssl/openssl_missing.h +257 -0
  10. data/ext/openssl/ossl.c +1282 -0
  11. data/ext/openssl/ossl.h +181 -0
  12. data/ext/openssl/ossl_asn1.c +1878 -0
  13. data/ext/openssl/ossl_asn1.h +62 -0
  14. data/ext/openssl/ossl_bio.c +42 -0
  15. data/ext/openssl/ossl_bio.h +16 -0
  16. data/ext/openssl/ossl_bn.c +1270 -0
  17. data/ext/openssl/ossl_bn.h +26 -0
  18. data/ext/openssl/ossl_cipher.c +1075 -0
  19. data/ext/openssl/ossl_cipher.h +20 -0
  20. data/ext/openssl/ossl_config.c +89 -0
  21. data/ext/openssl/ossl_config.h +19 -0
  22. data/ext/openssl/ossl_digest.c +425 -0
  23. data/ext/openssl/ossl_digest.h +20 -0
  24. data/ext/openssl/ossl_engine.c +567 -0
  25. data/ext/openssl/ossl_engine.h +19 -0
  26. data/ext/openssl/ossl_hmac.c +389 -0
  27. data/ext/openssl/ossl_hmac.h +18 -0
  28. data/ext/openssl/ossl_kdf.c +303 -0
  29. data/ext/openssl/ossl_kdf.h +6 -0
  30. data/ext/openssl/ossl_ns_spki.c +405 -0
  31. data/ext/openssl/ossl_ns_spki.h +19 -0
  32. data/ext/openssl/ossl_ocsp.c +2013 -0
  33. data/ext/openssl/ossl_ocsp.h +23 -0
  34. data/ext/openssl/ossl_pkcs12.c +257 -0
  35. data/ext/openssl/ossl_pkcs12.h +13 -0
  36. data/ext/openssl/ossl_pkcs7.c +1098 -0
  37. data/ext/openssl/ossl_pkcs7.h +36 -0
  38. data/ext/openssl/ossl_pkey.c +673 -0
  39. data/ext/openssl/ossl_pkey.h +241 -0
  40. data/ext/openssl/ossl_pkey_dh.c +650 -0
  41. data/ext/openssl/ossl_pkey_dsa.c +664 -0
  42. data/ext/openssl/ossl_pkey_ec.c +1827 -0
  43. data/ext/openssl/ossl_pkey_rsa.c +966 -0
  44. data/ext/openssl/ossl_rand.c +200 -0
  45. data/ext/openssl/ossl_rand.h +18 -0
  46. data/ext/openssl/ossl_ssl.c +3080 -0
  47. data/ext/openssl/ossl_ssl.h +36 -0
  48. data/ext/openssl/ossl_ssl_session.c +332 -0
  49. data/ext/openssl/ossl_ts.c +1524 -0
  50. data/ext/openssl/ossl_ts.h +16 -0
  51. data/ext/openssl/ossl_x509.c +262 -0
  52. data/ext/openssl/ossl_x509.h +115 -0
  53. data/ext/openssl/ossl_x509attr.c +324 -0
  54. data/ext/openssl/ossl_x509cert.c +846 -0
  55. data/ext/openssl/ossl_x509crl.c +542 -0
  56. data/ext/openssl/ossl_x509ext.c +491 -0
  57. data/ext/openssl/ossl_x509name.c +590 -0
  58. data/ext/openssl/ossl_x509req.c +441 -0
  59. data/ext/openssl/ossl_x509revoked.c +300 -0
  60. data/ext/openssl/ossl_x509store.c +902 -0
  61. data/ext/openssl/ruby_missing.h +24 -0
  62. data/lib/openssl/bn.rb +40 -0
  63. data/lib/openssl/buffering.rb +478 -0
  64. data/lib/openssl/cipher.rb +67 -0
  65. data/lib/openssl/config.rb +501 -0
  66. data/lib/openssl/digest.rb +73 -0
  67. data/lib/openssl/hmac.rb +13 -0
  68. data/lib/openssl/marshal.rb +30 -0
  69. data/lib/openssl/pkcs5.rb +22 -0
  70. data/lib/openssl/pkey.rb +42 -0
  71. data/lib/openssl/ssl.rb +542 -0
  72. data/lib/openssl/version.rb +5 -0
  73. data/lib/openssl/x509.rb +369 -0
  74. data/lib/openssl.rb +38 -0
  75. 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