您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

p_dsa_asn1.c 15 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
  2. * 2006.
  3. */
  4. /* ====================================================================
  5. * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. *
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in
  16. * the documentation and/or other materials provided with the
  17. * distribution.
  18. *
  19. * 3. All advertising materials mentioning features or use of this
  20. * software must display the following acknowledgment:
  21. * "This product includes software developed by the OpenSSL Project
  22. * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
  23. *
  24. * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
  25. * endorse or promote products derived from this software without
  26. * prior written permission. For written permission, please contact
  27. * licensing@OpenSSL.org.
  28. *
  29. * 5. Products derived from this software may not be called "OpenSSL"
  30. * nor may "OpenSSL" appear in their names without prior written
  31. * permission of the OpenSSL Project.
  32. *
  33. * 6. Redistributions of any form whatsoever must retain the following
  34. * acknowledgment:
  35. * "This product includes software developed by the OpenSSL Project
  36. * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
  37. *
  38. * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
  39. * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  40. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  41. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
  42. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  43. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  44. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  45. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  46. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  47. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  48. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  49. * OF THE POSSIBILITY OF SUCH DAMAGE.
  50. * ====================================================================
  51. *
  52. * This product includes cryptographic software written by Eric Young
  53. * (eay@cryptsoft.com). This product includes software written by Tim
  54. * Hudson (tjh@cryptsoft.com). */
  55. #include <openssl/evp.h>
  56. #include <openssl/asn1.h>
  57. #include <openssl/asn1t.h>
  58. #include <openssl/digest.h>
  59. #include <openssl/dsa.h>
  60. #include <openssl/err.h>
  61. #include <openssl/mem.h>
  62. #include <openssl/obj.h>
  63. #include <openssl/x509.h>
  64. #include "../dsa/internal.h"
  65. #include "internal.h"
  66. static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) {
  67. const uint8_t *p, *pm;
  68. int pklen, pmlen;
  69. int ptype;
  70. void *pval;
  71. ASN1_STRING *pstr;
  72. X509_ALGOR *palg;
  73. ASN1_INTEGER *public_key = NULL;
  74. DSA *dsa = NULL;
  75. if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) {
  76. return 0;
  77. }
  78. X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  79. if (ptype == V_ASN1_SEQUENCE) {
  80. pstr = pval;
  81. pm = pstr->data;
  82. pmlen = pstr->length;
  83. dsa = d2i_DSAparams(NULL, &pm, pmlen);
  84. if (dsa == NULL) {
  85. OPENSSL_PUT_ERROR(EVP, dsa_pub_decode, EVP_R_DECODE_ERROR);
  86. goto err;
  87. }
  88. } else if (ptype == V_ASN1_NULL || ptype == V_ASN1_UNDEF) {
  89. dsa = DSA_new();
  90. if (dsa == NULL) {
  91. OPENSSL_PUT_ERROR(EVP, dsa_pub_decode, ERR_R_MALLOC_FAILURE);
  92. goto err;
  93. }
  94. } else {
  95. OPENSSL_PUT_ERROR(EVP, dsa_pub_decode, EVP_R_PARAMETER_ENCODING_ERROR);
  96. goto err;
  97. }
  98. public_key = d2i_ASN1_INTEGER(NULL, &p, pklen);
  99. if (public_key == NULL) {
  100. OPENSSL_PUT_ERROR(EVP, dsa_pub_decode, EVP_R_DECODE_ERROR);
  101. goto err;
  102. }
  103. dsa->pub_key = ASN1_INTEGER_to_BN(public_key, NULL);
  104. if (dsa->pub_key == NULL) {
  105. OPENSSL_PUT_ERROR(EVP, dsa_pub_decode, EVP_R_BN_DECODE_ERROR);
  106. goto err;
  107. }
  108. ASN1_INTEGER_free(public_key);
  109. EVP_PKEY_assign_DSA(pkey, dsa);
  110. return 1;
  111. err:
  112. ASN1_INTEGER_free(public_key);
  113. DSA_free(dsa);
  114. return 0;
  115. }
  116. static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) {
  117. DSA *dsa;
  118. ASN1_STRING *pval = NULL;
  119. uint8_t *penc = NULL;
  120. int penclen;
  121. dsa = pkey->pkey.dsa;
  122. dsa->write_params = 0;
  123. int ptype;
  124. if (dsa->p && dsa->q && dsa->g) {
  125. pval = ASN1_STRING_new();
  126. if (!pval) {
  127. OPENSSL_PUT_ERROR(EVP, dsa_pub_encode, ERR_R_MALLOC_FAILURE);
  128. goto err;
  129. }
  130. pval->length = i2d_DSAparams(dsa, &pval->data);
  131. if (pval->length <= 0) {
  132. OPENSSL_PUT_ERROR(EVP, dsa_pub_encode, ERR_R_MALLOC_FAILURE);
  133. goto err;
  134. }
  135. ptype = V_ASN1_SEQUENCE;
  136. } else {
  137. ptype = V_ASN1_UNDEF;
  138. }
  139. penclen = i2d_DSAPublicKey(dsa, &penc);
  140. if (penclen <= 0) {
  141. OPENSSL_PUT_ERROR(EVP, dsa_pub_encode, ERR_R_MALLOC_FAILURE);
  142. goto err;
  143. }
  144. if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(EVP_PKEY_DSA), ptype, pval,
  145. penc, penclen)) {
  146. return 1;
  147. }
  148. err:
  149. OPENSSL_free(penc);
  150. ASN1_STRING_free(pval);
  151. return 0;
  152. }
  153. static int dsa_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8) {
  154. const uint8_t *p, *pm;
  155. int pklen, pmlen;
  156. int ptype;
  157. void *pval;
  158. ASN1_STRING *pstr;
  159. X509_ALGOR *palg;
  160. ASN1_INTEGER *privkey = NULL;
  161. BN_CTX *ctx = NULL;
  162. /* In PKCS#8 DSA: you just get a private key integer and parameters in the
  163. * AlgorithmIdentifier the pubkey must be recalculated. */
  164. STACK_OF(ASN1_TYPE) *ndsa = NULL;
  165. DSA *dsa = NULL;
  166. if (!PKCS8_pkey_get0(NULL, &p, &pklen, &palg, p8)) {
  167. return 0;
  168. }
  169. X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  170. /* Check for broken DSA PKCS#8, UGH! */
  171. if (*p == (V_ASN1_SEQUENCE | V_ASN1_CONSTRUCTED)) {
  172. ASN1_TYPE *t1, *t2;
  173. ndsa = d2i_ASN1_SEQUENCE_ANY(NULL, &p, pklen);
  174. if (ndsa == NULL) {
  175. goto decerr;
  176. }
  177. if (sk_ASN1_TYPE_num(ndsa) != 2) {
  178. goto decerr;
  179. }
  180. /* Handle Two broken types:
  181. * SEQUENCE {parameters, priv_key}
  182. * SEQUENCE {pub_key, priv_key}. */
  183. t1 = sk_ASN1_TYPE_value(ndsa, 0);
  184. t2 = sk_ASN1_TYPE_value(ndsa, 1);
  185. if (t1->type == V_ASN1_SEQUENCE) {
  186. p8->broken = PKCS8_EMBEDDED_PARAM;
  187. pval = t1->value.ptr;
  188. } else if (ptype == V_ASN1_SEQUENCE) {
  189. p8->broken = PKCS8_NS_DB;
  190. } else {
  191. goto decerr;
  192. }
  193. if (t2->type != V_ASN1_INTEGER) {
  194. goto decerr;
  195. }
  196. privkey = t2->value.integer;
  197. } else {
  198. const uint8_t *q = p;
  199. privkey = d2i_ASN1_INTEGER(NULL, &p, pklen);
  200. if (privkey == NULL) {
  201. goto decerr;
  202. }
  203. if (privkey->type == V_ASN1_NEG_INTEGER) {
  204. p8->broken = PKCS8_NEG_PRIVKEY;
  205. ASN1_INTEGER_free(privkey);
  206. privkey = d2i_ASN1_UINTEGER(NULL, &q, pklen);
  207. if (privkey == NULL) {
  208. goto decerr;
  209. }
  210. }
  211. if (ptype != V_ASN1_SEQUENCE) {
  212. goto decerr;
  213. }
  214. }
  215. pstr = pval;
  216. pm = pstr->data;
  217. pmlen = pstr->length;
  218. dsa = d2i_DSAparams(NULL, &pm, pmlen);
  219. if (dsa == NULL) {
  220. goto decerr;
  221. }
  222. /* We have parameters. Now set private key */
  223. dsa->priv_key = ASN1_INTEGER_to_BN(privkey, NULL);
  224. if (dsa->priv_key == NULL) {
  225. OPENSSL_PUT_ERROR(EVP, dsa_priv_decode, ERR_LIB_BN);
  226. goto dsaerr;
  227. }
  228. /* Calculate public key. */
  229. dsa->pub_key = BN_new();
  230. if (dsa->pub_key == NULL) {
  231. OPENSSL_PUT_ERROR(EVP, dsa_priv_decode, ERR_R_MALLOC_FAILURE);
  232. goto dsaerr;
  233. }
  234. ctx = BN_CTX_new();
  235. if (ctx == NULL) {
  236. OPENSSL_PUT_ERROR(EVP, dsa_priv_decode, ERR_R_MALLOC_FAILURE);
  237. goto dsaerr;
  238. }
  239. if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) {
  240. OPENSSL_PUT_ERROR(EVP, dsa_priv_decode, ERR_LIB_BN);
  241. goto dsaerr;
  242. }
  243. EVP_PKEY_assign_DSA(pkey, dsa);
  244. BN_CTX_free(ctx);
  245. sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
  246. ASN1_INTEGER_free(privkey);
  247. return 1;
  248. decerr:
  249. OPENSSL_PUT_ERROR(EVP, dsa_priv_decode, EVP_R_DECODE_ERROR);
  250. dsaerr:
  251. BN_CTX_free(ctx);
  252. ASN1_INTEGER_free(privkey);
  253. sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
  254. DSA_free(dsa);
  255. return 0;
  256. }
  257. static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) {
  258. ASN1_STRING *params = NULL;
  259. ASN1_INTEGER *prkey = NULL;
  260. uint8_t *dp = NULL;
  261. int dplen;
  262. if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) {
  263. OPENSSL_PUT_ERROR(EVP, dsa_priv_encode, EVP_R_MISSING_PARAMETERS);
  264. goto err;
  265. }
  266. params = ASN1_STRING_new();
  267. if (!params) {
  268. OPENSSL_PUT_ERROR(EVP, dsa_priv_encode, ERR_R_MALLOC_FAILURE);
  269. goto err;
  270. }
  271. params->length = i2d_DSAparams(pkey->pkey.dsa, &params->data);
  272. if (params->length <= 0) {
  273. OPENSSL_PUT_ERROR(EVP, dsa_priv_encode, ERR_R_MALLOC_FAILURE);
  274. goto err;
  275. }
  276. params->type = V_ASN1_SEQUENCE;
  277. /* Get private key into integer. */
  278. prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL);
  279. if (!prkey) {
  280. OPENSSL_PUT_ERROR(EVP, dsa_priv_encode, ERR_LIB_BN);
  281. goto err;
  282. }
  283. dplen = i2d_ASN1_INTEGER(prkey, &dp);
  284. ASN1_INTEGER_free(prkey);
  285. if (!PKCS8_pkey_set0(p8, (ASN1_OBJECT *)OBJ_nid2obj(NID_dsa), 0,
  286. V_ASN1_SEQUENCE, params, dp, dplen)) {
  287. goto err;
  288. }
  289. return 1;
  290. err:
  291. OPENSSL_free(dp);
  292. ASN1_STRING_free(params);
  293. ASN1_INTEGER_free(prkey);
  294. return 0;
  295. }
  296. static int int_dsa_size(const EVP_PKEY *pkey) {
  297. return DSA_size(pkey->pkey.dsa);
  298. }
  299. static int dsa_bits(const EVP_PKEY *pkey) {
  300. return BN_num_bits(pkey->pkey.dsa->p);
  301. }
  302. static int dsa_missing_parameters(const EVP_PKEY *pkey) {
  303. DSA *dsa;
  304. dsa = pkey->pkey.dsa;
  305. if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL) {
  306. return 1;
  307. }
  308. return 0;
  309. }
  310. static int dup_bn_into(BIGNUM **out, BIGNUM *src) {
  311. BIGNUM *a;
  312. a = BN_dup(src);
  313. if (a == NULL) {
  314. return 0;
  315. }
  316. BN_free(*out);
  317. *out = a;
  318. return 1;
  319. }
  320. static int dsa_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) {
  321. if (!dup_bn_into(&to->pkey.dsa->p, from->pkey.dsa->p) ||
  322. !dup_bn_into(&to->pkey.dsa->q, from->pkey.dsa->q) ||
  323. !dup_bn_into(&to->pkey.dsa->g, from->pkey.dsa->g)) {
  324. return 0;
  325. }
  326. return 1;
  327. }
  328. static int dsa_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) {
  329. return BN_cmp(a->pkey.dsa->p, b->pkey.dsa->p) == 0 &&
  330. BN_cmp(a->pkey.dsa->q, b->pkey.dsa->q) == 0 &&
  331. BN_cmp(a->pkey.dsa->g, b->pkey.dsa->g) == 0;
  332. }
  333. static int dsa_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b) {
  334. return BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) == 0;
  335. }
  336. static void int_dsa_free(EVP_PKEY *pkey) { DSA_free(pkey->pkey.dsa); }
  337. static void update_buflen(const BIGNUM *b, size_t *pbuflen) {
  338. size_t i;
  339. if (!b) {
  340. return;
  341. }
  342. i = BN_num_bytes(b);
  343. if (*pbuflen < i) {
  344. *pbuflen = i;
  345. }
  346. }
  347. static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype) {
  348. uint8_t *m = NULL;
  349. int ret = 0;
  350. size_t buf_len = 0;
  351. const char *ktype = NULL;
  352. const BIGNUM *priv_key, *pub_key;
  353. priv_key = NULL;
  354. if (ptype == 2) {
  355. priv_key = x->priv_key;
  356. }
  357. pub_key = NULL;
  358. if (ptype > 0) {
  359. pub_key = x->pub_key;
  360. }
  361. ktype = "DSA-Parameters";
  362. if (ptype == 2) {
  363. ktype = "Private-Key";
  364. } else if (ptype == 1) {
  365. ktype = "Public-Key";
  366. }
  367. update_buflen(x->p, &buf_len);
  368. update_buflen(x->q, &buf_len);
  369. update_buflen(x->g, &buf_len);
  370. update_buflen(priv_key, &buf_len);
  371. update_buflen(pub_key, &buf_len);
  372. m = (uint8_t *)OPENSSL_malloc(buf_len + 10);
  373. if (m == NULL) {
  374. OPENSSL_PUT_ERROR(EVP, do_dsa_print, ERR_R_MALLOC_FAILURE);
  375. goto err;
  376. }
  377. if (priv_key) {
  378. if (!BIO_indent(bp, off, 128) ||
  379. BIO_printf(bp, "%s: (%d bit)\n", ktype, BN_num_bits(x->p)) <= 0) {
  380. goto err;
  381. }
  382. }
  383. if (!ASN1_bn_print(bp, "priv:", priv_key, m, off) ||
  384. !ASN1_bn_print(bp, "pub: ", pub_key, m, off) ||
  385. !ASN1_bn_print(bp, "P: ", x->p, m, off) ||
  386. !ASN1_bn_print(bp, "Q: ", x->q, m, off) ||
  387. !ASN1_bn_print(bp, "G: ", x->g, m, off)) {
  388. goto err;
  389. }
  390. ret = 1;
  391. err:
  392. OPENSSL_free(m);
  393. return ret;
  394. }
  395. static int dsa_param_decode(EVP_PKEY *pkey, const uint8_t **pder, int derlen) {
  396. DSA *dsa;
  397. dsa = d2i_DSAparams(NULL, pder, derlen);
  398. if (dsa == NULL) {
  399. OPENSSL_PUT_ERROR(EVP, dsa_param_decode, ERR_R_DSA_LIB);
  400. return 0;
  401. }
  402. EVP_PKEY_assign_DSA(pkey, dsa);
  403. return 1;
  404. }
  405. static int dsa_param_encode(const EVP_PKEY *pkey, uint8_t **pder) {
  406. return i2d_DSAparams(pkey->pkey.dsa, pder);
  407. }
  408. static int dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent,
  409. ASN1_PCTX *ctx) {
  410. return do_dsa_print(bp, pkey->pkey.dsa, indent, 0);
  411. }
  412. static int dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent,
  413. ASN1_PCTX *ctx) {
  414. return do_dsa_print(bp, pkey->pkey.dsa, indent, 1);
  415. }
  416. static int dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent,
  417. ASN1_PCTX *ctx) {
  418. return do_dsa_print(bp, pkey->pkey.dsa, indent, 2);
  419. }
  420. static int old_dsa_priv_decode(EVP_PKEY *pkey, const uint8_t **pder,
  421. int derlen) {
  422. DSA *dsa;
  423. dsa = d2i_DSAPrivateKey(NULL, pder, derlen);
  424. if (dsa == NULL) {
  425. OPENSSL_PUT_ERROR(EVP, old_dsa_priv_decode, ERR_R_DSA_LIB);
  426. return 0;
  427. }
  428. EVP_PKEY_assign_DSA(pkey, dsa);
  429. return 1;
  430. }
  431. static int old_dsa_priv_encode(const EVP_PKEY *pkey, uint8_t **pder) {
  432. return i2d_DSAPrivateKey(pkey->pkey.dsa, pder);
  433. }
  434. static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
  435. const ASN1_STRING *sig, int indent, ASN1_PCTX *pctx) {
  436. DSA_SIG *dsa_sig;
  437. const uint8_t *p;
  438. if (!sig) {
  439. return BIO_puts(bp, "\n") > 0;
  440. }
  441. p = sig->data;
  442. dsa_sig = d2i_DSA_SIG(NULL, &p, sig->length);
  443. if (dsa_sig == NULL) {
  444. return X509_signature_dump(bp, sig, indent);
  445. }
  446. int rv = 0;
  447. size_t buf_len = 0;
  448. uint8_t *m = NULL;
  449. update_buflen(dsa_sig->r, &buf_len);
  450. update_buflen(dsa_sig->s, &buf_len);
  451. m = OPENSSL_malloc(buf_len + 10);
  452. if (m == NULL) {
  453. OPENSSL_PUT_ERROR(EVP, dsa_sig_print, ERR_R_MALLOC_FAILURE);
  454. goto err;
  455. }
  456. if (BIO_write(bp, "\n", 1) != 1 ||
  457. !ASN1_bn_print(bp, "r: ", dsa_sig->r, m, indent) ||
  458. !ASN1_bn_print(bp, "s: ", dsa_sig->s, m, indent)) {
  459. goto err;
  460. }
  461. rv = 1;
  462. err:
  463. OPENSSL_free(m);
  464. DSA_SIG_free(dsa_sig);
  465. return rv;
  466. }
  467. const EVP_PKEY_ASN1_METHOD dsa_asn1_meth = {
  468. EVP_PKEY_DSA,
  469. EVP_PKEY_DSA,
  470. 0,
  471. "DSA",
  472. "OpenSSL DSA method",
  473. dsa_pub_decode,
  474. dsa_pub_encode,
  475. dsa_pub_cmp,
  476. dsa_pub_print,
  477. dsa_priv_decode,
  478. dsa_priv_encode,
  479. dsa_priv_print,
  480. NULL /* pkey_opaque */,
  481. NULL /* pkey_supports_digest */,
  482. int_dsa_size,
  483. dsa_bits,
  484. dsa_param_decode,
  485. dsa_param_encode,
  486. dsa_missing_parameters,
  487. dsa_copy_parameters,
  488. dsa_cmp_parameters,
  489. dsa_param_print,
  490. dsa_sig_print,
  491. int_dsa_free,
  492. old_dsa_priv_decode,
  493. old_dsa_priv_encode,
  494. };