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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a071e166956d3f91636c3c71b315beb52fb55ee4f7a868a62bde980952d770e
4
- data.tar.gz: dbb7051574176fc1465b5d14ac1760bcf0239b3bd5bce171f81c29b67e3388a5
3
+ metadata.gz: 61cf48ad9ad962f2941a85a0aef1af1dcdd43929d46973171ef6a3c77e3d6e9a
4
+ data.tar.gz: '02484ce0eaab0c86dec9c25735ae49e7757e6e298d6e26d2d0ca045f35382f7d'
5
5
  SHA512:
6
- metadata.gz: 59d183cd951770844e060302d74b1dfbaf9c086bc2ad760e9058b354340df97cd4eb09ae6f9eff4fd365951d5e09fd96218137311b860d6789fdf53aee49c1cc
7
- data.tar.gz: f672e92cd41decee30059781d2ebdbe300901fac952ea25f05cc972b77247fcc1505e939632de7149325c896cc9a8fd885b23ba76d5487fb7917dbcffb2218d3
6
+ metadata.gz: 56e287268b60a8169c201c8006f79d32f60fcaab88aba2a84858b7726bc1edd4ca26df3f21f98297795a3064e88b0906aa4ff1fc6fc9e47139c7f69db6aa0f67
7
+ data.tar.gz: 6e04a1360c327d57507ccab80743e51ee73d33ac93843c3c2cafe8ab18b148c2fde608e59a8f71fbaea80b18e3d6b2f2951bde6d4fb125a31d1a217221e5f52b
data/ext/mkmf.rb CHANGED
@@ -2437,8 +2437,11 @@ site-install-rb: install-rb
2437
2437
  mfile.print " #{timestamp_file('$(RUBYARCHDIR)', target_prefix)}" if $extout
2438
2438
  mfile.print "\n"
2439
2439
  if File.exist?('build.zig')
2440
- mfile.print("\tenv -u DESTDIR PKG_CONFIG_PATH='$(libdir)/pkgconfig' RUBY_PC='#{File.basename(CONFIG['ruby_pc'], '.pc')}' zig build -Doptimize=ReleaseSafe test install\n")
2441
- mfile.print("\tcp -v zig-out/lib/#{dllib} .\n")
2440
+ mfile.print("\tenv -u DESTDIR PKG_CONFIG_PATH='$(libdir)/pkgconfig' RUBY_PC='#{File.basename(CONFIG['ruby_pc'], '.pc')}' zig build -Doptimize=ReleaseSafe --prefix-lib-dir $(shell pwd) test install\n")
2441
+ if CONFIG['target_vendor'] == 'apple' && CONFIG['DLEXT'] = 'bundle'
2442
+ # zig builds a .dylib but ruby wants to load a .bundle
2443
+ mfile.print("\tmv -v $(TARGET).dylib $(TARGET).bundle\n")
2444
+ end
2442
2445
  else
2443
2446
  mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n"
2444
2447
  mfile.print "\t-$(Q)$(RM) $(@#{sep})\n"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ZigExample
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zig_example
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank J. Cameron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-26 00:00:00.000000000 Z
11
+ date: 2023-05-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -21,59 +21,6 @@ extensions:
21
21
  extra_rdoc_files: []
22
22
  files:
23
23
  - ext/mkmf.rb
24
- - ext/openssl/openssl_missing.c
25
- - ext/openssl/openssl_missing.h
26
- - ext/openssl/ossl.c
27
- - ext/openssl/ossl.h
28
- - ext/openssl/ossl_asn1.c
29
- - ext/openssl/ossl_asn1.h
30
- - ext/openssl/ossl_bio.c
31
- - ext/openssl/ossl_bio.h
32
- - ext/openssl/ossl_bn.c
33
- - ext/openssl/ossl_bn.h
34
- - ext/openssl/ossl_cipher.c
35
- - ext/openssl/ossl_cipher.h
36
- - ext/openssl/ossl_config.c
37
- - ext/openssl/ossl_config.h
38
- - ext/openssl/ossl_digest.c
39
- - ext/openssl/ossl_digest.h
40
- - ext/openssl/ossl_engine.c
41
- - ext/openssl/ossl_engine.h
42
- - ext/openssl/ossl_hmac.c
43
- - ext/openssl/ossl_hmac.h
44
- - ext/openssl/ossl_kdf.c
45
- - ext/openssl/ossl_kdf.h
46
- - ext/openssl/ossl_ns_spki.c
47
- - ext/openssl/ossl_ns_spki.h
48
- - ext/openssl/ossl_ocsp.c
49
- - ext/openssl/ossl_ocsp.h
50
- - ext/openssl/ossl_pkcs12.c
51
- - ext/openssl/ossl_pkcs12.h
52
- - ext/openssl/ossl_pkcs7.c
53
- - ext/openssl/ossl_pkcs7.h
54
- - ext/openssl/ossl_pkey.c
55
- - ext/openssl/ossl_pkey.h
56
- - ext/openssl/ossl_pkey_dh.c
57
- - ext/openssl/ossl_pkey_dsa.c
58
- - ext/openssl/ossl_pkey_ec.c
59
- - ext/openssl/ossl_pkey_rsa.c
60
- - ext/openssl/ossl_rand.c
61
- - ext/openssl/ossl_rand.h
62
- - ext/openssl/ossl_ssl.c
63
- - ext/openssl/ossl_ssl.h
64
- - ext/openssl/ossl_ssl_session.c
65
- - ext/openssl/ossl_ts.c
66
- - ext/openssl/ossl_ts.h
67
- - ext/openssl/ossl_x509.c
68
- - ext/openssl/ossl_x509.h
69
- - ext/openssl/ossl_x509attr.c
70
- - ext/openssl/ossl_x509cert.c
71
- - ext/openssl/ossl_x509crl.c
72
- - ext/openssl/ossl_x509ext.c
73
- - ext/openssl/ossl_x509name.c
74
- - ext/openssl/ossl_x509req.c
75
- - ext/openssl/ossl_x509revoked.c
76
- - ext/openssl/ossl_x509store.c
77
24
  - ext/zigrb_100doors/build.zig
78
25
  - ext/zigrb_100doors/extconf.rb
79
26
  - ext/zigrb_100doors/src/main.zig
@@ -108,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
55
  - !ruby/object:Gem::Version
109
56
  version: '0'
110
57
  requirements: []
111
- rubygems_version: 3.2.5
58
+ rubygems_version: 3.4.6
112
59
  signing_key:
113
60
  specification_version: 4
114
61
  summary: An example gem for ruby with native zig extensions.
@@ -1,40 +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
- #include RUBY_EXTCONF_H
11
-
12
- #include <string.h> /* memcpy() */
13
- #include <openssl/x509_vfy.h>
14
-
15
- #include "openssl_missing.h"
16
-
17
- /*** added in 1.1.0 ***/
18
- #if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
19
- void
20
- ossl_X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
21
- const X509_ALGOR **palg)
22
- {
23
- if (psig != NULL)
24
- *psig = crl->signature;
25
- if (palg != NULL)
26
- *palg = crl->sig_alg;
27
- }
28
- #endif
29
-
30
- #if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
31
- void
32
- ossl_X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
33
- const X509_ALGOR **palg)
34
- {
35
- if (psig != NULL)
36
- *psig = req->signature;
37
- if (palg != NULL)
38
- *palg = req->sig_alg;
39
- }
40
- #endif
@@ -1,238 +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_OPENSSL_MISSING_H_)
11
- #define _OSSL_OPENSSL_MISSING_H_
12
-
13
- #include "ruby/config.h"
14
-
15
- /* added in 1.1.0 */
16
- #if !defined(HAVE_EVP_MD_CTX_NEW)
17
- # define EVP_MD_CTX_new EVP_MD_CTX_create
18
- #endif
19
-
20
- #if !defined(HAVE_EVP_MD_CTX_FREE)
21
- # define EVP_MD_CTX_free EVP_MD_CTX_destroy
22
- #endif
23
-
24
- #if !defined(HAVE_X509_STORE_GET_EX_DATA)
25
- # define X509_STORE_get_ex_data(x, idx) \
26
- CRYPTO_get_ex_data(&(x)->ex_data, (idx))
27
- #endif
28
-
29
- #if !defined(HAVE_X509_STORE_SET_EX_DATA)
30
- # define X509_STORE_set_ex_data(x, idx, data) \
31
- CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
32
- #endif
33
-
34
- #if !defined(HAVE_X509_STORE_GET_EX_NEW_INDEX) && !defined(X509_STORE_get_ex_new_index)
35
- # define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
36
- CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
37
- (newf), (dupf), (freef))
38
- #endif
39
-
40
- #if !defined(HAVE_X509_CRL_GET0_SIGNATURE)
41
- void ossl_X509_CRL_get0_signature(const X509_CRL *, const ASN1_BIT_STRING **, const X509_ALGOR **);
42
- # define X509_CRL_get0_signature ossl_X509_CRL_get0_signature
43
- #endif
44
-
45
- #if !defined(HAVE_X509_REQ_GET0_SIGNATURE)
46
- void ossl_X509_REQ_get0_signature(const X509_REQ *, const ASN1_BIT_STRING **, const X509_ALGOR **);
47
- # define X509_REQ_get0_signature ossl_X509_REQ_get0_signature
48
- #endif
49
-
50
- #if !defined(HAVE_X509_REVOKED_GET0_SERIALNUMBER)
51
- # define X509_REVOKED_get0_serialNumber(x) ((x)->serialNumber)
52
- #endif
53
-
54
- #if !defined(HAVE_X509_REVOKED_GET0_REVOCATIONDATE)
55
- # define X509_REVOKED_get0_revocationDate(x) ((x)->revocationDate)
56
- #endif
57
-
58
- #if !defined(HAVE_X509_GET0_TBS_SIGALG)
59
- # define X509_get0_tbs_sigalg(x) ((x)->cert_info->signature)
60
- #endif
61
-
62
- #if !defined(HAVE_X509_STORE_CTX_GET0_UNTRUSTED)
63
- # define X509_STORE_CTX_get0_untrusted(x) ((x)->untrusted)
64
- #endif
65
-
66
- #if !defined(HAVE_X509_STORE_CTX_GET0_CERT)
67
- # define X509_STORE_CTX_get0_cert(x) ((x)->cert)
68
- #endif
69
-
70
- #if !defined(HAVE_X509_STORE_CTX_GET0_CHAIN)
71
- # define X509_STORE_CTX_get0_chain(ctx) X509_STORE_CTX_get_chain(ctx)
72
- #endif
73
-
74
- #if !defined(HAVE_OCSP_SINGLERESP_GET0_ID)
75
- # define OCSP_SINGLERESP_get0_id(s) ((s)->certId)
76
- #endif
77
-
78
- #if !defined(HAVE_SSL_CTX_GET_CIPHERS)
79
- # define SSL_CTX_get_ciphers(ctx) ((ctx)->cipher_list)
80
- #endif
81
-
82
- #if !defined(HAVE_X509_UP_REF)
83
- # define X509_up_ref(x) \
84
- CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509)
85
- #endif
86
-
87
- #if !defined(HAVE_X509_CRL_UP_REF)
88
- # define X509_CRL_up_ref(x) \
89
- CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_CRL);
90
- #endif
91
-
92
- #if !defined(HAVE_X509_STORE_UP_REF)
93
- # define X509_STORE_up_ref(x) \
94
- CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_STORE);
95
- #endif
96
-
97
- #if !defined(HAVE_SSL_SESSION_UP_REF)
98
- # define SSL_SESSION_up_ref(x) \
99
- CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_SSL_SESSION);
100
- #endif
101
-
102
- #if !defined(HAVE_EVP_PKEY_UP_REF)
103
- # define EVP_PKEY_up_ref(x) \
104
- CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_EVP_PKEY);
105
- #endif
106
-
107
- #if !defined(HAVE_OPAQUE_OPENSSL)
108
- #define IMPL_PKEY_GETTER(_type, _name) \
109
- static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \
110
- return pkey->pkey._name; }
111
- #define IMPL_KEY_ACCESSOR2(_type, _group, a1, a2, _fail_cond) \
112
- static inline void _type##_get0_##_group(const _type *obj, const BIGNUM **a1, const BIGNUM **a2) { \
113
- if (a1) *a1 = obj->a1; \
114
- if (a2) *a2 = obj->a2; } \
115
- static inline int _type##_set0_##_group(_type *obj, BIGNUM *a1, BIGNUM *a2) { \
116
- if (_fail_cond) return 0; \
117
- BN_clear_free(obj->a1); obj->a1 = a1; \
118
- BN_clear_free(obj->a2); obj->a2 = a2; \
119
- return 1; }
120
- #define IMPL_KEY_ACCESSOR3(_type, _group, a1, a2, a3, _fail_cond) \
121
- static inline void _type##_get0_##_group(const _type *obj, const BIGNUM **a1, const BIGNUM **a2, const BIGNUM **a3) { \
122
- if (a1) *a1 = obj->a1; \
123
- if (a2) *a2 = obj->a2; \
124
- if (a3) *a3 = obj->a3; } \
125
- static inline int _type##_set0_##_group(_type *obj, BIGNUM *a1, BIGNUM *a2, BIGNUM *a3) { \
126
- if (_fail_cond) return 0; \
127
- BN_clear_free(obj->a1); obj->a1 = a1; \
128
- BN_clear_free(obj->a2); obj->a2 = a2; \
129
- BN_clear_free(obj->a3); obj->a3 = a3; \
130
- return 1; }
131
-
132
- #if !defined(OPENSSL_NO_RSA)
133
- IMPL_PKEY_GETTER(RSA, rsa)
134
- IMPL_KEY_ACCESSOR3(RSA, key, n, e, d, (n == obj->n || e == obj->e || (obj->d && d == obj->d)))
135
- IMPL_KEY_ACCESSOR2(RSA, factors, p, q, (p == obj->p || q == obj->q))
136
- IMPL_KEY_ACCESSOR3(RSA, crt_params, dmp1, dmq1, iqmp, (dmp1 == obj->dmp1 || dmq1 == obj->dmq1 || iqmp == obj->iqmp))
137
- #endif
138
-
139
- #if !defined(OPENSSL_NO_DSA)
140
- IMPL_PKEY_GETTER(DSA, dsa)
141
- IMPL_KEY_ACCESSOR2(DSA, key, pub_key, priv_key, (pub_key == obj->pub_key || (obj->priv_key && priv_key == obj->priv_key)))
142
- IMPL_KEY_ACCESSOR3(DSA, pqg, p, q, g, (p == obj->p || q == obj->q || g == obj->g))
143
- #endif
144
-
145
- #if !defined(OPENSSL_NO_DH)
146
- IMPL_PKEY_GETTER(DH, dh)
147
- IMPL_KEY_ACCESSOR2(DH, key, pub_key, priv_key, (pub_key == obj->pub_key || (obj->priv_key && priv_key == obj->priv_key)))
148
- IMPL_KEY_ACCESSOR3(DH, pqg, p, q, g, (p == obj->p || (obj->q && q == obj->q) || g == obj->g))
149
- static inline ENGINE *DH_get0_engine(DH *dh) { return dh->engine; }
150
- #endif
151
-
152
- #if !defined(OPENSSL_NO_EC)
153
- IMPL_PKEY_GETTER(EC_KEY, ec)
154
- #endif
155
-
156
- #undef IMPL_PKEY_GETTER
157
- #undef IMPL_KEY_ACCESSOR2
158
- #undef IMPL_KEY_ACCESSOR3
159
- #endif /* HAVE_OPAQUE_OPENSSL */
160
-
161
- #if !defined(EVP_CTRL_AEAD_GET_TAG)
162
- # define EVP_CTRL_AEAD_GET_TAG EVP_CTRL_GCM_GET_TAG
163
- # define EVP_CTRL_AEAD_SET_TAG EVP_CTRL_GCM_SET_TAG
164
- # define EVP_CTRL_AEAD_SET_IVLEN EVP_CTRL_GCM_SET_IVLEN
165
- #endif
166
-
167
- #if !defined(HAVE_X509_GET0_NOTBEFORE)
168
- # define X509_get0_notBefore(x) X509_get_notBefore(x)
169
- # define X509_get0_notAfter(x) X509_get_notAfter(x)
170
- # define X509_CRL_get0_lastUpdate(x) X509_CRL_get_lastUpdate(x)
171
- # define X509_CRL_get0_nextUpdate(x) X509_CRL_get_nextUpdate(x)
172
- # define X509_set1_notBefore(x, t) X509_set_notBefore(x, t)
173
- # define X509_set1_notAfter(x, t) X509_set_notAfter(x, t)
174
- # define X509_CRL_set1_lastUpdate(x, t) X509_CRL_set_lastUpdate(x, t)
175
- # define X509_CRL_set1_nextUpdate(x, t) X509_CRL_set_nextUpdate(x, t)
176
- #endif
177
-
178
- #if !defined(HAVE_SSL_SESSION_GET_PROTOCOL_VERSION)
179
- # define SSL_SESSION_get_protocol_version(s) ((s)->ssl_version)
180
- #endif
181
-
182
- #if !defined(HAVE_TS_STATUS_INFO_GET0_STATUS)
183
- # define TS_STATUS_INFO_get0_status(a) ((a)->status)
184
- #endif
185
-
186
- #if !defined(HAVE_TS_STATUS_INFO_GET0_TEXT)
187
- # define TS_STATUS_INFO_get0_text(a) ((a)->text)
188
- #endif
189
-
190
- #if !defined(HAVE_TS_STATUS_INFO_GET0_FAILURE_INFO)
191
- # define TS_STATUS_INFO_get0_failure_info(a) ((a)->failure_info)
192
- #endif
193
-
194
- #if !defined(HAVE_TS_VERIFY_CTS_SET_CERTS)
195
- # define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
196
- #endif
197
-
198
- #if !defined(HAVE_TS_VERIFY_CTX_SET_STORE)
199
- # define TS_VERIFY_CTX_set_store(ctx, str) ((ctx)->store=(str))
200
- #endif
201
-
202
- #if !defined(HAVE_TS_VERIFY_CTX_ADD_FLAGS)
203
- # define TS_VERIFY_CTX_add_flags(ctx, f) ((ctx)->flags |= (f))
204
- #endif
205
-
206
- #if !defined(HAVE_TS_RESP_CTX_SET_TIME_CB)
207
- # define TS_RESP_CTX_set_time_cb(ctx, callback, dta) do { \
208
- (ctx)->time_cb = (callback); \
209
- (ctx)->time_cb_data = (dta); \
210
- } while (0)
211
- #endif
212
-
213
- /* added in 3.0.0 */
214
- #if !defined(HAVE_TS_VERIFY_CTX_SET_CERTS)
215
- # define TS_VERIFY_CTX_set_certs(ctx, crts) TS_VERIFY_CTS_set_certs(ctx, crts)
216
- #endif
217
-
218
- #ifndef HAVE_EVP_MD_CTX_GET0_MD
219
- # define EVP_MD_CTX_get0_md(ctx) EVP_MD_CTX_md(ctx)
220
- #endif
221
-
222
- /*
223
- * OpenSSL 1.1.0 added EVP_MD_CTX_pkey_ctx(), and then it was renamed to
224
- * EVP_MD_CTX_get_pkey_ctx(x) in OpenSSL 3.0.
225
- */
226
- #ifndef HAVE_EVP_MD_CTX_GET_PKEY_CTX
227
- # ifdef HAVE_EVP_MD_CTX_PKEY_CTX
228
- # define EVP_MD_CTX_get_pkey_ctx(x) EVP_MD_CTX_pkey_ctx(x)
229
- # else
230
- # define EVP_MD_CTX_get_pkey_ctx(x) (x)->pctx
231
- # endif
232
- #endif
233
-
234
- #ifndef HAVE_EVP_PKEY_EQ
235
- # define EVP_PKEY_eq(a, b) EVP_PKEY_cmp(a, b)
236
- #endif
237
-
238
- #endif /* _OSSL_OPENSSL_MISSING_H_ */