ec.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. /* ec.h
  2. *
  3. * Copyright (C) 2006-2022 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /* ec.h for openssl */
  22. #ifndef WOLFSSL_EC_H_
  23. #define WOLFSSL_EC_H_
  24. #include <wolfssl/openssl/bn.h>
  25. #include <wolfssl/wolfcrypt/asn.h>
  26. #include <wolfssl/wolfcrypt/ecc.h>
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
  31. /* Map OpenSSL NID value */
  32. enum {
  33. POINT_CONVERSION_COMPRESSED = 2,
  34. POINT_CONVERSION_UNCOMPRESSED = 4,
  35. #ifdef HAVE_ECC
  36. /* Use OpenSSL NIDs. NIDs can be mapped to ecc_curve_id enum values by
  37. calling NIDToEccEnum() in ssl.c */
  38. NID_X9_62_prime192v1 = 409,
  39. NID_X9_62_prime192v2 = 410,
  40. NID_X9_62_prime192v3 = 411,
  41. NID_X9_62_prime239v1 = 412,
  42. NID_X9_62_prime239v2 = 413,
  43. NID_X9_62_prime239v3 = 418, /* Previous value conflicted with AES128CBCb */
  44. NID_X9_62_prime256v1 = 415,
  45. NID_secp112r1 = 704,
  46. NID_secp112r2 = 705,
  47. NID_secp128r1 = 706,
  48. NID_secp128r2 = 707,
  49. NID_secp160r1 = 709,
  50. NID_secp160r2 = 710,
  51. NID_secp224r1 = 713,
  52. NID_secp384r1 = 715,
  53. NID_secp521r1 = 716,
  54. NID_secp160k1 = 708,
  55. NID_secp192k1 = 711,
  56. NID_secp224k1 = 712,
  57. NID_secp256k1 = 714,
  58. NID_brainpoolP160r1 = 921,
  59. NID_brainpoolP192r1 = 923,
  60. NID_brainpoolP224r1 = 925,
  61. NID_brainpoolP256r1 = 927,
  62. NID_brainpoolP320r1 = 929,
  63. NID_brainpoolP384r1 = 931,
  64. NID_brainpoolP512r1 = 933,
  65. #endif
  66. #ifdef HAVE_ED448
  67. NID_ED448 = ED448k,
  68. #endif
  69. #ifdef HAVE_ED25519
  70. NID_ED25519 = ED25519k,
  71. #endif
  72. OPENSSL_EC_EXPLICIT_CURVE = 0x000,
  73. OPENSSL_EC_NAMED_CURVE = 0x001,
  74. };
  75. #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
  76. #ifndef WOLFSSL_EC_TYPE_DEFINED /* guard on redeclaration */
  77. typedef struct WOLFSSL_EC_KEY WOLFSSL_EC_KEY;
  78. typedef struct WOLFSSL_EC_POINT WOLFSSL_EC_POINT;
  79. typedef struct WOLFSSL_EC_GROUP WOLFSSL_EC_GROUP;
  80. typedef struct WOLFSSL_EC_BUILTIN_CURVE WOLFSSL_EC_BUILTIN_CURVE;
  81. /* WOLFSSL_EC_METHOD is just an alias of WOLFSSL_EC_GROUP for now */
  82. typedef struct WOLFSSL_EC_GROUP WOLFSSL_EC_METHOD;
  83. #define WOLFSSL_EC_TYPE_DEFINED
  84. #endif
  85. struct WOLFSSL_EC_POINT {
  86. WOLFSSL_BIGNUM *X;
  87. WOLFSSL_BIGNUM *Y;
  88. WOLFSSL_BIGNUM *Z;
  89. void* internal; /* our ECC point */
  90. char inSet; /* internal set from external ? */
  91. char exSet; /* external set from internal ? */
  92. };
  93. struct WOLFSSL_EC_GROUP {
  94. int curve_idx; /* index of curve, used by WolfSSL as reference */
  95. int curve_nid; /* NID of curve, used by OpenSSL/OpenSSH as reference */
  96. int curve_oid; /* OID of curve, used by OpenSSL/OpenSSH as reference */
  97. };
  98. struct WOLFSSL_EC_KEY {
  99. WOLFSSL_EC_GROUP *group;
  100. WOLFSSL_EC_POINT *pub_key;
  101. WOLFSSL_BIGNUM *priv_key;
  102. void* internal; /* our ECC Key */
  103. void* heap;
  104. char form; /* Either POINT_CONVERSION_UNCOMPRESSED or
  105. * POINT_CONVERSION_COMPRESSED */
  106. word16 pkcs8HeaderSz;
  107. /* option bits */
  108. byte inSet:1; /* internal set from external ? */
  109. byte exSet:1; /* external set from internal ? */
  110. #ifndef SINGLE_THREADED
  111. wolfSSL_Mutex refMutex; /* ref count mutex */
  112. #endif
  113. int refCount; /* reference count */
  114. };
  115. struct WOLFSSL_EC_BUILTIN_CURVE {
  116. int nid;
  117. const char *comment;
  118. };
  119. #define WOLFSSL_EC_KEY_LOAD_PRIVATE 1
  120. #define WOLFSSL_EC_KEY_LOAD_PUBLIC 2
  121. typedef int point_conversion_form_t;
  122. WOLFSSL_API
  123. size_t wolfSSL_EC_get_builtin_curves(WOLFSSL_EC_BUILTIN_CURVE *r,size_t nitems);
  124. WOLFSSL_API
  125. WOLFSSL_EC_KEY *wolfSSL_EC_KEY_dup(const WOLFSSL_EC_KEY *src);
  126. WOLFSSL_API
  127. int wolfSSL_EC_KEY_up_ref(WOLFSSL_EC_KEY* key);
  128. WOLFSSL_API
  129. int wolfSSL_ECPoint_i2d(const WOLFSSL_EC_GROUP *curve,
  130. const WOLFSSL_EC_POINT *p,
  131. unsigned char *out, unsigned int *len);
  132. WOLFSSL_API
  133. int wolfSSL_ECPoint_d2i(unsigned char *in, unsigned int len,
  134. const WOLFSSL_EC_GROUP *curve, WOLFSSL_EC_POINT *p);
  135. WOLFSSL_API
  136. size_t wolfSSL_EC_POINT_point2oct(const WOLFSSL_EC_GROUP *group,
  137. const WOLFSSL_EC_POINT *p,
  138. char form,
  139. byte *buf, size_t len, WOLFSSL_BN_CTX *ctx);
  140. WOLFSSL_API
  141. int wolfSSL_EC_POINT_oct2point(const WOLFSSL_EC_GROUP *group,
  142. WOLFSSL_EC_POINT *p, const unsigned char *buf,
  143. size_t len, WOLFSSL_BN_CTX *ctx);
  144. WOLFSSL_API
  145. WOLFSSL_EC_KEY *wolfSSL_o2i_ECPublicKey(WOLFSSL_EC_KEY **a, const unsigned char **in,
  146. long len);
  147. WOLFSSL_API
  148. int wolfSSL_i2o_ECPublicKey(const WOLFSSL_EC_KEY *in, unsigned char **out);
  149. WOLFSSL_API
  150. WOLFSSL_EC_KEY *wolfSSL_d2i_ECPrivateKey(WOLFSSL_EC_KEY **key, const unsigned char **in,
  151. long len);
  152. WOLFSSL_API
  153. int wolfSSL_i2d_ECPrivateKey(const WOLFSSL_EC_KEY *in, unsigned char **out);
  154. WOLFSSL_API
  155. void wolfSSL_EC_KEY_set_conv_form(WOLFSSL_EC_KEY *eckey, char form);
  156. WOLFSSL_API
  157. point_conversion_form_t wolfSSL_EC_KEY_get_conv_form(const WOLFSSL_EC_KEY* key);
  158. WOLFSSL_API
  159. WOLFSSL_BIGNUM *wolfSSL_EC_POINT_point2bn(const WOLFSSL_EC_GROUP *group,
  160. const WOLFSSL_EC_POINT *p,
  161. char form,
  162. WOLFSSL_BIGNUM *in, WOLFSSL_BN_CTX *ctx);
  163. WOLFSSL_API
  164. int wolfSSL_EC_POINT_is_on_curve(const WOLFSSL_EC_GROUP *group,
  165. const WOLFSSL_EC_POINT *point,
  166. WOLFSSL_BN_CTX *ctx);
  167. WOLFSSL_API
  168. int wolfSSL_EC_KEY_LoadDer(WOLFSSL_EC_KEY* key,
  169. const unsigned char* der, int derSz);
  170. WOLFSSL_API
  171. int wolfSSL_EC_KEY_LoadDer_ex(WOLFSSL_EC_KEY* key,
  172. const unsigned char* der, int derSz, int opt);
  173. WOLFSSL_API
  174. void wolfSSL_EC_KEY_free(WOLFSSL_EC_KEY *key);
  175. WOLFSSL_API
  176. WOLFSSL_EC_POINT *wolfSSL_EC_KEY_get0_public_key(const WOLFSSL_EC_KEY *key);
  177. WOLFSSL_API
  178. const WOLFSSL_EC_GROUP *wolfSSL_EC_KEY_get0_group(const WOLFSSL_EC_KEY *key);
  179. WOLFSSL_API
  180. int wolfSSL_EC_KEY_set_private_key(WOLFSSL_EC_KEY *key,
  181. const WOLFSSL_BIGNUM *priv_key);
  182. WOLFSSL_API
  183. WOLFSSL_BIGNUM *wolfSSL_EC_KEY_get0_private_key(const WOLFSSL_EC_KEY *key);
  184. WOLFSSL_API
  185. WOLFSSL_EC_KEY *wolfSSL_EC_KEY_new_by_curve_name(int nid);
  186. WOLFSSL_API const char* wolfSSL_EC_curve_nid2nist(int nid);
  187. WOLFSSL_API int wolfSSL_EC_curve_nist2nid(const char* name);
  188. WOLFSSL_API
  189. WOLFSSL_EC_KEY *wolfSSL_EC_KEY_new_ex(void* heap, int devId);
  190. WOLFSSL_API
  191. WOLFSSL_EC_KEY *wolfSSL_EC_KEY_new(void);
  192. WOLFSSL_API
  193. int wolfSSL_EC_KEY_set_group(WOLFSSL_EC_KEY *key, WOLFSSL_EC_GROUP *group);
  194. WOLFSSL_API
  195. int wolfSSL_EC_KEY_generate_key(WOLFSSL_EC_KEY *key);
  196. WOLFSSL_API
  197. void wolfSSL_EC_KEY_set_asn1_flag(WOLFSSL_EC_KEY *key, int asn1_flag);
  198. WOLFSSL_API
  199. int wolfSSL_EC_KEY_set_public_key(WOLFSSL_EC_KEY *key,
  200. const WOLFSSL_EC_POINT *pub);
  201. WOLFSSL_API int wolfSSL_EC_KEY_check_key(const WOLFSSL_EC_KEY *key);
  202. #if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
  203. WOLFSSL_API int wolfSSL_EC_KEY_print_fp(XFILE fp, WOLFSSL_EC_KEY* key,
  204. int indent);
  205. #endif /* !NO_FILESYSTEM && !NO_STDIO_FILESYSTEM */
  206. WOLFSSL_API int wolfSSL_ECDSA_size(const WOLFSSL_EC_KEY *key);
  207. WOLFSSL_API int wolfSSL_ECDSA_sign(int type, const unsigned char *digest,
  208. int digestSz, unsigned char *sig,
  209. unsigned int *sigSz, WOLFSSL_EC_KEY *key);
  210. WOLFSSL_API int wolfSSL_ECDSA_verify(int type, const unsigned char *digest,
  211. int digestSz, const unsigned char *sig,
  212. int sigSz, WOLFSSL_EC_KEY *key);
  213. WOLFSSL_API
  214. void wolfSSL_EC_GROUP_set_asn1_flag(WOLFSSL_EC_GROUP *group, int flag);
  215. WOLFSSL_API
  216. WOLFSSL_EC_GROUP *wolfSSL_EC_GROUP_new_by_curve_name(int nid);
  217. WOLFSSL_API
  218. int wolfSSL_EC_GROUP_cmp(const WOLFSSL_EC_GROUP *a, const WOLFSSL_EC_GROUP *b,
  219. WOLFSSL_BN_CTX *ctx);
  220. WOLFSSL_API
  221. WOLFSSL_EC_GROUP *wolfSSL_EC_GROUP_dup(const WOLFSSL_EC_GROUP *src);
  222. WOLFSSL_API
  223. int wolfSSL_EC_GROUP_get_curve_name(const WOLFSSL_EC_GROUP *group);
  224. WOLFSSL_API
  225. int wolfSSL_EC_GROUP_get_degree(const WOLFSSL_EC_GROUP *group);
  226. WOLFSSL_API
  227. int wolfSSL_EC_GROUP_get_order(const WOLFSSL_EC_GROUP *group,
  228. WOLFSSL_BIGNUM *order, WOLFSSL_BN_CTX *ctx);
  229. WOLFSSL_API
  230. int wolfSSL_EC_GROUP_order_bits(const WOLFSSL_EC_GROUP *group);
  231. WOLFSSL_API
  232. void wolfSSL_EC_GROUP_free(WOLFSSL_EC_GROUP *group);
  233. WOLFSSL_API
  234. const WOLFSSL_EC_METHOD* wolfSSL_EC_GROUP_method_of(
  235. const WOLFSSL_EC_GROUP *group);
  236. WOLFSSL_API
  237. int wolfSSL_EC_METHOD_get_field_type(const WOLFSSL_EC_METHOD *meth);
  238. WOLFSSL_API
  239. WOLFSSL_EC_POINT *wolfSSL_EC_POINT_new(const WOLFSSL_EC_GROUP *group);
  240. WOLFSSL_API
  241. int wolfSSL_EC_POINT_get_affine_coordinates_GFp(const WOLFSSL_EC_GROUP *group,
  242. const WOLFSSL_EC_POINT *p,
  243. WOLFSSL_BIGNUM *x,
  244. WOLFSSL_BIGNUM *y,
  245. WOLFSSL_BN_CTX *ctx);
  246. WOLFSSL_API
  247. int wolfSSL_EC_POINT_set_affine_coordinates_GFp(const WOLFSSL_EC_GROUP *group,
  248. WOLFSSL_EC_POINT *point,
  249. const WOLFSSL_BIGNUM *x,
  250. const WOLFSSL_BIGNUM *y,
  251. WOLFSSL_BN_CTX *ctx);
  252. WOLFSSL_API
  253. int wolfSSL_EC_POINT_add(const WOLFSSL_EC_GROUP *group, WOLFSSL_EC_POINT *r,
  254. const WOLFSSL_EC_POINT *p1,
  255. const WOLFSSL_EC_POINT *p2, WOLFSSL_BN_CTX *ctx);
  256. WOLFSSL_API
  257. int wolfSSL_EC_POINT_mul(const WOLFSSL_EC_GROUP *group, WOLFSSL_EC_POINT *r,
  258. const WOLFSSL_BIGNUM *n,
  259. const WOLFSSL_EC_POINT *q, const WOLFSSL_BIGNUM *m,
  260. WOLFSSL_BN_CTX *ctx);
  261. WOLFSSL_API
  262. int wolfSSL_EC_POINT_invert(const WOLFSSL_EC_GROUP *group, WOLFSSL_EC_POINT *a,
  263. WOLFSSL_BN_CTX *ctx);
  264. WOLFSSL_API
  265. void wolfSSL_EC_POINT_clear_free(WOLFSSL_EC_POINT *point);
  266. WOLFSSL_API
  267. int wolfSSL_EC_POINT_cmp(const WOLFSSL_EC_GROUP *group,
  268. const WOLFSSL_EC_POINT *a, const WOLFSSL_EC_POINT *b,
  269. WOLFSSL_BN_CTX *ctx);
  270. WOLFSSL_API int wolfSSL_EC_POINT_copy(WOLFSSL_EC_POINT *dest,
  271. const WOLFSSL_EC_POINT *src);
  272. WOLFSSL_API
  273. void wolfSSL_EC_POINT_free(WOLFSSL_EC_POINT *point);
  274. WOLFSSL_API
  275. int wolfSSL_EC_POINT_is_at_infinity(const WOLFSSL_EC_GROUP *group,
  276. const WOLFSSL_EC_POINT *a);
  277. #ifndef HAVE_SELFTEST
  278. WOLFSSL_API
  279. char* wolfSSL_EC_POINT_point2hex(const WOLFSSL_EC_GROUP* group,
  280. const WOLFSSL_EC_POINT* point, int form,
  281. WOLFSSL_BN_CTX* ctx);
  282. #endif
  283. #if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
  284. typedef WOLFSSL_EC_KEY EC_KEY;
  285. typedef WOLFSSL_EC_GROUP EC_GROUP;
  286. typedef WOLFSSL_EC_GROUP EC_METHOD;
  287. typedef WOLFSSL_EC_POINT EC_POINT;
  288. typedef WOLFSSL_EC_BUILTIN_CURVE EC_builtin_curve;
  289. #ifndef HAVE_ECC
  290. #define OPENSSL_NO_EC
  291. #endif
  292. #define EC_KEY_new wolfSSL_EC_KEY_new
  293. #define EC_KEY_free wolfSSL_EC_KEY_free
  294. #define EC_KEY_up_ref wolfSSL_EC_KEY_up_ref
  295. #define EC_KEY_dup wolfSSL_EC_KEY_dup
  296. #define EC_KEY_get0_public_key wolfSSL_EC_KEY_get0_public_key
  297. #define EC_KEY_get0_group wolfSSL_EC_KEY_get0_group
  298. #define EC_KEY_set_private_key wolfSSL_EC_KEY_set_private_key
  299. #define EC_KEY_get0_private_key wolfSSL_EC_KEY_get0_private_key
  300. #define EC_KEY_new_by_curve_name wolfSSL_EC_KEY_new_by_curve_name
  301. #define EC_KEY_set_group wolfSSL_EC_KEY_set_group
  302. #define EC_KEY_generate_key wolfSSL_EC_KEY_generate_key
  303. #define EC_KEY_set_asn1_flag wolfSSL_EC_KEY_set_asn1_flag
  304. #define EC_KEY_set_public_key wolfSSL_EC_KEY_set_public_key
  305. #define EC_KEY_check_key wolfSSL_EC_KEY_check_key
  306. #define EC_KEY_print_fp wolfSSL_EC_KEY_print_fp
  307. #define ECDSA_size wolfSSL_ECDSA_size
  308. #define ECDSA_sign wolfSSL_ECDSA_sign
  309. #define ECDSA_verify wolfSSL_ECDSA_verify
  310. #define EC_GROUP_free wolfSSL_EC_GROUP_free
  311. #define EC_GROUP_set_asn1_flag wolfSSL_EC_GROUP_set_asn1_flag
  312. #define EC_GROUP_new_by_curve_name wolfSSL_EC_GROUP_new_by_curve_name
  313. #define EC_GROUP_cmp wolfSSL_EC_GROUP_cmp
  314. #define EC_GROUP_dup wolfSSL_EC_GROUP_dup
  315. #define EC_GROUP_get_curve_name wolfSSL_EC_GROUP_get_curve_name
  316. #define EC_GROUP_get_degree wolfSSL_EC_GROUP_get_degree
  317. #define EC_GROUP_get_order wolfSSL_EC_GROUP_get_order
  318. #define EC_GROUP_order_bits wolfSSL_EC_GROUP_order_bits
  319. #define EC_GROUP_method_of wolfSSL_EC_GROUP_method_of
  320. #ifndef NO_WOLFSSL_STUB
  321. #define EC_GROUP_set_point_conversion_form(...)
  322. #endif
  323. #define EC_METHOD_get_field_type wolfSSL_EC_METHOD_get_field_type
  324. #define EC_POINT_new wolfSSL_EC_POINT_new
  325. #define EC_POINT_free wolfSSL_EC_POINT_free
  326. #define EC_POINT_get_affine_coordinates_GFp \
  327. wolfSSL_EC_POINT_get_affine_coordinates_GFp
  328. #define EC_POINT_get_affine_coordinates \
  329. wolfSSL_EC_POINT_get_affine_coordinates_GFp
  330. #define EC_POINT_set_affine_coordinates_GFp \
  331. wolfSSL_EC_POINT_set_affine_coordinates_GFp
  332. #define EC_POINT_set_affine_coordinates \
  333. wolfSSL_EC_POINT_set_affine_coordinates_GFp
  334. #define EC_POINT_add wolfSSL_EC_POINT_add
  335. #define EC_POINT_mul wolfSSL_EC_POINT_mul
  336. #define EC_POINT_invert wolfSSL_EC_POINT_invert
  337. #define EC_POINT_clear_free wolfSSL_EC_POINT_clear_free
  338. #define EC_POINT_cmp wolfSSL_EC_POINT_cmp
  339. #define EC_POINT_copy wolfSSL_EC_POINT_copy
  340. #define EC_POINT_is_at_infinity wolfSSL_EC_POINT_is_at_infinity
  341. #define EC_get_builtin_curves wolfSSL_EC_get_builtin_curves
  342. #define ECPoint_i2d wolfSSL_ECPoint_i2d
  343. #define ECPoint_d2i wolfSSL_ECPoint_d2i
  344. #define EC_POINT_point2oct wolfSSL_EC_POINT_point2oct
  345. #define EC_POINT_oct2point wolfSSL_EC_POINT_oct2point
  346. #define EC_POINT_point2bn wolfSSL_EC_POINT_point2bn
  347. #define EC_POINT_is_on_curve wolfSSL_EC_POINT_is_on_curve
  348. #define o2i_ECPublicKey wolfSSL_o2i_ECPublicKey
  349. #define i2o_ECPublicKey wolfSSL_i2o_ECPublicKey
  350. #define i2d_EC_PUBKEY wolfSSL_i2o_ECPublicKey
  351. #define d2i_ECPrivateKey wolfSSL_d2i_ECPrivateKey
  352. #define i2d_ECPrivateKey wolfSSL_i2d_ECPrivateKey
  353. #define EC_KEY_set_conv_form wolfSSL_EC_KEY_set_conv_form
  354. #define EC_KEY_get_conv_form wolfSSL_EC_KEY_get_conv_form
  355. #ifndef HAVE_SELFTEST
  356. #define EC_POINT_point2hex wolfSSL_EC_POINT_point2hex
  357. #endif
  358. #define EC_POINT_dump wolfSSL_EC_POINT_dump
  359. #define EC_get_builtin_curves wolfSSL_EC_get_builtin_curves
  360. #define EC_curve_nid2nist wolfSSL_EC_curve_nid2nist
  361. #define EC_curve_nist2nid wolfSSL_EC_curve_nist2nid
  362. #endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
  363. #ifdef __cplusplus
  364. } /* extern "C" */
  365. #endif
  366. #endif /* header */