@annadata/capacitor-mqtt-quic 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/ios/include/nghttp3/nghttp3.h +3295 -0
  2. package/ios/include/nghttp3/version.h +46 -0
  3. package/ios/include/ngtcp2/ngtcp2.h +6254 -0
  4. package/ios/include/ngtcp2/ngtcp2_crypto.h +1037 -0
  5. package/ios/include/ngtcp2/ngtcp2_crypto_quictls.h +147 -0
  6. package/ios/include/ngtcp2/version.h +51 -0
  7. package/ios/include/openssl/aes.h +111 -0
  8. package/ios/include/openssl/asn1.h +1131 -0
  9. package/ios/include/openssl/asn1_mac.h +10 -0
  10. package/ios/include/openssl/asn1err.h +140 -0
  11. package/ios/include/openssl/asn1t.h +946 -0
  12. package/ios/include/openssl/async.h +96 -0
  13. package/ios/include/openssl/asyncerr.h +29 -0
  14. package/ios/include/openssl/bio.h +887 -0
  15. package/ios/include/openssl/bioerr.h +65 -0
  16. package/ios/include/openssl/blowfish.h +78 -0
  17. package/ios/include/openssl/bn.h +584 -0
  18. package/ios/include/openssl/bnerr.h +47 -0
  19. package/ios/include/openssl/buffer.h +62 -0
  20. package/ios/include/openssl/buffererr.h +25 -0
  21. package/ios/include/openssl/camellia.h +117 -0
  22. package/ios/include/openssl/cast.h +71 -0
  23. package/ios/include/openssl/cmac.h +52 -0
  24. package/ios/include/openssl/cmp.h +597 -0
  25. package/ios/include/openssl/cmp_util.h +56 -0
  26. package/ios/include/openssl/cmperr.h +116 -0
  27. package/ios/include/openssl/cms.h +493 -0
  28. package/ios/include/openssl/cmserr.h +124 -0
  29. package/ios/include/openssl/comp.h +59 -0
  30. package/ios/include/openssl/comperr.h +31 -0
  31. package/ios/include/openssl/conf.h +214 -0
  32. package/ios/include/openssl/conf_api.h +46 -0
  33. package/ios/include/openssl/conferr.h +52 -0
  34. package/ios/include/openssl/configuration.h +149 -0
  35. package/ios/include/openssl/conftypes.h +44 -0
  36. package/ios/include/openssl/core.h +233 -0
  37. package/ios/include/openssl/core_dispatch.h +960 -0
  38. package/ios/include/openssl/core_names.h +561 -0
  39. package/ios/include/openssl/core_object.h +41 -0
  40. package/ios/include/openssl/crmf.h +227 -0
  41. package/ios/include/openssl/crmferr.h +50 -0
  42. package/ios/include/openssl/crypto.h +558 -0
  43. package/ios/include/openssl/cryptoerr.h +55 -0
  44. package/ios/include/openssl/cryptoerr_legacy.h +1466 -0
  45. package/ios/include/openssl/ct.h +573 -0
  46. package/ios/include/openssl/cterr.h +45 -0
  47. package/ios/include/openssl/decoder.h +133 -0
  48. package/ios/include/openssl/decodererr.h +28 -0
  49. package/ios/include/openssl/des.h +211 -0
  50. package/ios/include/openssl/dh.h +335 -0
  51. package/ios/include/openssl/dherr.h +58 -0
  52. package/ios/include/openssl/dsa.h +280 -0
  53. package/ios/include/openssl/dsaerr.h +44 -0
  54. package/ios/include/openssl/dtls1.h +57 -0
  55. package/ios/include/openssl/e_os2.h +308 -0
  56. package/ios/include/openssl/ebcdic.h +39 -0
  57. package/ios/include/openssl/ec.h +1572 -0
  58. package/ios/include/openssl/ecdh.h +10 -0
  59. package/ios/include/openssl/ecdsa.h +10 -0
  60. package/ios/include/openssl/ecerr.h +104 -0
  61. package/ios/include/openssl/encoder.h +124 -0
  62. package/ios/include/openssl/encodererr.h +28 -0
  63. package/ios/include/openssl/engine.h +833 -0
  64. package/ios/include/openssl/engineerr.h +63 -0
  65. package/ios/include/openssl/err.h +504 -0
  66. package/ios/include/openssl/ess.h +128 -0
  67. package/ios/include/openssl/esserr.h +32 -0
  68. package/ios/include/openssl/evp.h +2175 -0
  69. package/ios/include/openssl/evperr.h +134 -0
  70. package/ios/include/openssl/fips_names.h +77 -0
  71. package/ios/include/openssl/fipskey.h +36 -0
  72. package/ios/include/openssl/hmac.h +62 -0
  73. package/ios/include/openssl/http.h +109 -0
  74. package/ios/include/openssl/httperr.h +55 -0
  75. package/ios/include/openssl/idea.h +82 -0
  76. package/ios/include/openssl/kdf.h +138 -0
  77. package/ios/include/openssl/kdferr.h +16 -0
  78. package/ios/include/openssl/lhash.h +331 -0
  79. package/ios/include/openssl/macros.h +325 -0
  80. package/ios/include/openssl/md2.h +56 -0
  81. package/ios/include/openssl/md4.h +63 -0
  82. package/ios/include/openssl/md5.h +62 -0
  83. package/ios/include/openssl/mdc2.h +55 -0
  84. package/ios/include/openssl/modes.h +219 -0
  85. package/ios/include/openssl/obj_mac.h +5481 -0
  86. package/ios/include/openssl/objects.h +183 -0
  87. package/ios/include/openssl/objectserr.h +28 -0
  88. package/ios/include/openssl/ocsp.h +483 -0
  89. package/ios/include/openssl/ocsperr.h +53 -0
  90. package/ios/include/openssl/opensslconf.h +17 -0
  91. package/ios/include/openssl/opensslv.h +114 -0
  92. package/ios/include/openssl/ossl_typ.h +16 -0
  93. package/ios/include/openssl/param_build.h +63 -0
  94. package/ios/include/openssl/params.h +160 -0
  95. package/ios/include/openssl/pem.h +541 -0
  96. package/ios/include/openssl/pem2.h +19 -0
  97. package/ios/include/openssl/pemerr.h +58 -0
  98. package/ios/include/openssl/pkcs12.h +353 -0
  99. package/ios/include/openssl/pkcs12err.h +45 -0
  100. package/ios/include/openssl/pkcs7.h +430 -0
  101. package/ios/include/openssl/pkcs7err.h +63 -0
  102. package/ios/include/openssl/prov_ssl.h +34 -0
  103. package/ios/include/openssl/proverr.h +149 -0
  104. package/ios/include/openssl/provider.h +60 -0
  105. package/ios/include/openssl/quic.h +19 -0
  106. package/ios/include/openssl/rand.h +125 -0
  107. package/ios/include/openssl/randerr.h +69 -0
  108. package/ios/include/openssl/rc2.h +68 -0
  109. package/ios/include/openssl/rc4.h +47 -0
  110. package/ios/include/openssl/rc5.h +79 -0
  111. package/ios/include/openssl/ripemd.h +59 -0
  112. package/ios/include/openssl/rsa.h +610 -0
  113. package/ios/include/openssl/rsaerr.h +107 -0
  114. package/ios/include/openssl/safestack.h +297 -0
  115. package/ios/include/openssl/seed.h +113 -0
  116. package/ios/include/openssl/self_test.h +94 -0
  117. package/ios/include/openssl/sha.h +138 -0
  118. package/ios/include/openssl/srp.h +285 -0
  119. package/ios/include/openssl/srtp.h +56 -0
  120. package/ios/include/openssl/ssl.h +2671 -0
  121. package/ios/include/openssl/ssl2.h +30 -0
  122. package/ios/include/openssl/ssl3.h +347 -0
  123. package/ios/include/openssl/sslerr.h +348 -0
  124. package/ios/include/openssl/sslerr_legacy.h +468 -0
  125. package/ios/include/openssl/stack.h +90 -0
  126. package/ios/include/openssl/store.h +369 -0
  127. package/ios/include/openssl/storeerr.h +49 -0
  128. package/ios/include/openssl/symhacks.h +39 -0
  129. package/ios/include/openssl/tls1.h +1186 -0
  130. package/ios/include/openssl/trace.h +312 -0
  131. package/ios/include/openssl/ts.h +505 -0
  132. package/ios/include/openssl/tserr.h +67 -0
  133. package/ios/include/openssl/txt_db.h +63 -0
  134. package/ios/include/openssl/types.h +239 -0
  135. package/ios/include/openssl/ui.h +407 -0
  136. package/ios/include/openssl/uierr.h +38 -0
  137. package/ios/include/openssl/whrlpool.h +62 -0
  138. package/ios/include/openssl/x509.h +1279 -0
  139. package/ios/include/openssl/x509_vfy.h +894 -0
  140. package/ios/include/openssl/x509err.h +69 -0
  141. package/ios/include/openssl/x509v3.h +1453 -0
  142. package/ios/include/openssl/x509v3err.h +93 -0
  143. package/ios/libs/libcrypto.a +0 -0
  144. package/ios/libs/libnghttp3.a +0 -0
  145. package/ios/libs/libngtcp2.a +0 -0
  146. package/ios/libs/libngtcp2_crypto_quictls.a +0 -0
  147. package/ios/libs/libssl.a +0 -0
  148. package/package.json +2 -2
@@ -0,0 +1,541 @@
1
+ /*
2
+ * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
5
+ * this file except in compliance with the License. You can obtain a copy
6
+ * in the file LICENSE in the source distribution or at
7
+ * https://www.openssl.org/source/license.html
8
+ */
9
+
10
+ #ifndef OPENSSL_PEM_H
11
+ # define OPENSSL_PEM_H
12
+ # pragma once
13
+
14
+ # include <openssl/macros.h>
15
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
16
+ # define HEADER_PEM_H
17
+ # endif
18
+
19
+ # include <openssl/e_os2.h>
20
+ # include <openssl/bio.h>
21
+ # include <openssl/safestack.h>
22
+ # include <openssl/evp.h>
23
+ # include <openssl/x509.h>
24
+ # include <openssl/pemerr.h>
25
+ # ifndef OPENSSL_NO_STDIO
26
+ # include <stdio.h>
27
+ # endif
28
+
29
+ #ifdef __cplusplus
30
+ extern "C" {
31
+ #endif
32
+
33
+ # define PEM_BUFSIZE 1024
34
+
35
+ # define PEM_STRING_X509_OLD "X509 CERTIFICATE"
36
+ # define PEM_STRING_X509 "CERTIFICATE"
37
+ # define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
38
+ # define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST"
39
+ # define PEM_STRING_X509_REQ "CERTIFICATE REQUEST"
40
+ # define PEM_STRING_X509_CRL "X509 CRL"
41
+ # define PEM_STRING_EVP_PKEY "ANY PRIVATE KEY"
42
+ # define PEM_STRING_PUBLIC "PUBLIC KEY"
43
+ # define PEM_STRING_RSA "RSA PRIVATE KEY"
44
+ # define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY"
45
+ # define PEM_STRING_DSA "DSA PRIVATE KEY"
46
+ # define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY"
47
+ # define PEM_STRING_PKCS7 "PKCS7"
48
+ # define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA"
49
+ # define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
50
+ # define PEM_STRING_PKCS8INF "PRIVATE KEY"
51
+ # define PEM_STRING_DHPARAMS "DH PARAMETERS"
52
+ # define PEM_STRING_DHXPARAMS "X9.42 DH PARAMETERS"
53
+ # define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS"
54
+ # define PEM_STRING_DSAPARAMS "DSA PARAMETERS"
55
+ # define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY"
56
+ # define PEM_STRING_ECPARAMETERS "EC PARAMETERS"
57
+ # define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY"
58
+ # define PEM_STRING_PARAMETERS "PARAMETERS"
59
+ # define PEM_STRING_CMS "CMS"
60
+
61
+ # define PEM_TYPE_ENCRYPTED 10
62
+ # define PEM_TYPE_MIC_ONLY 20
63
+ # define PEM_TYPE_MIC_CLEAR 30
64
+ # define PEM_TYPE_CLEAR 40
65
+
66
+ /*
67
+ * These macros make the PEM_read/PEM_write functions easier to maintain and
68
+ * write. Now they are all implemented with either: IMPLEMENT_PEM_rw(...) or
69
+ * IMPLEMENT_PEM_rw_cb(...)
70
+ */
71
+
72
+ # define PEM_read_cb_fnsig(name, type, INTYPE, readname) \
73
+ type *PEM_##readname##_##name(INTYPE *out, type **x, \
74
+ pem_password_cb *cb, void *u)
75
+ # define PEM_read_cb_ex_fnsig(name, type, INTYPE, readname) \
76
+ type *PEM_##readname##_##name##_ex(INTYPE *out, type **x, \
77
+ pem_password_cb *cb, void *u, \
78
+ OSSL_LIB_CTX *libctx, \
79
+ const char *propq)
80
+
81
+ # define PEM_write_fnsig(name, type, OUTTYPE, writename) \
82
+ int PEM_##writename##_##name(OUTTYPE *out, const type *x)
83
+ # define PEM_write_cb_fnsig(name, type, OUTTYPE, writename) \
84
+ int PEM_##writename##_##name(OUTTYPE *out, const type *x, \
85
+ const EVP_CIPHER *enc, \
86
+ const unsigned char *kstr, int klen, \
87
+ pem_password_cb *cb, void *u)
88
+ # define PEM_write_ex_fnsig(name, type, OUTTYPE, writename) \
89
+ int PEM_##writename##_##name##_ex(OUTTYPE *out, const type *x, \
90
+ OSSL_LIB_CTX *libctx, \
91
+ const char *propq)
92
+ # define PEM_write_cb_ex_fnsig(name, type, OUTTYPE, writename) \
93
+ int PEM_##writename##_##name##_ex(OUTTYPE *out, const type *x, \
94
+ const EVP_CIPHER *enc, \
95
+ const unsigned char *kstr, int klen, \
96
+ pem_password_cb *cb, void *u, \
97
+ OSSL_LIB_CTX *libctx, \
98
+ const char *propq)
99
+
100
+ # ifdef OPENSSL_NO_STDIO
101
+
102
+ # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/
103
+ # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/
104
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
105
+ # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/
106
+ # endif
107
+ # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/
108
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
109
+ # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/
110
+ # endif
111
+ # else
112
+
113
+ # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \
114
+ type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u) \
115
+ { \
116
+ return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str, fp, \
117
+ (void **)x, cb, u); \
118
+ }
119
+
120
+ # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \
121
+ PEM_write_fnsig(name, type, FILE, write) \
122
+ { \
123
+ return PEM_ASN1_write((i2d_of_void *)i2d_##asn1, str, out, \
124
+ x, NULL, NULL, 0, NULL, NULL); \
125
+ }
126
+
127
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
128
+ # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \
129
+ IMPLEMENT_PEM_write_fp(name, type, str, asn1)
130
+ # endif
131
+
132
+ # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \
133
+ PEM_write_cb_fnsig(name, type, FILE, write) \
134
+ { \
135
+ return PEM_ASN1_write((i2d_of_void *)i2d_##asn1, str, out, \
136
+ x, enc, kstr, klen, cb, u); \
137
+ }
138
+
139
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
140
+ # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \
141
+ IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
142
+ # endif
143
+ # endif
144
+
145
+ # define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
146
+ type *PEM_read_bio_##name(BIO *bp, type **x, \
147
+ pem_password_cb *cb, void *u) \
148
+ { \
149
+ return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
150
+ (void **)x, cb, u); \
151
+ }
152
+
153
+ # define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
154
+ PEM_write_fnsig(name, type, BIO, write_bio) \
155
+ { \
156
+ return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1, str, out, \
157
+ x, NULL,NULL,0,NULL,NULL); \
158
+ }
159
+
160
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
161
+ # define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
162
+ IMPLEMENT_PEM_write_bio(name, type, str, asn1)
163
+ # endif
164
+
165
+ # define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
166
+ PEM_write_cb_fnsig(name, type, BIO, write_bio) \
167
+ { \
168
+ return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1, str, out, \
169
+ x, enc, kstr, klen, cb, u); \
170
+ }
171
+
172
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
173
+ # define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
174
+ IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1)
175
+ # endif
176
+
177
+ # define IMPLEMENT_PEM_write(name, type, str, asn1) \
178
+ IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
179
+ IMPLEMENT_PEM_write_fp(name, type, str, asn1)
180
+
181
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
182
+ # define IMPLEMENT_PEM_write_const(name, type, str, asn1) \
183
+ IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
184
+ IMPLEMENT_PEM_write_fp_const(name, type, str, asn1)
185
+ # endif
186
+
187
+ # define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \
188
+ IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
189
+ IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
190
+
191
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
192
+ # define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \
193
+ IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
194
+ IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1)
195
+ # endif
196
+
197
+ # define IMPLEMENT_PEM_read(name, type, str, asn1) \
198
+ IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
199
+ IMPLEMENT_PEM_read_fp(name, type, str, asn1)
200
+
201
+ # define IMPLEMENT_PEM_rw(name, type, str, asn1) \
202
+ IMPLEMENT_PEM_read(name, type, str, asn1) \
203
+ IMPLEMENT_PEM_write(name, type, str, asn1)
204
+
205
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
206
+ # define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \
207
+ IMPLEMENT_PEM_read(name, type, str, asn1) \
208
+ IMPLEMENT_PEM_write_const(name, type, str, asn1)
209
+ # endif
210
+
211
+ # define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \
212
+ IMPLEMENT_PEM_read(name, type, str, asn1) \
213
+ IMPLEMENT_PEM_write_cb(name, type, str, asn1)
214
+
215
+ /* These are the same except they are for the declarations */
216
+
217
+ /*
218
+ * The mysterious 'extern' that's passed to some macros is innocuous,
219
+ * and is there to quiet pre-C99 compilers that may complain about empty
220
+ * arguments in macro calls.
221
+ */
222
+ # if defined(OPENSSL_NO_STDIO)
223
+
224
+ # define DECLARE_PEM_read_fp_attr(attr, name, type) /**/
225
+ # define DECLARE_PEM_read_fp_ex_attr(attr, name, type) /**/
226
+ # define DECLARE_PEM_write_fp_attr(attr, name, type) /**/
227
+ # define DECLARE_PEM_write_fp_ex_attr(attr, name, type) /**/
228
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
229
+ # define DECLARE_PEM_write_fp_const_attr(attr, name, type) /**/
230
+ # endif
231
+ # define DECLARE_PEM_write_cb_fp_attr(attr, name, type) /**/
232
+ # define DECLARE_PEM_write_cb_fp_ex_attr(attr, name, type) /**/
233
+
234
+ # else
235
+
236
+ # define DECLARE_PEM_read_fp_attr(attr, name, type) \
237
+ attr PEM_read_cb_fnsig(name, type, FILE, read);
238
+ # define DECLARE_PEM_read_fp_ex_attr(attr, name, type) \
239
+ attr PEM_read_cb_fnsig(name, type, FILE, read); \
240
+ attr PEM_read_cb_ex_fnsig(name, type, FILE, read);
241
+
242
+ # define DECLARE_PEM_write_fp_attr(attr, name, type) \
243
+ attr PEM_write_fnsig(name, type, FILE, write);
244
+ # define DECLARE_PEM_write_fp_ex_attr(attr, name, type) \
245
+ attr PEM_write_fnsig(name, type, FILE, write); \
246
+ attr PEM_write_ex_fnsig(name, type, FILE, write);
247
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
248
+ # define DECLARE_PEM_write_fp_const_attr(attr, name, type) \
249
+ attr PEM_write_fnsig(name, type, FILE, write);
250
+ # endif
251
+ # define DECLARE_PEM_write_cb_fp_attr(attr, name, type) \
252
+ attr PEM_write_cb_fnsig(name, type, FILE, write);
253
+ # define DECLARE_PEM_write_cb_fp_ex_attr(attr, name, type) \
254
+ attr PEM_write_cb_fnsig(name, type, FILE, write); \
255
+ attr PEM_write_cb_ex_fnsig(name, type, FILE, write);
256
+
257
+ # endif
258
+
259
+ # define DECLARE_PEM_read_fp(name, type) \
260
+ DECLARE_PEM_read_fp_attr(extern, name, type)
261
+ # define DECLARE_PEM_write_fp(name, type) \
262
+ DECLARE_PEM_write_fp_attr(extern, name, type)
263
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
264
+ # define DECLARE_PEM_write_fp_const(name, type) \
265
+ DECLARE_PEM_write_fp_const_attr(extern, name, type)
266
+ # endif
267
+ # define DECLARE_PEM_write_cb_fp(name, type) \
268
+ DECLARE_PEM_write_cb_fp_attr(extern, name, type)
269
+
270
+ # define DECLARE_PEM_read_bio_attr(attr, name, type) \
271
+ attr PEM_read_cb_fnsig(name, type, BIO, read_bio);
272
+ # define DECLARE_PEM_read_bio_ex_attr(attr, name, type) \
273
+ attr PEM_read_cb_fnsig(name, type, BIO, read_bio); \
274
+ attr PEM_read_cb_ex_fnsig(name, type, BIO, read_bio);
275
+ # define DECLARE_PEM_read_bio(name, type) \
276
+ DECLARE_PEM_read_bio_attr(extern, name, type)
277
+ # define DECLARE_PEM_read_bio_ex(name, type) \
278
+ DECLARE_PEM_read_bio_ex_attr(extern, name, type)
279
+
280
+ # define DECLARE_PEM_write_bio_attr(attr, name, type) \
281
+ attr PEM_write_fnsig(name, type, BIO, write_bio);
282
+ # define DECLARE_PEM_write_bio_ex_attr(attr, name, type) \
283
+ attr PEM_write_fnsig(name, type, BIO, write_bio); \
284
+ attr PEM_write_ex_fnsig(name, type, BIO, write_bio);
285
+ # define DECLARE_PEM_write_bio(name, type) \
286
+ DECLARE_PEM_write_bio_attr(extern, name, type)
287
+ # define DECLARE_PEM_write_bio_ex(name, type) \
288
+ DECLARE_PEM_write_bio_ex_attr(extern, name, type)
289
+
290
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
291
+ # define DECLARE_PEM_write_bio_const_attr(attr, name, type) \
292
+ attr PEM_write_fnsig(name, type, BIO, write_bio);
293
+ # define DECLARE_PEM_write_bio_const(name, type) \
294
+ DECLARE_PEM_write_bio_const_attr(extern, name, type)
295
+ # endif
296
+
297
+ # define DECLARE_PEM_write_cb_bio_attr(attr, name, type) \
298
+ attr PEM_write_cb_fnsig(name, type, BIO, write_bio);
299
+ # define DECLARE_PEM_write_cb_bio_ex_attr(attr, name, type) \
300
+ attr PEM_write_cb_fnsig(name, type, BIO, write_bio); \
301
+ attr PEM_write_cb_ex_fnsig(name, type, BIO, write_bio);
302
+ # define DECLARE_PEM_write_cb_bio(name, type) \
303
+ DECLARE_PEM_write_cb_bio_attr(extern, name, type)
304
+ # define DECLARE_PEM_write_cb_ex_bio(name, type) \
305
+ DECLARE_PEM_write_cb_bio_ex_attr(extern, name, type)
306
+
307
+ # define DECLARE_PEM_write_attr(attr, name, type) \
308
+ DECLARE_PEM_write_bio_attr(attr, name, type) \
309
+ DECLARE_PEM_write_fp_attr(attr, name, type)
310
+ # define DECLARE_PEM_write_ex_attr(attr, name, type) \
311
+ DECLARE_PEM_write_bio_ex_attr(attr, name, type) \
312
+ DECLARE_PEM_write_fp_ex_attr(attr, name, type)
313
+ # define DECLARE_PEM_write(name, type) \
314
+ DECLARE_PEM_write_attr(extern, name, type)
315
+ # define DECLARE_PEM_write_ex(name, type) \
316
+ DECLARE_PEM_write_ex_attr(extern, name, type)
317
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
318
+ # define DECLARE_PEM_write_const_attr(attr, name, type) \
319
+ DECLARE_PEM_write_bio_const_attr(attr, name, type) \
320
+ DECLARE_PEM_write_fp_const_attr(attr, name, type)
321
+ # define DECLARE_PEM_write_const(name, type) \
322
+ DECLARE_PEM_write_const_attr(extern, name, type)
323
+ # endif
324
+ # define DECLARE_PEM_write_cb_attr(attr, name, type) \
325
+ DECLARE_PEM_write_cb_bio_attr(attr, name, type) \
326
+ DECLARE_PEM_write_cb_fp_attr(attr, name, type)
327
+ # define DECLARE_PEM_write_cb_ex_attr(attr, name, type) \
328
+ DECLARE_PEM_write_cb_bio_ex_attr(attr, name, type) \
329
+ DECLARE_PEM_write_cb_fp_ex_attr(attr, name, type)
330
+ # define DECLARE_PEM_write_cb(name, type) \
331
+ DECLARE_PEM_write_cb_attr(extern, name, type)
332
+ # define DECLARE_PEM_write_cb_ex(name, type) \
333
+ DECLARE_PEM_write_cb_ex_attr(extern, name, type)
334
+ # define DECLARE_PEM_read_attr(attr, name, type) \
335
+ DECLARE_PEM_read_bio_attr(attr, name, type) \
336
+ DECLARE_PEM_read_fp_attr(attr, name, type)
337
+ # define DECLARE_PEM_read_ex_attr(attr, name, type) \
338
+ DECLARE_PEM_read_bio_ex_attr(attr, name, type) \
339
+ DECLARE_PEM_read_fp_ex_attr(attr, name, type)
340
+ # define DECLARE_PEM_read(name, type) \
341
+ DECLARE_PEM_read_attr(extern, name, type)
342
+ # define DECLARE_PEM_read_ex(name, type) \
343
+ DECLARE_PEM_read_ex_attr(extern, name, type)
344
+ # define DECLARE_PEM_rw_attr(attr, name, type) \
345
+ DECLARE_PEM_read_attr(attr, name, type) \
346
+ DECLARE_PEM_write_attr(attr, name, type)
347
+ # define DECLARE_PEM_rw_ex_attr(attr, name, type) \
348
+ DECLARE_PEM_read_ex_attr(attr, name, type) \
349
+ DECLARE_PEM_write_ex_attr(attr, name, type)
350
+ # define DECLARE_PEM_rw(name, type) \
351
+ DECLARE_PEM_rw_attr(extern, name, type)
352
+ # define DECLARE_PEM_rw_ex(name, type) \
353
+ DECLARE_PEM_rw_ex_attr(extern, name, type)
354
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
355
+ # define DECLARE_PEM_rw_const_attr(attr, name, type) \
356
+ DECLARE_PEM_read_attr(attr, name, type) \
357
+ DECLARE_PEM_write_const_attr(attr, name, type)
358
+ # define DECLARE_PEM_rw_const(name, type) \
359
+ DECLARE_PEM_rw_const_attr(extern, name, type)
360
+ # endif
361
+ # define DECLARE_PEM_rw_cb_attr(attr, name, type) \
362
+ DECLARE_PEM_read_attr(attr, name, type) \
363
+ DECLARE_PEM_write_cb_attr(attr, name, type)
364
+ # define DECLARE_PEM_rw_cb_ex_attr(attr, name, type) \
365
+ DECLARE_PEM_read_ex_attr(attr, name, type) \
366
+ DECLARE_PEM_write_cb_ex_attr(attr, name, type)
367
+ # define DECLARE_PEM_rw_cb(name, type) \
368
+ DECLARE_PEM_rw_cb_attr(extern, name, type)
369
+ # define DECLARE_PEM_rw_cb_ex(name, type) \
370
+ DECLARE_PEM_rw_cb_ex_attr(extern, name, type)
371
+
372
+ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
373
+ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len,
374
+ pem_password_cb *callback, void *u);
375
+
376
+ int PEM_read_bio(BIO *bp, char **name, char **header,
377
+ unsigned char **data, long *len);
378
+ # define PEM_FLAG_SECURE 0x1
379
+ # define PEM_FLAG_EAY_COMPATIBLE 0x2
380
+ # define PEM_FLAG_ONLY_B64 0x4
381
+ int PEM_read_bio_ex(BIO *bp, char **name, char **header,
382
+ unsigned char **data, long *len, unsigned int flags);
383
+ int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm,
384
+ const char *name, BIO *bp, pem_password_cb *cb,
385
+ void *u);
386
+ int PEM_write_bio(BIO *bp, const char *name, const char *hdr,
387
+ const unsigned char *data, long len);
388
+ int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
389
+ const char *name, BIO *bp, pem_password_cb *cb,
390
+ void *u);
391
+ void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
392
+ pem_password_cb *cb, void *u);
393
+ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
394
+ const void *x, const EVP_CIPHER *enc,
395
+ const unsigned char *kstr, int klen,
396
+ pem_password_cb *cb, void *u);
397
+
398
+ STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
399
+ pem_password_cb *cb, void *u);
400
+ STACK_OF(X509_INFO)
401
+ *PEM_X509_INFO_read_bio_ex(BIO *bp, STACK_OF(X509_INFO) *sk,
402
+ pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx,
403
+ const char *propq);
404
+
405
+ int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
406
+ const unsigned char *kstr, int klen,
407
+ pem_password_cb *cd, void *u);
408
+
409
+ #ifndef OPENSSL_NO_STDIO
410
+ int PEM_read(FILE *fp, char **name, char **header,
411
+ unsigned char **data, long *len);
412
+ int PEM_write(FILE *fp, const char *name, const char *hdr,
413
+ const unsigned char *data, long len);
414
+ void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
415
+ pem_password_cb *cb, void *u);
416
+ int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
417
+ const void *x, const EVP_CIPHER *enc,
418
+ const unsigned char *kstr, int klen,
419
+ pem_password_cb *callback, void *u);
420
+ STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
421
+ pem_password_cb *cb, void *u);
422
+ STACK_OF(X509_INFO)
423
+ *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb,
424
+ void *u, OSSL_LIB_CTX *libctx, const char *propq);
425
+ #endif
426
+
427
+ int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
428
+ int PEM_SignUpdate(EVP_MD_CTX *ctx, const unsigned char *d, unsigned int cnt);
429
+ int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
430
+ unsigned int *siglen, EVP_PKEY *pkey);
431
+
432
+ /* The default pem_password_cb that's used internally */
433
+ int PEM_def_callback(char *buf, int num, int rwflag, void *userdata);
434
+ void PEM_proc_type(char *buf, int type);
435
+ void PEM_dek_info(char *buf, const char *type, int len, const char *str);
436
+
437
+ # include <openssl/symhacks.h>
438
+
439
+ DECLARE_PEM_rw(X509, X509)
440
+ DECLARE_PEM_rw(X509_AUX, X509)
441
+ DECLARE_PEM_rw(X509_REQ, X509_REQ)
442
+ DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
443
+ DECLARE_PEM_rw(X509_CRL, X509_CRL)
444
+ DECLARE_PEM_rw(X509_PUBKEY, X509_PUBKEY)
445
+ DECLARE_PEM_rw(PKCS7, PKCS7)
446
+ DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)
447
+ DECLARE_PEM_rw(PKCS8, X509_SIG)
448
+ DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO)
449
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
450
+ DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
451
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSAPublicKey, RSA)
452
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSA_PUBKEY, RSA)
453
+ # endif
454
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
455
+ # ifndef OPENSSL_NO_DSA
456
+ DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, DSAPrivateKey, DSA)
457
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DSA_PUBKEY, DSA)
458
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DSAparams, DSA)
459
+ # endif
460
+ # endif
461
+
462
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
463
+ # ifndef OPENSSL_NO_EC
464
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, ECPKParameters, EC_GROUP)
465
+ DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
466
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, EC_PUBKEY, EC_KEY)
467
+ # endif
468
+ # endif
469
+
470
+ # ifndef OPENSSL_NO_DH
471
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
472
+ DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
473
+ DECLARE_PEM_write_attr(OSSL_DEPRECATEDIN_3_0, DHxparams, DH)
474
+ # endif
475
+ # endif
476
+ DECLARE_PEM_rw_cb_ex(PrivateKey, EVP_PKEY)
477
+ DECLARE_PEM_rw_ex(PUBKEY, EVP_PKEY)
478
+
479
+ int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
480
+ const EVP_CIPHER *enc,
481
+ const unsigned char *kstr, int klen,
482
+ pem_password_cb *cb, void *u);
483
+
484
+ /* Why do these take a signed char *kstr? */
485
+ int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
486
+ const char *kstr, int klen,
487
+ pem_password_cb *cb, void *u);
488
+ int PEM_write_bio_PKCS8PrivateKey(BIO *, const EVP_PKEY *, const EVP_CIPHER *,
489
+ const char *kstr, int klen,
490
+ pem_password_cb *cb, void *u);
491
+ int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
492
+ const char *kstr, int klen,
493
+ pem_password_cb *cb, void *u);
494
+ int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
495
+ const char *kstr, int klen,
496
+ pem_password_cb *cb, void *u);
497
+ EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
498
+ void *u);
499
+
500
+ # ifndef OPENSSL_NO_STDIO
501
+ int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
502
+ const char *kstr, int klen,
503
+ pem_password_cb *cb, void *u);
504
+ int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
505
+ const char *kstr, int klen,
506
+ pem_password_cb *cb, void *u);
507
+ int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
508
+ const char *kstr, int klen,
509
+ pem_password_cb *cb, void *u);
510
+
511
+ EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
512
+ void *u);
513
+
514
+ int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
515
+ const char *kstr, int klen,
516
+ pem_password_cb *cd, void *u);
517
+ # endif
518
+ EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
519
+ OSSL_LIB_CTX *libctx, const char *propq);
520
+ EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
521
+ int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
522
+
523
+ EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
524
+ EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
525
+ EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
526
+ EVP_PKEY *b2i_PublicKey_bio(BIO *in);
527
+ int i2b_PrivateKey_bio(BIO *out, const EVP_PKEY *pk);
528
+ int i2b_PublicKey_bio(BIO *out, const EVP_PKEY *pk);
529
+ EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
530
+ EVP_PKEY *b2i_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u,
531
+ OSSL_LIB_CTX *libctx, const char *propq);
532
+ int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel,
533
+ pem_password_cb *cb, void *u);
534
+ int i2b_PVK_bio_ex(BIO *out, const EVP_PKEY *pk, int enclevel,
535
+ pem_password_cb *cb, void *u,
536
+ OSSL_LIB_CTX *libctx, const char *propq);
537
+
538
+ # ifdef __cplusplus
539
+ }
540
+ # endif
541
+ #endif
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
5
+ * this file except in compliance with the License. You can obtain a copy
6
+ * in the file LICENSE in the source distribution or at
7
+ * https://www.openssl.org/source/license.html
8
+ */
9
+
10
+ #ifndef OPENSSL_PEM2_H
11
+ # define OPENSSL_PEM2_H
12
+ # pragma once
13
+
14
+ # include <openssl/macros.h>
15
+ # ifndef OPENSSL_NO_DEPRECATED_3_0
16
+ # define HEADER_PEM2_H
17
+ # endif
18
+ # include <openssl/pemerr.h>
19
+ #endif
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Generated by util/mkerr.pl DO NOT EDIT
3
+ * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4
+ *
5
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
6
+ * this file except in compliance with the License. You can obtain a copy
7
+ * in the file LICENSE in the source distribution or at
8
+ * https://www.openssl.org/source/license.html
9
+ */
10
+
11
+ #ifndef OPENSSL_PEMERR_H
12
+ # define OPENSSL_PEMERR_H
13
+ # pragma once
14
+
15
+ # include <openssl/opensslconf.h>
16
+ # include <openssl/symhacks.h>
17
+ # include <openssl/cryptoerr_legacy.h>
18
+
19
+
20
+
21
+ /*
22
+ * PEM reason codes.
23
+ */
24
+ # define PEM_R_BAD_BASE64_DECODE 100
25
+ # define PEM_R_BAD_DECRYPT 101
26
+ # define PEM_R_BAD_END_LINE 102
27
+ # define PEM_R_BAD_IV_CHARS 103
28
+ # define PEM_R_BAD_MAGIC_NUMBER 116
29
+ # define PEM_R_BAD_PASSWORD_READ 104
30
+ # define PEM_R_BAD_VERSION_NUMBER 117
31
+ # define PEM_R_BIO_WRITE_FAILURE 118
32
+ # define PEM_R_CIPHER_IS_NULL 127
33
+ # define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115
34
+ # define PEM_R_EXPECTING_DSS_KEY_BLOB 131
35
+ # define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119
36
+ # define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120
37
+ # define PEM_R_EXPECTING_RSA_KEY_BLOB 132
38
+ # define PEM_R_HEADER_TOO_LONG 128
39
+ # define PEM_R_INCONSISTENT_HEADER 121
40
+ # define PEM_R_KEYBLOB_HEADER_PARSE_ERROR 122
41
+ # define PEM_R_KEYBLOB_TOO_SHORT 123
42
+ # define PEM_R_MISSING_DEK_IV 129
43
+ # define PEM_R_NOT_DEK_INFO 105
44
+ # define PEM_R_NOT_ENCRYPTED 106
45
+ # define PEM_R_NOT_PROC_TYPE 107
46
+ # define PEM_R_NO_START_LINE 108
47
+ # define PEM_R_PROBLEMS_GETTING_PASSWORD 109
48
+ # define PEM_R_PVK_DATA_TOO_SHORT 124
49
+ # define PEM_R_PVK_TOO_SHORT 125
50
+ # define PEM_R_READ_KEY 111
51
+ # define PEM_R_SHORT_HEADER 112
52
+ # define PEM_R_UNEXPECTED_DEK_IV 130
53
+ # define PEM_R_UNSUPPORTED_CIPHER 113
54
+ # define PEM_R_UNSUPPORTED_ENCRYPTION 114
55
+ # define PEM_R_UNSUPPORTED_KEY_COMPONENTS 126
56
+ # define PEM_R_UNSUPPORTED_PUBLIC_KEY_TYPE 110
57
+
58
+ #endif