zig_example 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/ext/mkmf.rb +2734 -0
  3. data/ext/openssl/openssl_missing.c +40 -0
  4. data/ext/openssl/openssl_missing.h +238 -0
  5. data/ext/openssl/ossl.c +1295 -0
  6. data/ext/openssl/ossl.h +201 -0
  7. data/ext/openssl/ossl_asn1.c +1891 -0
  8. data/ext/openssl/ossl_asn1.h +62 -0
  9. data/ext/openssl/ossl_bio.c +42 -0
  10. data/ext/openssl/ossl_bio.h +16 -0
  11. data/ext/openssl/ossl_bn.c +1344 -0
  12. data/ext/openssl/ossl_bn.h +26 -0
  13. data/ext/openssl/ossl_cipher.c +1074 -0
  14. data/ext/openssl/ossl_cipher.h +20 -0
  15. data/ext/openssl/ossl_config.c +460 -0
  16. data/ext/openssl/ossl_config.h +16 -0
  17. data/ext/openssl/ossl_digest.c +425 -0
  18. data/ext/openssl/ossl_digest.h +20 -0
  19. data/ext/openssl/ossl_engine.c +568 -0
  20. data/ext/openssl/ossl_engine.h +19 -0
  21. data/ext/openssl/ossl_hmac.c +310 -0
  22. data/ext/openssl/ossl_hmac.h +18 -0
  23. data/ext/openssl/ossl_kdf.c +311 -0
  24. data/ext/openssl/ossl_kdf.h +6 -0
  25. data/ext/openssl/ossl_ns_spki.c +405 -0
  26. data/ext/openssl/ossl_ns_spki.h +19 -0
  27. data/ext/openssl/ossl_ocsp.c +1965 -0
  28. data/ext/openssl/ossl_ocsp.h +23 -0
  29. data/ext/openssl/ossl_pkcs12.c +275 -0
  30. data/ext/openssl/ossl_pkcs12.h +13 -0
  31. data/ext/openssl/ossl_pkcs7.c +1081 -0
  32. data/ext/openssl/ossl_pkcs7.h +36 -0
  33. data/ext/openssl/ossl_pkey.c +1624 -0
  34. data/ext/openssl/ossl_pkey.h +204 -0
  35. data/ext/openssl/ossl_pkey_dh.c +440 -0
  36. data/ext/openssl/ossl_pkey_dsa.c +359 -0
  37. data/ext/openssl/ossl_pkey_ec.c +1655 -0
  38. data/ext/openssl/ossl_pkey_rsa.c +579 -0
  39. data/ext/openssl/ossl_rand.c +200 -0
  40. data/ext/openssl/ossl_rand.h +18 -0
  41. data/ext/openssl/ossl_ssl.c +3142 -0
  42. data/ext/openssl/ossl_ssl.h +36 -0
  43. data/ext/openssl/ossl_ssl_session.c +331 -0
  44. data/ext/openssl/ossl_ts.c +1539 -0
  45. data/ext/openssl/ossl_ts.h +16 -0
  46. data/ext/openssl/ossl_x509.c +256 -0
  47. data/ext/openssl/ossl_x509.h +115 -0
  48. data/ext/openssl/ossl_x509attr.c +324 -0
  49. data/ext/openssl/ossl_x509cert.c +1002 -0
  50. data/ext/openssl/ossl_x509crl.c +545 -0
  51. data/ext/openssl/ossl_x509ext.c +490 -0
  52. data/ext/openssl/ossl_x509name.c +597 -0
  53. data/ext/openssl/ossl_x509req.c +444 -0
  54. data/ext/openssl/ossl_x509revoked.c +300 -0
  55. data/ext/openssl/ossl_x509store.c +986 -0
  56. data/ext/zigrb_100doors/build.zig +0 -12
  57. data/ext/zigrb_100doors/extconf.rb +2 -19
  58. data/ext/zigrb_ackermann/build.zig +0 -12
  59. data/ext/zigrb_ackermann/extconf.rb +2 -19
  60. data/ext/zigrb_lucas_lehmer/build.zig +0 -12
  61. data/ext/zigrb_lucas_lehmer/extconf.rb +2 -19
  62. data/lib/zig_example/version.rb +1 -1
  63. metadata +56 -2
@@ -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