zig_example 0.3.2 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/ext/mkmf.rb +5 -2
  3. data/lib/zig_example/version.rb +1 -1
  4. metadata +3 -56
  5. data/ext/openssl/openssl_missing.c +0 -40
  6. data/ext/openssl/openssl_missing.h +0 -238
  7. data/ext/openssl/ossl.c +0 -1295
  8. data/ext/openssl/ossl.h +0 -201
  9. data/ext/openssl/ossl_asn1.c +0 -1891
  10. data/ext/openssl/ossl_asn1.h +0 -62
  11. data/ext/openssl/ossl_bio.c +0 -42
  12. data/ext/openssl/ossl_bio.h +0 -16
  13. data/ext/openssl/ossl_bn.c +0 -1344
  14. data/ext/openssl/ossl_bn.h +0 -26
  15. data/ext/openssl/ossl_cipher.c +0 -1074
  16. data/ext/openssl/ossl_cipher.h +0 -20
  17. data/ext/openssl/ossl_config.c +0 -460
  18. data/ext/openssl/ossl_config.h +0 -16
  19. data/ext/openssl/ossl_digest.c +0 -425
  20. data/ext/openssl/ossl_digest.h +0 -20
  21. data/ext/openssl/ossl_engine.c +0 -568
  22. data/ext/openssl/ossl_engine.h +0 -19
  23. data/ext/openssl/ossl_hmac.c +0 -310
  24. data/ext/openssl/ossl_hmac.h +0 -18
  25. data/ext/openssl/ossl_kdf.c +0 -311
  26. data/ext/openssl/ossl_kdf.h +0 -6
  27. data/ext/openssl/ossl_ns_spki.c +0 -405
  28. data/ext/openssl/ossl_ns_spki.h +0 -19
  29. data/ext/openssl/ossl_ocsp.c +0 -1965
  30. data/ext/openssl/ossl_ocsp.h +0 -23
  31. data/ext/openssl/ossl_pkcs12.c +0 -275
  32. data/ext/openssl/ossl_pkcs12.h +0 -13
  33. data/ext/openssl/ossl_pkcs7.c +0 -1081
  34. data/ext/openssl/ossl_pkcs7.h +0 -36
  35. data/ext/openssl/ossl_pkey.c +0 -1624
  36. data/ext/openssl/ossl_pkey.h +0 -204
  37. data/ext/openssl/ossl_pkey_dh.c +0 -440
  38. data/ext/openssl/ossl_pkey_dsa.c +0 -359
  39. data/ext/openssl/ossl_pkey_ec.c +0 -1655
  40. data/ext/openssl/ossl_pkey_rsa.c +0 -579
  41. data/ext/openssl/ossl_rand.c +0 -200
  42. data/ext/openssl/ossl_rand.h +0 -18
  43. data/ext/openssl/ossl_ssl.c +0 -3142
  44. data/ext/openssl/ossl_ssl.h +0 -36
  45. data/ext/openssl/ossl_ssl_session.c +0 -331
  46. data/ext/openssl/ossl_ts.c +0 -1539
  47. data/ext/openssl/ossl_ts.h +0 -16
  48. data/ext/openssl/ossl_x509.c +0 -256
  49. data/ext/openssl/ossl_x509.h +0 -115
  50. data/ext/openssl/ossl_x509attr.c +0 -324
  51. data/ext/openssl/ossl_x509cert.c +0 -1002
  52. data/ext/openssl/ossl_x509crl.c +0 -545
  53. data/ext/openssl/ossl_x509ext.c +0 -490
  54. data/ext/openssl/ossl_x509name.c +0 -597
  55. data/ext/openssl/ossl_x509req.c +0 -444
  56. data/ext/openssl/ossl_x509revoked.c +0 -300
  57. data/ext/openssl/ossl_x509store.c +0 -986
data/ext/openssl/ossl.h DELETED
@@ -1,201 +0,0 @@
1
- /*
2
- * 'OpenSSL for Ruby' project
3
- * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
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_H_)
11
- #define _OSSL_H_
12
-
13
- #include RUBY_EXTCONF_H
14
-
15
- #include <assert.h>
16
- #include <ruby.h>
17
- #include <errno.h>
18
- #include <ruby/io.h>
19
- #include <ruby/thread.h>
20
- #include <openssl/opensslv.h>
21
-
22
- #include <openssl/err.h>
23
- #include <openssl/asn1.h>
24
- #include <openssl/x509v3.h>
25
- #include <openssl/ssl.h>
26
- #include <openssl/pkcs12.h>
27
- #include <openssl/pkcs7.h>
28
- #include <openssl/rand.h>
29
- #include <openssl/conf.h>
30
- #ifndef OPENSSL_NO_TS
31
- #include <openssl/ts.h>
32
- #endif
33
- #include <openssl/crypto.h>
34
- #if !defined(OPENSSL_NO_OCSP)
35
- # include <openssl/ocsp.h>
36
- #endif
37
- #include <openssl/bn.h>
38
- #include <openssl/rsa.h>
39
- #include <openssl/dsa.h>
40
- #include <openssl/evp.h>
41
- #include <openssl/dh.h>
42
-
43
- #ifndef LIBRESSL_VERSION_NUMBER
44
- # define OSSL_IS_LIBRESSL 0
45
- # define OSSL_OPENSSL_PREREQ(maj, min, pat) \
46
- (OPENSSL_VERSION_NUMBER >= ((maj << 28) | (min << 20) | (pat << 12)))
47
- # define OSSL_LIBRESSL_PREREQ(maj, min, pat) 0
48
- #else
49
- # define OSSL_IS_LIBRESSL 1
50
- # define OSSL_OPENSSL_PREREQ(maj, min, pat) 0
51
- # define OSSL_LIBRESSL_PREREQ(maj, min, pat) \
52
- (LIBRESSL_VERSION_NUMBER >= ((maj << 28) | (min << 20) | (pat << 12)))
53
- #endif
54
-
55
- #if OSSL_OPENSSL_PREREQ(3, 0, 0)
56
- # define OSSL_3_const const
57
- #else
58
- # define OSSL_3_const /* const */
59
- #endif
60
-
61
- #if !defined(OPENSSL_NO_ENGINE) && !OSSL_OPENSSL_PREREQ(3, 0, 0)
62
- # define OSSL_USE_ENGINE
63
- #endif
64
-
65
- /*
66
- * Common Module
67
- */
68
- extern VALUE mOSSL;
69
-
70
- /*
71
- * Common Error Class
72
- */
73
- extern VALUE eOSSLError;
74
-
75
- /*
76
- * CheckTypes
77
- */
78
- #define OSSL_Check_Kind(obj, klass) do {\
79
- if (!rb_obj_is_kind_of((obj), (klass))) {\
80
- ossl_raise(rb_eTypeError, "wrong argument (%"PRIsVALUE")! (Expected kind of %"PRIsVALUE")",\
81
- rb_obj_class(obj), (klass));\
82
- }\
83
- } while (0)
84
-
85
- /*
86
- * Type conversions
87
- */
88
- #if !defined(NUM2UINT64T) /* in case Ruby starts to provide */
89
- # if SIZEOF_LONG == 8
90
- # define NUM2UINT64T(x) ((uint64_t)NUM2ULONG(x))
91
- # elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8
92
- # define NUM2UINT64T(x) ((uint64_t)NUM2ULL(x))
93
- # else
94
- # error "unknown platform; no 64-bit width integer"
95
- # endif
96
- #endif
97
-
98
- /*
99
- * Data Conversion
100
- */
101
- STACK_OF(X509) *ossl_x509_ary2sk(VALUE);
102
- STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*);
103
- VALUE ossl_x509_sk2ary(const STACK_OF(X509) *certs);
104
- VALUE ossl_x509crl_sk2ary(const STACK_OF(X509_CRL) *crl);
105
- VALUE ossl_x509name_sk2ary(const STACK_OF(X509_NAME) *names);
106
- VALUE ossl_buf2str(char *buf, int len);
107
- VALUE ossl_str_new(const char *, long, int *);
108
- #define ossl_str_adjust(str, p) \
109
- do{\
110
- long newlen = (long)((p) - (unsigned char*)RSTRING_PTR(str));\
111
- assert(newlen <= RSTRING_LEN(str));\
112
- rb_str_set_len((str), newlen);\
113
- }while(0)
114
- /*
115
- * Convert binary string to hex string. The caller is responsible for
116
- * ensuring out has (2 * len) bytes of capacity.
117
- */
118
- void ossl_bin2hex(unsigned char *in, char *out, size_t len);
119
-
120
- /*
121
- * Our default PEM callback
122
- */
123
- /* Convert the argument to String and validate the length. Note this may raise. */
124
- VALUE ossl_pem_passwd_value(VALUE);
125
- /* Can be casted to pem_password_cb. If a password (String) is passed as the
126
- * "arbitrary data" (typically the last parameter of PEM_{read,write}_
127
- * functions), uses the value. If not, but a block is given, yields to it.
128
- * If not either, fallbacks to PEM_def_callback() which reads from stdin. */
129
- int ossl_pem_passwd_cb(char *, int, int, void *);
130
-
131
- /*
132
- * Clear BIO* with this in PEM/DER fallback scenarios to avoid decoding
133
- * errors piling up in OpenSSL::Errors
134
- */
135
- #define OSSL_BIO_reset(bio) do { \
136
- (void)BIO_reset((bio)); \
137
- ossl_clear_error(); \
138
- } while (0)
139
-
140
- /*
141
- * ERRor messages
142
- */
143
- PRINTF_ARGS(NORETURN(void ossl_raise(VALUE, const char *, ...)), 2, 3);
144
- /* Make exception instance from str and OpenSSL error reason string. */
145
- VALUE ossl_make_error(VALUE exc, VALUE str);
146
- /* Clear OpenSSL error queue. If dOSSL is set, rb_warn() them. */
147
- void ossl_clear_error(void);
148
-
149
- /*
150
- * String to DER String
151
- */
152
- VALUE ossl_to_der(VALUE);
153
- VALUE ossl_to_der_if_possible(VALUE);
154
-
155
- /*
156
- * Debug
157
- */
158
- extern VALUE dOSSL;
159
-
160
- #if defined(HAVE_VA_ARGS_MACRO)
161
- #define OSSL_Debug(...) do { \
162
- if (dOSSL == Qtrue) { \
163
- fprintf(stderr, "OSSL_DEBUG: "); \
164
- fprintf(stderr, __VA_ARGS__); \
165
- fprintf(stderr, " [%s:%d]\n", __FILE__, __LINE__); \
166
- } \
167
- } while (0)
168
-
169
- #else
170
- void ossl_debug(const char *, ...);
171
- #define OSSL_Debug ossl_debug
172
- #endif
173
-
174
- /*
175
- * Include all parts
176
- */
177
- #include "openssl_missing.h"
178
- #include "ossl_asn1.h"
179
- #include "ossl_bio.h"
180
- #include "ossl_bn.h"
181
- #include "ossl_cipher.h"
182
- #include "ossl_config.h"
183
- #include "ossl_digest.h"
184
- #include "ossl_hmac.h"
185
- #include "ossl_ns_spki.h"
186
- #include "ossl_ocsp.h"
187
- #include "ossl_pkcs12.h"
188
- #include "ossl_pkcs7.h"
189
- #include "ossl_pkey.h"
190
- #include "ossl_rand.h"
191
- #include "ossl_ssl.h"
192
- #ifndef OPENSSL_NO_TS
193
- #include "ossl_ts.h"
194
- #endif
195
- #include "ossl_x509.h"
196
- #include "ossl_engine.h"
197
- #include "ossl_kdf.h"
198
-
199
- void Init_openssl(void);
200
-
201
- #endif /* _OSSL_H_ */