Fix dsa & rsa signature dupctx() so that ctx->propq is strduped
[openssl.git] / providers / implementations / signature / dsa.c
1 /*
2  * Copyright 2019-2020 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 /*
11  * DSA low level APIs are deprecated for public use, but still ok for
12  * internal use.
13  */
14 #include "internal/deprecated.h"
15
16 #include <string.h>
17
18 #include <openssl/crypto.h>
19 #include <openssl/core_dispatch.h>
20 #include <openssl/core_names.h>
21 #include <openssl/err.h>
22 #include <openssl/dsa.h>
23 #include <openssl/params.h>
24 #include <openssl/evp.h>
25 #include <openssl/err.h>
26 #include "internal/nelem.h"
27 #include "internal/sizes.h"
28 #include "internal/cryptlib.h"
29 #include "prov/providercommon.h"
30 #include "prov/implementations.h"
31 #include "prov/providercommonerr.h"
32 #include "prov/provider_ctx.h"
33 #include "prov/securitycheck.h"
34 #include "crypto/dsa.h"
35 #include "prov/der_dsa.h"
36
37 static OSSL_FUNC_signature_newctx_fn dsa_newctx;
38 static OSSL_FUNC_signature_sign_init_fn dsa_sign_init;
39 static OSSL_FUNC_signature_verify_init_fn dsa_verify_init;
40 static OSSL_FUNC_signature_sign_fn dsa_sign;
41 static OSSL_FUNC_signature_verify_fn dsa_verify;
42 static OSSL_FUNC_signature_digest_sign_init_fn dsa_digest_sign_init;
43 static OSSL_FUNC_signature_digest_sign_update_fn dsa_digest_signverify_update;
44 static OSSL_FUNC_signature_digest_sign_final_fn dsa_digest_sign_final;
45 static OSSL_FUNC_signature_digest_verify_init_fn dsa_digest_verify_init;
46 static OSSL_FUNC_signature_digest_verify_update_fn dsa_digest_signverify_update;
47 static OSSL_FUNC_signature_digest_verify_final_fn dsa_digest_verify_final;
48 static OSSL_FUNC_signature_freectx_fn dsa_freectx;
49 static OSSL_FUNC_signature_dupctx_fn dsa_dupctx;
50 static OSSL_FUNC_signature_get_ctx_params_fn dsa_get_ctx_params;
51 static OSSL_FUNC_signature_gettable_ctx_params_fn dsa_gettable_ctx_params;
52 static OSSL_FUNC_signature_set_ctx_params_fn dsa_set_ctx_params;
53 static OSSL_FUNC_signature_settable_ctx_params_fn dsa_settable_ctx_params;
54 static OSSL_FUNC_signature_get_ctx_md_params_fn dsa_get_ctx_md_params;
55 static OSSL_FUNC_signature_gettable_ctx_md_params_fn dsa_gettable_ctx_md_params;
56 static OSSL_FUNC_signature_set_ctx_md_params_fn dsa_set_ctx_md_params;
57 static OSSL_FUNC_signature_settable_ctx_md_params_fn dsa_settable_ctx_md_params;
58
59 /*
60  * What's passed as an actual key is defined by the KEYMGMT interface.
61  * We happen to know that our KEYMGMT simply passes DSA structures, so
62  * we use that here too.
63  */
64
65 typedef struct {
66     OSSL_LIB_CTX *libctx;
67     char *propq;
68     DSA *dsa;
69
70     /*
71      * Flag to determine if the hash function can be changed (1) or not (0)
72      * Because it's dangerous to change during a DigestSign or DigestVerify
73      * operation, this flag is cleared by their Init function, and set again
74      * by their Final function.
75      */
76     unsigned int flag_allow_md : 1;
77
78     char mdname[OSSL_MAX_NAME_SIZE];
79
80     /* The Algorithm Identifier of the combined signature algorithm */
81     unsigned char aid_buf[OSSL_MAX_ALGORITHM_ID_SIZE];
82     unsigned char *aid;
83     size_t  aid_len;
84
85     /* main digest */
86     EVP_MD *md;
87     EVP_MD_CTX *mdctx;
88     int operation;
89 } PROV_DSA_CTX;
90
91
92 static size_t dsa_get_md_size(const PROV_DSA_CTX *pdsactx)
93 {
94     if (pdsactx->md != NULL)
95         return EVP_MD_size(pdsactx->md);
96     return 0;
97 }
98
99 static void *dsa_newctx(void *provctx, const char *propq)
100 {
101     PROV_DSA_CTX *pdsactx;
102
103     if (!ossl_prov_is_running())
104         return NULL;
105
106     pdsactx = OPENSSL_zalloc(sizeof(PROV_DSA_CTX));
107     if (pdsactx == NULL)
108         return NULL;
109
110     pdsactx->libctx = PROV_LIBCTX_OF(provctx);
111     pdsactx->flag_allow_md = 1;
112     if (propq != NULL && (pdsactx->propq = OPENSSL_strdup(propq)) == NULL) {
113         OPENSSL_free(pdsactx);
114         pdsactx = NULL;
115         ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
116     }
117     return pdsactx;
118 }
119
120 static int dsa_setup_md(PROV_DSA_CTX *ctx,
121                         const char *mdname, const char *mdprops)
122 {
123     if (mdprops == NULL)
124         mdprops = ctx->propq;
125
126     if (mdname != NULL) {
127         int sha1_allowed = (ctx->operation != EVP_PKEY_OP_SIGN);
128         WPACKET pkt;
129         EVP_MD *md = EVP_MD_fetch(ctx->libctx, mdname, mdprops);
130         int md_nid = digest_get_approved_nid_with_sha1(md, sha1_allowed);
131         size_t mdname_len = strlen(mdname);
132
133         if (md == NULL || md_nid == NID_undef) {
134             if (md == NULL)
135                 ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
136                                "%s could not be fetched", mdname);
137             if (md_nid == NID_undef)
138                 ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
139                                "digest=%s", mdname);
140             if (mdname_len >= sizeof(ctx->mdname))
141                 ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
142                                "%s exceeds name buffer length", mdname);
143             EVP_MD_free(md);
144             return 0;
145         }
146
147         EVP_MD_CTX_free(ctx->mdctx);
148         EVP_MD_free(ctx->md);
149
150         /*
151          * TODO(3.0) Should we care about DER writing errors?
152          * All it really means is that for some reason, there's no
153          * AlgorithmIdentifier to be had, but the operation itself is
154          * still valid, just as long as it's not used to construct
155          * anything that needs an AlgorithmIdentifier.
156          */
157         ctx->aid_len = 0;
158         if (WPACKET_init_der(&pkt, ctx->aid_buf, sizeof(ctx->aid_buf))
159             && ossl_DER_w_algorithmIdentifier_DSA_with_MD(&pkt, -1, ctx->dsa,
160                                                           md_nid)
161             && WPACKET_finish(&pkt)) {
162             WPACKET_get_total_written(&pkt, &ctx->aid_len);
163             ctx->aid = WPACKET_get_curr(&pkt);
164         }
165         WPACKET_cleanup(&pkt);
166
167         ctx->mdctx = NULL;
168         ctx->md = md;
169         OPENSSL_strlcpy(ctx->mdname, mdname, sizeof(ctx->mdname));
170     }
171     return 1;
172 }
173
174 static int dsa_signverify_init(void *vpdsactx, void *vdsa, int operation)
175 {
176     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
177
178     if (!ossl_prov_is_running()
179             || pdsactx == NULL
180             || vdsa == NULL
181             || !DSA_up_ref(vdsa))
182         return 0;
183     DSA_free(pdsactx->dsa);
184     pdsactx->dsa = vdsa;
185     pdsactx->operation = operation;
186     if (!dsa_check_key(vdsa, operation == EVP_PKEY_OP_SIGN)) {
187         ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
188         return 0;
189     }
190     return 1;
191 }
192
193 static int dsa_sign_init(void *vpdsactx, void *vdsa)
194 {
195     return dsa_signverify_init(vpdsactx, vdsa, EVP_PKEY_OP_SIGN);
196 }
197
198 static int dsa_verify_init(void *vpdsactx, void *vdsa)
199 {
200     return dsa_signverify_init(vpdsactx, vdsa, EVP_PKEY_OP_VERIFY);
201 }
202
203 static int dsa_sign(void *vpdsactx, unsigned char *sig, size_t *siglen,
204                     size_t sigsize, const unsigned char *tbs, size_t tbslen)
205 {
206     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
207     int ret;
208     unsigned int sltmp;
209     size_t dsasize = DSA_size(pdsactx->dsa);
210     size_t mdsize = dsa_get_md_size(pdsactx);
211
212     if (!ossl_prov_is_running())
213         return 0;
214
215     if (sig == NULL) {
216         *siglen = dsasize;
217         return 1;
218     }
219
220     if (sigsize < (size_t)dsasize)
221         return 0;
222
223     if (mdsize != 0 && tbslen != mdsize)
224         return 0;
225
226     ret = dsa_sign_int(0, tbs, tbslen, sig, &sltmp, pdsactx->dsa);
227     if (ret <= 0)
228         return 0;
229
230     *siglen = sltmp;
231     return 1;
232 }
233
234 static int dsa_verify(void *vpdsactx, const unsigned char *sig, size_t siglen,
235                       const unsigned char *tbs, size_t tbslen)
236 {
237     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
238     size_t mdsize = dsa_get_md_size(pdsactx);
239
240     if (!ossl_prov_is_running() || (mdsize != 0 && tbslen != mdsize))
241         return 0;
242
243     return DSA_verify(0, tbs, tbslen, sig, siglen, pdsactx->dsa);
244 }
245
246 static int dsa_digest_signverify_init(void *vpdsactx, const char *mdname,
247                                       void *vdsa, int operation)
248 {
249     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
250
251     if (!ossl_prov_is_running())
252         return 0;
253
254     pdsactx->flag_allow_md = 0;
255     if (!dsa_signverify_init(vpdsactx, vdsa, operation))
256         return 0;
257
258     if (!dsa_setup_md(pdsactx, mdname, NULL))
259         return 0;
260
261     pdsactx->mdctx = EVP_MD_CTX_new();
262     if (pdsactx->mdctx == NULL)
263         goto error;
264
265     if (!EVP_DigestInit_ex(pdsactx->mdctx, pdsactx->md, NULL))
266         goto error;
267
268     return 1;
269
270  error:
271     EVP_MD_CTX_free(pdsactx->mdctx);
272     EVP_MD_free(pdsactx->md);
273     pdsactx->mdctx = NULL;
274     pdsactx->md = NULL;
275     return 0;
276 }
277
278 static int dsa_digest_sign_init(void *vpdsactx, const char *mdname,
279                                       void *vdsa)
280 {
281     return dsa_digest_signverify_init(vpdsactx, mdname, vdsa, EVP_PKEY_OP_SIGN);
282 }
283
284 static int dsa_digest_verify_init(void *vpdsactx, const char *mdname, void *vdsa)
285 {
286     return dsa_digest_signverify_init(vpdsactx, mdname, vdsa, EVP_PKEY_OP_VERIFY);
287 }
288
289 int dsa_digest_signverify_update(void *vpdsactx, const unsigned char *data,
290                                  size_t datalen)
291 {
292     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
293
294     if (pdsactx == NULL || pdsactx->mdctx == NULL)
295         return 0;
296
297     return EVP_DigestUpdate(pdsactx->mdctx, data, datalen);
298 }
299
300 int dsa_digest_sign_final(void *vpdsactx, unsigned char *sig, size_t *siglen,
301                           size_t sigsize)
302 {
303     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
304     unsigned char digest[EVP_MAX_MD_SIZE];
305     unsigned int dlen = 0;
306
307     if (!ossl_prov_is_running() || pdsactx == NULL || pdsactx->mdctx == NULL)
308         return 0;
309
310     /*
311      * If sig is NULL then we're just finding out the sig size. Other fields
312      * are ignored. Defer to dsa_sign.
313      */
314     if (sig != NULL) {
315         /*
316          * TODO(3.0): There is the possibility that some externally provided
317          * digests exceed EVP_MAX_MD_SIZE. We should probably handle that somehow -
318          * but that problem is much larger than just in DSA.
319          */
320         if (!EVP_DigestFinal_ex(pdsactx->mdctx, digest, &dlen))
321             return 0;
322     }
323
324     pdsactx->flag_allow_md = 1;
325
326     return dsa_sign(vpdsactx, sig, siglen, sigsize, digest, (size_t)dlen);
327 }
328
329
330 int dsa_digest_verify_final(void *vpdsactx, const unsigned char *sig,
331                             size_t siglen)
332 {
333     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
334     unsigned char digest[EVP_MAX_MD_SIZE];
335     unsigned int dlen = 0;
336
337     if (!ossl_prov_is_running() || pdsactx == NULL || pdsactx->mdctx == NULL)
338         return 0;
339
340     /*
341      * TODO(3.0): There is the possibility that some externally provided
342      * digests exceed EVP_MAX_MD_SIZE. We should probably handle that somehow -
343      * but that problem is much larger than just in DSA.
344      */
345     if (!EVP_DigestFinal_ex(pdsactx->mdctx, digest, &dlen))
346         return 0;
347
348     pdsactx->flag_allow_md = 1;
349
350     return dsa_verify(vpdsactx, sig, siglen, digest, (size_t)dlen);
351 }
352
353 static void dsa_freectx(void *vpdsactx)
354 {
355     PROV_DSA_CTX *ctx = (PROV_DSA_CTX *)vpdsactx;
356
357     OPENSSL_free(ctx->propq);
358     EVP_MD_CTX_free(ctx->mdctx);
359     EVP_MD_free(ctx->md);
360     ctx->propq = NULL;
361     ctx->mdctx = NULL;
362     ctx->md = NULL;
363     DSA_free(ctx->dsa);
364     OPENSSL_free(ctx);
365 }
366
367 static void *dsa_dupctx(void *vpdsactx)
368 {
369     PROV_DSA_CTX *srcctx = (PROV_DSA_CTX *)vpdsactx;
370     PROV_DSA_CTX *dstctx;
371
372     if (!ossl_prov_is_running())
373         return NULL;
374
375     dstctx = OPENSSL_zalloc(sizeof(*srcctx));
376     if (dstctx == NULL)
377         return NULL;
378
379     *dstctx = *srcctx;
380     dstctx->dsa = NULL;
381     dstctx->md = NULL;
382     dstctx->mdctx = NULL;
383     dstctx->propq = NULL;
384
385     if (srcctx->dsa != NULL && !DSA_up_ref(srcctx->dsa))
386         goto err;
387     dstctx->dsa = srcctx->dsa;
388
389     if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md))
390         goto err;
391     dstctx->md = srcctx->md;
392
393     if (srcctx->mdctx != NULL) {
394         dstctx->mdctx = EVP_MD_CTX_new();
395         if (dstctx->mdctx == NULL
396                 || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx))
397             goto err;
398     }
399     if (srcctx->propq != NULL) {
400         dstctx->propq = OPENSSL_strdup(srcctx->propq);
401         if (dstctx->propq == NULL)
402             goto err;
403     }
404
405     return dstctx;
406  err:
407     dsa_freectx(dstctx);
408     return NULL;
409 }
410
411 static int dsa_get_ctx_params(void *vpdsactx, OSSL_PARAM *params)
412 {
413     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
414     OSSL_PARAM *p;
415
416     if (pdsactx == NULL || params == NULL)
417         return 0;
418
419     p = OSSL_PARAM_locate(params, OSSL_SIGNATURE_PARAM_ALGORITHM_ID);
420     if (p != NULL
421         && !OSSL_PARAM_set_octet_string(p, pdsactx->aid, pdsactx->aid_len))
422         return 0;
423
424     p = OSSL_PARAM_locate(params, OSSL_SIGNATURE_PARAM_DIGEST);
425     if (p != NULL && !OSSL_PARAM_set_utf8_string(p, pdsactx->mdname))
426         return 0;
427
428     return 1;
429 }
430
431 static const OSSL_PARAM known_gettable_ctx_params[] = {
432     OSSL_PARAM_octet_string(OSSL_SIGNATURE_PARAM_ALGORITHM_ID, NULL, 0),
433     OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_DIGEST, NULL, 0),
434     OSSL_PARAM_END
435 };
436
437 static const OSSL_PARAM *dsa_gettable_ctx_params(ossl_unused void *vctx)
438 {
439     return known_gettable_ctx_params;
440 }
441
442 static int dsa_set_ctx_params(void *vpdsactx, const OSSL_PARAM params[])
443 {
444     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
445     const OSSL_PARAM *p;
446
447     if (pdsactx == NULL || params == NULL)
448         return 0;
449
450     p = OSSL_PARAM_locate_const(params, OSSL_SIGNATURE_PARAM_DIGEST);
451     /* Not allowed during certain operations */
452     if (p != NULL && !pdsactx->flag_allow_md)
453         return 0;
454     if (p != NULL) {
455         char mdname[OSSL_MAX_NAME_SIZE] = "", *pmdname = mdname;
456         char mdprops[OSSL_MAX_PROPQUERY_SIZE] = "", *pmdprops = mdprops;
457         const OSSL_PARAM *propsp =
458             OSSL_PARAM_locate_const(params,
459                                     OSSL_SIGNATURE_PARAM_PROPERTIES);
460
461         if (!OSSL_PARAM_get_utf8_string(p, &pmdname, sizeof(mdname)))
462             return 0;
463         if (propsp != NULL
464             && !OSSL_PARAM_get_utf8_string(propsp, &pmdprops, sizeof(mdprops)))
465             return 0;
466         if (!dsa_setup_md(pdsactx, mdname, mdprops))
467             return 0;
468     }
469
470     return 1;
471 }
472
473 static const OSSL_PARAM known_settable_ctx_params[] = {
474     OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_DIGEST, NULL, 0),
475     OSSL_PARAM_utf8_string(OSSL_SIGNATURE_PARAM_PROPERTIES, NULL, 0),
476     OSSL_PARAM_END
477 };
478
479 static const OSSL_PARAM *dsa_settable_ctx_params(ossl_unused void *provctx)
480 {
481     /*
482      * TODO(3.0): Should this function return a different set of settable ctx
483      * params if the ctx is being used for a DigestSign/DigestVerify? In that
484      * case it is not allowed to set the digest size/digest name because the
485      * digest is explicitly set as part of the init.
486      * NOTE: Ideally we would check pdsactx->flag_allow_md, but this is
487      * problematic because there is no nice way of passing the
488      * PROV_DSA_CTX down to this function...
489      * Because we have API's that dont know about their parent..
490      * e.g: EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig).
491      * We could pass NULL for that case (but then how useful is the check?).
492      */
493     return known_settable_ctx_params;
494 }
495
496 static int dsa_get_ctx_md_params(void *vpdsactx, OSSL_PARAM *params)
497 {
498     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
499
500     if (pdsactx->mdctx == NULL)
501         return 0;
502
503     return EVP_MD_CTX_get_params(pdsactx->mdctx, params);
504 }
505
506 static const OSSL_PARAM *dsa_gettable_ctx_md_params(void *vpdsactx)
507 {
508     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
509
510     if (pdsactx->md == NULL)
511         return 0;
512
513     return EVP_MD_gettable_ctx_params(pdsactx->md);
514 }
515
516 static int dsa_set_ctx_md_params(void *vpdsactx, const OSSL_PARAM params[])
517 {
518     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
519
520     if (pdsactx->mdctx == NULL)
521         return 0;
522
523     return EVP_MD_CTX_set_params(pdsactx->mdctx, params);
524 }
525
526 static const OSSL_PARAM *dsa_settable_ctx_md_params(void *vpdsactx)
527 {
528     PROV_DSA_CTX *pdsactx = (PROV_DSA_CTX *)vpdsactx;
529
530     if (pdsactx->md == NULL)
531         return 0;
532
533     return EVP_MD_settable_ctx_params(pdsactx->md);
534 }
535
536 const OSSL_DISPATCH ossl_dsa_signature_functions[] = {
537     { OSSL_FUNC_SIGNATURE_NEWCTX, (void (*)(void))dsa_newctx },
538     { OSSL_FUNC_SIGNATURE_SIGN_INIT, (void (*)(void))dsa_sign_init },
539     { OSSL_FUNC_SIGNATURE_SIGN, (void (*)(void))dsa_sign },
540     { OSSL_FUNC_SIGNATURE_VERIFY_INIT, (void (*)(void))dsa_verify_init },
541     { OSSL_FUNC_SIGNATURE_VERIFY, (void (*)(void))dsa_verify },
542     { OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT,
543       (void (*)(void))dsa_digest_sign_init },
544     { OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE,
545       (void (*)(void))dsa_digest_signverify_update },
546     { OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL,
547       (void (*)(void))dsa_digest_sign_final },
548     { OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT,
549       (void (*)(void))dsa_digest_verify_init },
550     { OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE,
551       (void (*)(void))dsa_digest_signverify_update },
552     { OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL,
553       (void (*)(void))dsa_digest_verify_final },
554     { OSSL_FUNC_SIGNATURE_FREECTX, (void (*)(void))dsa_freectx },
555     { OSSL_FUNC_SIGNATURE_DUPCTX, (void (*)(void))dsa_dupctx },
556     { OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS, (void (*)(void))dsa_get_ctx_params },
557     { OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS,
558       (void (*)(void))dsa_gettable_ctx_params },
559     { OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS, (void (*)(void))dsa_set_ctx_params },
560     { OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS,
561       (void (*)(void))dsa_settable_ctx_params },
562     { OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS,
563       (void (*)(void))dsa_get_ctx_md_params },
564     { OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS,
565       (void (*)(void))dsa_gettable_ctx_md_params },
566     { OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS,
567       (void (*)(void))dsa_set_ctx_md_params },
568     { OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS,
569       (void (*)(void))dsa_settable_ctx_md_params },
570     { 0, NULL }
571 };