Coverage Report

Created: 2025-12-31 06:58

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl36/providers/implementations/encode_decode/encode_key2any.c
Line
Count
Source
1
/*
2
 * Copyright 2020-2025 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
/* clang-format off */
10
11
/* clang-format on */
12
13
/*
14
 * Low level APIs are deprecated for public use, but still ok for internal use.
15
 */
16
#include "internal/deprecated.h"
17
18
#include <openssl/byteorder.h>
19
#include <openssl/core.h>
20
#include <openssl/core_dispatch.h>
21
#include <openssl/core_names.h>
22
#include <openssl/crypto.h>
23
#include <openssl/params.h>
24
#include <openssl/asn1.h>
25
#include <openssl/err.h>
26
#include <openssl/pem.h>
27
#include <openssl/x509.h>
28
#include <openssl/pkcs12.h> /* PKCS8_encrypt() */
29
#include <openssl/dh.h>
30
#include <openssl/dsa.h>
31
#include <openssl/ec.h>
32
#include <openssl/proverr.h>
33
#include "internal/passphrase.h"
34
#include "internal/cryptlib.h"
35
#include "crypto/ecx.h"
36
#include "crypto/ml_kem.h"
37
#include "crypto/rsa.h"
38
#include "crypto/ml_dsa.h"
39
#include "crypto/slh_dsa.h"
40
#include "prov/implementations.h"
41
#include "prov/bio.h"
42
#include "prov/provider_ctx.h"
43
#include "prov/der_rsa.h"
44
#include "prov/endecoder_local.h"
45
#include "prov/ml_dsa_codecs.h"
46
#include "prov/ml_kem_codecs.h"
47
48
#if defined(OPENSSL_NO_DH) && defined(OPENSSL_NO_DSA) && defined(OPENSSL_NO_EC)
49
#define OPENSSL_NO_KEYPARAMS
50
#endif
51
52
typedef struct key2any_ctx_st {
53
    PROV_CTX *provctx;
54
55
    /* Set to 0 if parameters should not be saved (dsa only) */
56
    int save_parameters;
57
58
    /* Set to 1 if intending to encrypt/decrypt, otherwise 0 */
59
    int cipher_intent;
60
61
    EVP_CIPHER *cipher;
62
63
    struct ossl_passphrase_data_st pwdata;
64
} KEY2ANY_CTX;
65
66
typedef int check_key_type_fn(const void *key, int nid);
67
typedef int key_to_paramstring_fn(const void *key, int nid, int save,
68
    void **str, int *strtype);
69
typedef int key_to_der_fn(BIO *out, const void *key,
70
    int key_nid, const char *pemname,
71
    key_to_paramstring_fn *p2s,
72
    OSSL_i2d_of_void_ctx *k2d, KEY2ANY_CTX *ctx);
73
typedef int write_bio_of_void_fn(BIO *bp, const void *x);
74
75
/* Free the blob allocated during key_to_paramstring_fn */
76
static void free_asn1_data(int type, void *data)
77
1.44k
{
78
1.44k
    switch (type) {
79
1.18k
    case V_ASN1_OBJECT:
80
1.18k
        ASN1_OBJECT_free(data);
81
1.18k
        break;
82
260
    case V_ASN1_SEQUENCE:
83
260
        ASN1_STRING_free(data);
84
260
        break;
85
1.44k
    }
86
1.44k
}
87
88
static PKCS8_PRIV_KEY_INFO *key_to_p8info(const void *key, int key_nid,
89
    void *params, int params_type,
90
    OSSL_i2d_of_void_ctx *k2d,
91
    KEY2ANY_CTX *ctx)
92
1.74k
{
93
    /* der, derlen store the key DER output and its length */
94
1.74k
    unsigned char *der = NULL;
95
1.74k
    int derlen;
96
    /* The final PKCS#8 info */
97
1.74k
    PKCS8_PRIV_KEY_INFO *p8info = NULL;
98
99
1.74k
    if ((p8info = PKCS8_PRIV_KEY_INFO_new()) == NULL
100
1.74k
        || (derlen = k2d(key, &der, (void *)ctx)) <= 0
101
300
        || !PKCS8_pkey_set0(p8info, OBJ_nid2obj(key_nid), 0,
102
1.44k
            params_type, params, der, derlen)) {
103
1.44k
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
104
1.44k
        PKCS8_PRIV_KEY_INFO_free(p8info);
105
1.44k
        OPENSSL_free(der);
106
1.44k
        p8info = NULL;
107
1.44k
    }
108
109
1.74k
    return p8info;
110
1.74k
}
111
112
static X509_SIG *p8info_to_encp8(PKCS8_PRIV_KEY_INFO *p8info,
113
    KEY2ANY_CTX *ctx)
114
0
{
115
0
    X509_SIG *p8 = NULL;
116
0
    char kstr[PEM_BUFSIZE];
117
0
    size_t klen = 0;
118
0
    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
119
120
0
    if (ctx->cipher == NULL)
121
0
        return NULL;
122
123
0
    if (!ossl_pw_get_passphrase(kstr, sizeof(kstr), &klen, NULL, 1,
124
0
            &ctx->pwdata)) {
125
0
        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PASSPHRASE);
126
0
        return NULL;
127
0
    }
128
    /* First argument == -1 means "standard" */
129
0
    p8 = PKCS8_encrypt_ex(-1, ctx->cipher, kstr, (int)klen, NULL, 0, 0, p8info,
130
0
        libctx, NULL);
131
0
    OPENSSL_cleanse(kstr, klen);
132
0
    return p8;
133
0
}
134
135
static X509_SIG *key_to_encp8(const void *key, int key_nid,
136
    void *params, int params_type,
137
    OSSL_i2d_of_void_ctx *k2d,
138
    KEY2ANY_CTX *ctx)
139
0
{
140
0
    PKCS8_PRIV_KEY_INFO *p8info = key_to_p8info(key, key_nid, params, params_type, k2d, ctx);
141
0
    X509_SIG *p8 = NULL;
142
143
0
    if (p8info == NULL) {
144
0
        free_asn1_data(params_type, params);
145
0
    } else {
146
0
        p8 = p8info_to_encp8(p8info, ctx);
147
0
        PKCS8_PRIV_KEY_INFO_free(p8info);
148
0
    }
149
0
    return p8;
150
0
}
151
152
static X509_PUBKEY *key_to_pubkey(const void *key, int key_nid,
153
    void *params, int params_type,
154
    OSSL_i2d_of_void_ctx *k2d,
155
    KEY2ANY_CTX *ctx)
156
0
{
157
    /* der, derlen store the key DER output and its length */
158
0
    unsigned char *der = NULL;
159
0
    int derlen;
160
    /* The final X509_PUBKEY */
161
0
    X509_PUBKEY *xpk = NULL;
162
163
0
    if ((xpk = X509_PUBKEY_new()) == NULL
164
0
        || (derlen = k2d(key, &der, (void *)ctx)) <= 0
165
0
        || !X509_PUBKEY_set0_param(xpk, OBJ_nid2obj(key_nid),
166
0
            params_type, params, der, derlen)) {
167
0
        ERR_raise(ERR_LIB_PROV, ERR_R_X509_LIB);
168
0
        X509_PUBKEY_free(xpk);
169
0
        OPENSSL_free(der);
170
0
        xpk = NULL;
171
0
    }
172
173
0
    return xpk;
174
0
}
175
176
/*
177
 * key_to_epki_* produce encoded output with the private key data in a
178
 * EncryptedPrivateKeyInfo structure (defined by PKCS#8).  They require
179
 * that there's an intent to encrypt, anything else is an error.
180
 *
181
 * key_to_pki_* primarily produce encoded output with the private key data
182
 * in a PrivateKeyInfo structure (also defined by PKCS#8).  However, if
183
 * there is an intent to encrypt the data, the corresponding key_to_epki_*
184
 * function is used instead.
185
 *
186
 * key_to_spki_* produce encoded output with the public key data in an
187
 * X.509 SubjectPublicKeyInfo.
188
 *
189
 * Key parameters don't have any defined envelopment of this kind, but are
190
 * included in some manner in the output from the functions described above,
191
 * either in the AlgorithmIdentifier's parameter field, or as part of the
192
 * key data itself.
193
 */
194
195
static int key_to_epki_der_priv_bio(BIO *out, const void *key,
196
    int key_nid,
197
    ossl_unused const char *pemname,
198
    key_to_paramstring_fn *p2s,
199
    OSSL_i2d_of_void_ctx *k2d,
200
    KEY2ANY_CTX *ctx)
201
0
{
202
0
    int ret = 0;
203
0
    void *str = NULL;
204
0
    int strtype = V_ASN1_UNDEF;
205
0
    X509_SIG *p8;
206
207
0
    if (!ctx->cipher_intent)
208
0
        return 0;
209
210
0
    if (p2s != NULL && !p2s(key, key_nid, ctx->save_parameters, &str, &strtype))
211
0
        return 0;
212
213
0
    p8 = key_to_encp8(key, key_nid, str, strtype, k2d, ctx);
214
0
    if (p8 != NULL)
215
0
        ret = i2d_PKCS8_bio(out, p8);
216
217
0
    X509_SIG_free(p8);
218
219
0
    return ret;
220
0
}
221
222
static int key_to_epki_pem_priv_bio(BIO *out, const void *key,
223
    int key_nid,
224
    ossl_unused const char *pemname,
225
    key_to_paramstring_fn *p2s,
226
    OSSL_i2d_of_void_ctx *k2d,
227
    KEY2ANY_CTX *ctx)
228
0
{
229
0
    int ret = 0;
230
0
    void *str = NULL;
231
0
    int strtype = V_ASN1_UNDEF;
232
0
    X509_SIG *p8;
233
234
0
    if (!ctx->cipher_intent)
235
0
        return 0;
236
237
0
    if (p2s != NULL && !p2s(key, key_nid, ctx->save_parameters, &str, &strtype))
238
0
        return 0;
239
240
0
    p8 = key_to_encp8(key, key_nid, str, strtype, k2d, ctx);
241
0
    if (p8 != NULL)
242
0
        ret = PEM_write_bio_PKCS8(out, p8);
243
244
0
    X509_SIG_free(p8);
245
246
0
    return ret;
247
0
}
248
249
static int key_to_pki_der_priv_bio(BIO *out, const void *key,
250
    int key_nid,
251
    ossl_unused const char *pemname,
252
    key_to_paramstring_fn *p2s,
253
    OSSL_i2d_of_void_ctx *k2d,
254
    KEY2ANY_CTX *ctx)
255
1.74k
{
256
1.74k
    int ret = 0;
257
1.74k
    void *str = NULL;
258
1.74k
    int strtype = V_ASN1_UNDEF;
259
1.74k
    PKCS8_PRIV_KEY_INFO *p8info;
260
261
1.74k
    if (ctx->cipher_intent)
262
0
        return key_to_epki_der_priv_bio(out, key, key_nid, pemname,
263
0
            p2s, k2d, ctx);
264
265
1.74k
    if (p2s != NULL && !p2s(key, key_nid, ctx->save_parameters, &str, &strtype))
266
0
        return 0;
267
268
1.74k
    p8info = key_to_p8info(key, key_nid, str, strtype, k2d, ctx);
269
270
1.74k
    if (p8info != NULL)
271
300
        ret = i2d_PKCS8_PRIV_KEY_INFO_bio(out, p8info);
272
1.44k
    else
273
1.44k
        free_asn1_data(strtype, str);
274
275
1.74k
    PKCS8_PRIV_KEY_INFO_free(p8info);
276
277
1.74k
    return ret;
278
1.74k
}
279
280
static int key_to_pki_pem_priv_bio(BIO *out, const void *key,
281
    int key_nid,
282
    ossl_unused const char *pemname,
283
    key_to_paramstring_fn *p2s,
284
    OSSL_i2d_of_void_ctx *k2d,
285
    KEY2ANY_CTX *ctx)
286
0
{
287
0
    int ret = 0;
288
0
    void *str = NULL;
289
0
    int strtype = V_ASN1_UNDEF;
290
0
    PKCS8_PRIV_KEY_INFO *p8info;
291
292
0
    if (ctx->cipher_intent)
293
0
        return key_to_epki_pem_priv_bio(out, key, key_nid, pemname,
294
0
            p2s, k2d, ctx);
295
296
0
    if (p2s != NULL && !p2s(key, key_nid, ctx->save_parameters, &str, &strtype))
297
0
        return 0;
298
299
0
    p8info = key_to_p8info(key, key_nid, str, strtype, k2d, ctx);
300
301
0
    if (p8info != NULL)
302
0
        ret = PEM_write_bio_PKCS8_PRIV_KEY_INFO(out, p8info);
303
0
    else
304
0
        free_asn1_data(strtype, str);
305
306
0
    PKCS8_PRIV_KEY_INFO_free(p8info);
307
308
0
    return ret;
309
0
}
310
311
static int key_to_spki_der_pub_bio(BIO *out, const void *key,
312
    int key_nid,
313
    ossl_unused const char *pemname,
314
    key_to_paramstring_fn *p2s,
315
    OSSL_i2d_of_void_ctx *k2d,
316
    KEY2ANY_CTX *ctx)
317
0
{
318
0
    int ret = 0;
319
0
    void *str = NULL;
320
0
    int strtype = V_ASN1_UNDEF;
321
0
    X509_PUBKEY *xpk = NULL;
322
323
0
    if (p2s != NULL && !p2s(key, key_nid, ctx->save_parameters, &str, &strtype))
324
0
        return 0;
325
326
0
    xpk = key_to_pubkey(key, key_nid, str, strtype, k2d, ctx);
327
328
0
    if (xpk != NULL)
329
0
        ret = i2d_X509_PUBKEY_bio(out, xpk);
330
331
    /* Also frees |str| */
332
0
    X509_PUBKEY_free(xpk);
333
0
    return ret;
334
0
}
335
336
static int key_to_spki_pem_pub_bio(BIO *out, const void *key,
337
    int key_nid,
338
    ossl_unused const char *pemname,
339
    key_to_paramstring_fn *p2s,
340
    OSSL_i2d_of_void_ctx *k2d,
341
    KEY2ANY_CTX *ctx)
342
0
{
343
0
    int ret = 0;
344
0
    void *str = NULL;
345
0
    int strtype = V_ASN1_UNDEF;
346
0
    X509_PUBKEY *xpk = NULL;
347
348
0
    if (p2s != NULL && !p2s(key, key_nid, ctx->save_parameters, &str, &strtype))
349
0
        return 0;
350
351
0
    xpk = key_to_pubkey(key, key_nid, str, strtype, k2d, ctx);
352
353
0
    if (xpk != NULL)
354
0
        ret = PEM_write_bio_X509_PUBKEY(out, xpk);
355
0
    else
356
0
        free_asn1_data(strtype, str);
357
358
    /* Also frees |str| */
359
0
    X509_PUBKEY_free(xpk);
360
0
    return ret;
361
0
}
362
363
/*
364
 * key_to_type_specific_* produce encoded output with type specific key data,
365
 * no envelopment; the same kind of output as the type specific i2d_ and
366
 * PEM_write_ functions, which is often a simple SEQUENCE of INTEGER.
367
 *
368
 * OpenSSL tries to discourage production of new keys in this form, because
369
 * of the ambiguity when trying to recognise them, but can't deny that PKCS#1
370
 * et al still are live standards.
371
 *
372
 * Note that these functions completely ignore p2s, and rather rely entirely
373
 * on k2d to do the complete work.
374
 */
375
static int key_to_type_specific_der_bio(BIO *out, const void *key,
376
    int key_nid,
377
    ossl_unused const char *pemname,
378
    key_to_paramstring_fn *p2s,
379
    OSSL_i2d_of_void_ctx *k2d,
380
    KEY2ANY_CTX *ctx)
381
9.29k
{
382
9.29k
    unsigned char *der = NULL;
383
9.29k
    int derlen;
384
9.29k
    int ret;
385
386
9.29k
    if ((derlen = k2d(key, &der, (void *)ctx)) <= 0) {
387
1.44k
        ERR_raise(ERR_LIB_PROV, ERR_R_PROV_LIB);
388
1.44k
        return 0;
389
1.44k
    }
390
391
7.85k
    ret = BIO_write(out, der, derlen);
392
7.85k
    OPENSSL_free(der);
393
7.85k
    return ret > 0;
394
9.29k
}
395
9.29k
#define key_to_type_specific_der_priv_bio key_to_type_specific_der_bio
396
0
#define key_to_type_specific_der_pub_bio key_to_type_specific_der_bio
397
0
#define key_to_type_specific_der_param_bio key_to_type_specific_der_bio
398
399
static int key_to_type_specific_pem_bio_cb(BIO *out, const void *key,
400
    int key_nid, const char *pemname,
401
    key_to_paramstring_fn *p2s,
402
    OSSL_i2d_of_void_ctx *k2d,
403
    KEY2ANY_CTX *ctx,
404
    pem_password_cb *cb, void *cbarg)
405
0
{
406
0
    return PEM_ASN1_write_bio_ctx(k2d, (void *)ctx, pemname, out, key,
407
0
               ctx->cipher, NULL, 0, cb, cbarg)
408
0
        > 0;
409
0
}
410
411
static int key_to_type_specific_pem_priv_bio(BIO *out, const void *key,
412
    int key_nid, const char *pemname,
413
    key_to_paramstring_fn *p2s,
414
    OSSL_i2d_of_void_ctx *k2d,
415
    KEY2ANY_CTX *ctx)
416
0
{
417
0
    return key_to_type_specific_pem_bio_cb(out, key, key_nid, pemname,
418
0
        p2s, k2d, ctx,
419
0
        ossl_pw_pem_password, &ctx->pwdata);
420
0
}
421
422
static int key_to_type_specific_pem_pub_bio(BIO *out, const void *key,
423
    int key_nid, const char *pemname,
424
    key_to_paramstring_fn *p2s,
425
    OSSL_i2d_of_void_ctx *k2d,
426
    KEY2ANY_CTX *ctx)
427
0
{
428
0
    return key_to_type_specific_pem_bio_cb(out, key, key_nid, pemname,
429
0
        p2s, k2d, ctx, NULL, NULL);
430
0
}
431
432
#ifndef OPENSSL_NO_KEYPARAMS
433
static int key_to_type_specific_pem_param_bio(BIO *out, const void *key,
434
    int key_nid, const char *pemname,
435
    key_to_paramstring_fn *p2s,
436
    OSSL_i2d_of_void_ctx *k2d,
437
    KEY2ANY_CTX *ctx)
438
0
{
439
0
    return key_to_type_specific_pem_bio_cb(out, key, key_nid, pemname,
440
0
        p2s, k2d, ctx, NULL, NULL);
441
0
}
442
#endif
443
444
/* ---------------------------------------------------------------------- */
445
446
#define k2d_NOCTX(n, f)                            \
447
    static int                                     \
448
    n##_k2d(const void *key, unsigned char **pder, \
449
        ossl_unused void *ctx)                     \
450
4.41k
    {                                              \
451
4.41k
        return f(key, pder);                       \
452
4.41k
    }
encode_key2any.c:rsa_prv_k2d
Line
Count
Source
450
255
    {                                              \
451
255
        return f(key, pder);                       \
452
255
    }
Unexecuted instantiation: encode_key2any.c:rsa_pub_k2d
encode_key2any.c:dsa_prv_k2d
Line
Count
Source
450
1.67k
    {                                              \
451
1.67k
        return f(key, pder);                       \
452
1.67k
    }
Unexecuted instantiation: encode_key2any.c:dsa_pub_k2d
Unexecuted instantiation: encode_key2any.c:dsa_param_k2d
encode_key2any.c:ec_prv_k2d
Line
Count
Source
450
2.49k
    {                                              \
451
2.49k
        return f(key, pder);                       \
452
2.49k
    }
Unexecuted instantiation: encode_key2any.c:ec_param_k2d
453
454
/* ---------------------------------------------------------------------- */
455
456
#ifndef OPENSSL_NO_DH
457
static int prepare_dh_params(const void *dh, int nid, int save,
458
    void **pstr, int *pstrtype)
459
105
{
460
105
    ASN1_STRING *params = ASN1_STRING_new();
461
462
105
    if (params == NULL) {
463
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
464
0
        return 0;
465
0
    }
466
467
105
    if (nid == EVP_PKEY_DHX)
468
105
        params->length = i2d_DHxparams(dh, &params->data);
469
0
    else
470
0
        params->length = i2d_DHparams(dh, &params->data);
471
472
105
    if (params->length <= 0) {
473
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
474
0
        ASN1_STRING_free(params);
475
0
        return 0;
476
0
    }
477
105
    params->type = V_ASN1_SEQUENCE;
478
479
105
    *pstr = params;
480
105
    *pstrtype = V_ASN1_SEQUENCE;
481
105
    return 1;
482
105
}
483
484
static int dh_spki_pub_to_der(const void *dh, unsigned char **pder,
485
    ossl_unused void *ctx)
486
0
{
487
0
    const BIGNUM *bn = NULL;
488
0
    ASN1_INTEGER *pub_key = NULL;
489
0
    int ret;
490
491
0
    if ((bn = DH_get0_pub_key(dh)) == NULL) {
492
0
        ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
493
0
        return 0;
494
0
    }
495
0
    if ((pub_key = BN_to_ASN1_INTEGER(bn, NULL)) == NULL) {
496
0
        ERR_raise(ERR_LIB_PROV, PROV_R_BN_ERROR);
497
0
        return 0;
498
0
    }
499
500
0
    ret = i2d_ASN1_INTEGER(pub_key, pder);
501
502
0
    ASN1_STRING_clear_free(pub_key);
503
0
    return ret;
504
0
}
505
506
static int dh_pki_priv_to_der(const void *dh, unsigned char **pder,
507
    ossl_unused void *ctx)
508
105
{
509
105
    const BIGNUM *bn = NULL;
510
105
    ASN1_INTEGER *priv_key = NULL;
511
105
    int ret;
512
513
105
    if ((bn = DH_get0_priv_key(dh)) == NULL) {
514
0
        ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PRIVATE_KEY);
515
0
        return 0;
516
0
    }
517
105
    if ((priv_key = BN_to_ASN1_INTEGER(bn, NULL)) == NULL) {
518
0
        ERR_raise(ERR_LIB_PROV, PROV_R_BN_ERROR);
519
0
        return 0;
520
0
    }
521
522
105
    ret = i2d_ASN1_INTEGER(priv_key, pder);
523
524
105
    ASN1_STRING_clear_free(priv_key);
525
105
    return ret;
526
105
}
527
528
0
#define dh_epki_priv_to_der dh_pki_priv_to_der
529
530
static int
531
dh_type_specific_params_to_der(const void *dh, unsigned char **pder,
532
    ossl_unused void *ctx)
533
0
{
534
0
    if (DH_test_flags(dh, DH_FLAG_TYPE_DHX))
535
0
        return i2d_DHxparams(dh, pder);
536
0
    return i2d_DHparams(dh, pder);
537
0
}
538
539
/*
540
 * DH doesn't have i2d_DHPrivateKey or i2d_DHPublicKey, so we can't make
541
 * corresponding functions here.
542
 */
543
#define dh_type_specific_priv_to_der NULL
544
#define dh_type_specific_pub_to_der NULL
545
546
static int dh_check_key_type(const void *dh, int expected_type)
547
105
{
548
105
    int type = DH_test_flags(dh, DH_FLAG_TYPE_DHX) ? EVP_PKEY_DHX : EVP_PKEY_DH;
549
550
105
    return type == expected_type;
551
105
}
552
553
0
#define dh_evp_type EVP_PKEY_DH
554
105
#define dhx_evp_type EVP_PKEY_DHX
555
0
#define dh_pem_type "DH"
556
105
#define dhx_pem_type "X9.42 DH"
557
#endif
558
559
/* ---------------------------------------------------------------------- */
560
561
#ifndef OPENSSL_NO_DSA
562
static int encode_dsa_params(const void *dsa, int nid,
563
    void **pstr, int *pstrtype)
564
0
{
565
0
    ASN1_STRING *params = ASN1_STRING_new();
566
567
0
    if (params == NULL) {
568
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
569
0
        return 0;
570
0
    }
571
572
0
    params->length = i2d_DSAparams(dsa, &params->data);
573
574
0
    if (params->length <= 0) {
575
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
576
0
        ASN1_STRING_free(params);
577
0
        return 0;
578
0
    }
579
580
0
    *pstrtype = V_ASN1_SEQUENCE;
581
0
    *pstr = params;
582
0
    return 1;
583
0
}
584
585
static int prepare_dsa_params(const void *dsa, int nid, int save,
586
    void **pstr, int *pstrtype)
587
0
{
588
0
    const BIGNUM *p = DSA_get0_p(dsa);
589
0
    const BIGNUM *q = DSA_get0_q(dsa);
590
0
    const BIGNUM *g = DSA_get0_g(dsa);
591
592
0
    if (save && p != NULL && q != NULL && g != NULL)
593
0
        return encode_dsa_params(dsa, nid, pstr, pstrtype);
594
595
0
    *pstr = NULL;
596
0
    *pstrtype = V_ASN1_UNDEF;
597
0
    return 1;
598
0
}
599
600
static int dsa_spki_pub_to_der(const void *dsa, unsigned char **pder,
601
    ossl_unused void *ctx)
602
0
{
603
0
    const BIGNUM *bn = NULL;
604
0
    ASN1_INTEGER *pub_key = NULL;
605
0
    int ret;
606
607
0
    if ((bn = DSA_get0_pub_key(dsa)) == NULL) {
608
0
        ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
609
0
        return 0;
610
0
    }
611
0
    if ((pub_key = BN_to_ASN1_INTEGER(bn, NULL)) == NULL) {
612
0
        ERR_raise(ERR_LIB_PROV, PROV_R_BN_ERROR);
613
0
        return 0;
614
0
    }
615
616
0
    ret = i2d_ASN1_INTEGER(pub_key, pder);
617
618
0
    ASN1_STRING_clear_free(pub_key);
619
0
    return ret;
620
0
}
621
622
static int dsa_pki_priv_to_der(const void *dsa, unsigned char **pder,
623
    ossl_unused void *ctx)
624
0
{
625
0
    const BIGNUM *bn = NULL;
626
0
    ASN1_INTEGER *priv_key = NULL;
627
0
    int ret;
628
629
0
    if ((bn = DSA_get0_priv_key(dsa)) == NULL) {
630
0
        ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PRIVATE_KEY);
631
0
        return 0;
632
0
    }
633
0
    if ((priv_key = BN_to_ASN1_INTEGER(bn, NULL)) == NULL) {
634
0
        ERR_raise(ERR_LIB_PROV, PROV_R_BN_ERROR);
635
0
        return 0;
636
0
    }
637
638
0
    ret = i2d_ASN1_INTEGER(priv_key, pder);
639
640
0
    ASN1_STRING_clear_free(priv_key);
641
0
    return ret;
642
0
}
643
644
k2d_NOCTX(dsa_prv, i2d_DSAPrivateKey)
645
    k2d_NOCTX(dsa_pub, i2d_DSAPublicKey)
646
        k2d_NOCTX(dsa_param, i2d_DSAparams)
647
648
0
#define dsa_epki_priv_to_der dsa_pki_priv_to_der
649
650
3.21k
#define dsa_type_specific_priv_to_der dsa_prv_k2d
651
0
#define dsa_type_specific_pub_to_der dsa_pub_k2d
652
0
#define dsa_type_specific_params_to_der dsa_param_k2d
653
654
3.21k
#define dsa_check_key_type NULL
655
3.21k
#define dsa_evp_type EVP_PKEY_DSA
656
3.21k
#define dsa_pem_type "DSA"
657
#endif
658
659
/* ---------------------------------------------------------------------- */
660
661
#ifndef OPENSSL_NO_EC
662
            static int prepare_ec_explicit_params(const void *eckey,
663
                void **pstr, int *pstrtype)
664
260
{
665
260
    ASN1_STRING *params = ASN1_STRING_new();
666
667
260
    if (params == NULL) {
668
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
669
0
        return 0;
670
0
    }
671
672
260
    params->length = i2d_ECParameters(eckey, &params->data);
673
260
    if (params->length <= 0) {
674
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
675
0
        ASN1_STRING_free(params);
676
0
        return 0;
677
0
    }
678
679
260
    *pstrtype = V_ASN1_SEQUENCE;
680
260
    *pstr = params;
681
260
    return 1;
682
260
}
683
684
/*
685
 * This implements EcpkParameters, where the CHOICE is based on whether there
686
 * is a curve name (curve nid) to be found or not.  See RFC 3279 for details.
687
 */
688
static int prepare_ec_params(const void *eckey, int nid, int save,
689
    void **pstr, int *pstrtype)
690
1.44k
{
691
1.44k
    int curve_nid;
692
1.44k
    const EC_GROUP *group = EC_KEY_get0_group(eckey);
693
1.44k
    ASN1_OBJECT *params = NULL;
694
695
1.44k
    if (group == NULL)
696
0
        return 0;
697
1.44k
    curve_nid = EC_GROUP_get_curve_name(group);
698
1.44k
    if (curve_nid != NID_undef) {
699
1.18k
        params = OBJ_nid2obj(curve_nid);
700
1.18k
        if (params == NULL)
701
0
            return 0;
702
1.18k
    }
703
704
1.44k
    if (curve_nid != NID_undef
705
1.18k
        && (EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE)) {
706
        /* The CHOICE came to namedCurve */
707
1.18k
        if (OBJ_length(params) == 0) {
708
            /* Some curves might not have an associated OID */
709
0
            ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_OID);
710
0
            ASN1_OBJECT_free(params);
711
0
            return 0;
712
0
        }
713
1.18k
        *pstr = params;
714
1.18k
        *pstrtype = V_ASN1_OBJECT;
715
1.18k
        return 1;
716
1.18k
    } else {
717
        /* The CHOICE came to ecParameters */
718
260
        return prepare_ec_explicit_params(eckey, pstr, pstrtype);
719
260
    }
720
1.44k
}
721
722
static int ec_spki_pub_to_der(const void *eckey, unsigned char **pder,
723
    ossl_unused void *ctx)
724
0
{
725
0
    if (EC_KEY_get0_public_key(eckey) == NULL) {
726
0
        ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
727
0
        return 0;
728
0
    }
729
0
    return i2o_ECPublicKey(eckey, pder);
730
0
}
731
732
static int ec_pki_priv_to_der(const void *veckey, unsigned char **pder,
733
    ossl_unused void *ctx)
734
1.44k
{
735
1.44k
    EC_KEY *eckey = (EC_KEY *)veckey;
736
1.44k
    unsigned int old_flags;
737
1.44k
    int ret = 0;
738
739
    /*
740
     * For PKCS8 the curve name appears in the PKCS8_PRIV_KEY_INFO object
741
     * as the pkeyalg->parameter field. (For a named curve this is an OID)
742
     * The pkey field is an octet string that holds the encoded
743
     * ECPrivateKey SEQUENCE with the optional parameters field omitted.
744
     * We omit this by setting the EC_PKEY_NO_PARAMETERS flag.
745
     */
746
1.44k
    old_flags = EC_KEY_get_enc_flags(eckey); /* save old flags */
747
1.44k
    EC_KEY_set_enc_flags(eckey, old_flags | EC_PKEY_NO_PARAMETERS);
748
1.44k
    ret = i2d_ECPrivateKey(eckey, pder);
749
1.44k
    EC_KEY_set_enc_flags(eckey, old_flags); /* restore old flags */
750
1.44k
    return ret; /* return the length of the der encoded data */
751
1.44k
}
752
753
k2d_NOCTX(ec_param, i2d_ECParameters)
754
    k2d_NOCTX(ec_prv, i2d_ECPrivateKey)
755
756
0
#define ec_epki_priv_to_der ec_pki_priv_to_der
757
758
0
#define ec_type_specific_params_to_der ec_param_k2d
759
/* No ec_type_specific_pub_to_der, there simply is no such thing */
760
4.99k
#define ec_type_specific_priv_to_der ec_prv_k2d
761
762
6.43k
#define ec_check_key_type NULL
763
6.43k
#define ec_evp_type EVP_PKEY_EC
764
6.40k
#define ec_pem_type "EC"
765
766
#ifndef OPENSSL_NO_SM2
767
/*
768
 * Albeit SM2 is a slightly different algorithm than ECDSA, the key type
769
 * encoding (in all places where an AlgorithmIdentifier is produced, such
770
 * as PrivateKeyInfo and SubjectPublicKeyInfo) is the same as for ECC keys
771
 * according to the example in GM/T 0015-2012, appendix D.2.
772
 * This leaves the distinction of SM2 keys to the EC group (which is found
773
 * in AlgorithmIdentified.params).
774
 */
775
34
#define sm2_evp_type ec_evp_type
776
34
#define sm2_pem_type "SM2"
777
#endif
778
#endif
779
780
/* ---------------------------------------------------------------------- */
781
782
#ifndef OPENSSL_NO_ECX
783
26
#define prepare_ecx_params NULL
784
785
        static int ecx_spki_pub_to_der(const void *vecxkey, unsigned char **pder,
786
            ossl_unused void *ctx)
787
0
{
788
0
    const ECX_KEY *ecxkey = vecxkey;
789
0
    unsigned char *keyblob;
790
791
0
    if (ecxkey == NULL) {
792
0
        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_NULL_PARAMETER);
793
0
        return 0;
794
0
    }
795
796
0
    keyblob = OPENSSL_memdup(ecxkey->pubkey, ecxkey->keylen);
797
0
    if (keyblob == NULL)
798
0
        return 0;
799
800
0
    *pder = keyblob;
801
0
    return (int)ecxkey->keylen;
802
0
}
803
804
static int ecx_pki_priv_to_der(const void *vecxkey, unsigned char **pder,
805
    ossl_unused void *ctx)
806
26
{
807
26
    const ECX_KEY *ecxkey = vecxkey;
808
26
    ASN1_OCTET_STRING oct;
809
26
    int keybloblen;
810
811
26
    if (ecxkey == NULL || ecxkey->privkey == NULL) {
812
0
        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_NULL_PARAMETER);
813
0
        return 0;
814
0
    }
815
816
26
    oct.data = ecxkey->privkey;
817
26
    oct.length = (int)ecxkey->keylen;
818
26
    oct.flags = 0;
819
820
26
    keybloblen = i2d_ASN1_OCTET_STRING(&oct, pder);
821
26
    if (keybloblen < 0) {
822
0
        ERR_raise(ERR_LIB_PROV, ERR_R_ASN1_LIB);
823
0
        return 0;
824
0
    }
825
826
26
    return keybloblen;
827
26
}
828
829
0
#define ecx_epki_priv_to_der ecx_pki_priv_to_der
830
831
/*
832
 * ED25519, ED448, X25519 and X448 only has PKCS#8 / SubjectPublicKeyInfo
833
 * representation, so we don't define ecx_type_specific_[priv,pub,params]_to_der.
834
 */
835
836
26
#define ecx_check_key_type NULL
837
838
7
#define ed25519_evp_type EVP_PKEY_ED25519
839
4
#define ed448_evp_type EVP_PKEY_ED448
840
9
#define x25519_evp_type EVP_PKEY_X25519
841
6
#define x448_evp_type EVP_PKEY_X448
842
7
#define ed25519_pem_type "ED25519"
843
4
#define ed448_pem_type "ED448"
844
9
#define x25519_pem_type "X25519"
845
6
#define x448_pem_type "X448"
846
#endif
847
848
/* ---------------------------------------------------------------------- */
849
850
#ifndef OPENSSL_NO_ML_DSA
851
static int ml_dsa_spki_pub_to_der(const void *vkey, unsigned char **pder,
852
    ossl_unused void *ctx)
853
0
{
854
0
    return ossl_ml_dsa_i2d_pubkey(vkey, pder);
855
0
}
856
857
static int ml_dsa_pki_priv_to_der(const void *vkey, unsigned char **pder,
858
    void *vctx)
859
115
{
860
115
    KEY2ANY_CTX *ctx = vctx;
861
862
115
    return ossl_ml_dsa_i2d_prvkey(vkey, pder, ctx->provctx);
863
115
}
864
865
0
#define ml_dsa_epki_priv_to_der ml_dsa_pki_priv_to_der
866
115
#define prepare_ml_dsa_params NULL
867
115
#define ml_dsa_check_key_type NULL
868
869
34
#define ml_dsa_44_evp_type EVP_PKEY_ML_DSA_44
870
34
#define ml_dsa_44_pem_type "ML-DSA-44"
871
45
#define ml_dsa_65_evp_type EVP_PKEY_ML_DSA_65
872
45
#define ml_dsa_65_pem_type "ML-DSA-65"
873
36
#define ml_dsa_87_evp_type EVP_PKEY_ML_DSA_87
874
36
#define ml_dsa_87_pem_type "ML-DSA-87"
875
#endif /* OPENSSL_NO_ML_DSA */
876
877
/* ---------------------------------------------------------------------- */
878
879
#ifndef OPENSSL_NO_ML_KEM
880
881
static int ml_kem_spki_pub_to_der(const void *vkey, unsigned char **pder,
882
    ossl_unused void *ctx)
883
0
{
884
0
    return ossl_ml_kem_i2d_pubkey(vkey, pder);
885
0
}
886
887
static int ml_kem_pki_priv_to_der(const void *vkey, unsigned char **pder,
888
    void *vctx)
889
29
{
890
29
    KEY2ANY_CTX *ctx = vctx;
891
892
29
    return ossl_ml_kem_i2d_prvkey(vkey, pder, ctx->provctx);
893
29
}
894
895
0
#define ml_kem_epki_priv_to_der ml_kem_pki_priv_to_der
896
29
#define prepare_ml_kem_params NULL
897
29
#define ml_kem_check_key_type NULL
898
899
4
#define ml_kem_512_evp_type EVP_PKEY_ML_KEM_512
900
4
#define ml_kem_512_pem_type "ML-KEM-512"
901
9
#define ml_kem_768_evp_type EVP_PKEY_ML_KEM_768
902
9
#define ml_kem_768_pem_type "ML-KEM-768"
903
16
#define ml_kem_1024_evp_type EVP_PKEY_ML_KEM_1024
904
16
#define ml_kem_1024_pem_type "ML-KEM-1024"
905
#endif
906
907
/* ---------------------------------------------------------------------- */
908
909
/*
910
 * Helper functions to prepare RSA-PSS params for encoding.  We would
911
 * have simply written the whole AlgorithmIdentifier, but existing libcrypto
912
 * functionality doesn't allow that.
913
 */
914
915
static int prepare_rsa_params(const void *rsa, int nid, int save,
916
    void **pstr, int *pstrtype)
917
8
{
918
8
    const RSA_PSS_PARAMS_30 *pss = ossl_rsa_get0_pss_params_30((RSA *)rsa);
919
920
8
    *pstr = NULL;
921
922
8
    switch (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK)) {
923
0
    case RSA_FLAG_TYPE_RSA:
924
        /* If plain RSA, the parameters shall be NULL */
925
0
        *pstrtype = V_ASN1_NULL;
926
0
        return 1;
927
8
    case RSA_FLAG_TYPE_RSASSAPSS:
928
8
        if (ossl_rsa_pss_params_30_is_unrestricted(pss)) {
929
0
            *pstrtype = V_ASN1_UNDEF;
930
0
            return 1;
931
8
        } else {
932
8
            ASN1_STRING *astr = NULL;
933
8
            WPACKET pkt;
934
8
            unsigned char *str = NULL;
935
8
            size_t str_sz = 0;
936
8
            int i;
937
938
24
            for (i = 0; i < 2; i++) {
939
16
                switch (i) {
940
8
                case 0:
941
8
                    if (!WPACKET_init_null_der(&pkt))
942
0
                        goto err;
943
8
                    break;
944
8
                case 1:
945
8
                    if ((str = OPENSSL_malloc(str_sz)) == NULL
946
8
                        || !WPACKET_init_der(&pkt, str, str_sz)) {
947
0
                        WPACKET_cleanup(&pkt);
948
0
                        goto err;
949
0
                    }
950
8
                    break;
951
16
                }
952
16
                if (!ossl_DER_w_RSASSA_PSS_params(&pkt, -1, pss)
953
16
                    || !WPACKET_finish(&pkt)
954
16
                    || !WPACKET_get_total_written(&pkt, &str_sz)) {
955
0
                    WPACKET_cleanup(&pkt);
956
0
                    goto err;
957
0
                }
958
16
                WPACKET_cleanup(&pkt);
959
960
                /*
961
                 * If no PSS parameters are going to be written, there's no
962
                 * point going for another iteration.
963
                 * This saves us from getting |str| allocated just to have it
964
                 * immediately de-allocated.
965
                 */
966
16
                if (str_sz == 0)
967
0
                    break;
968
16
            }
969
970
8
            if ((astr = ASN1_STRING_new()) == NULL)
971
0
                goto err;
972
8
            *pstrtype = V_ASN1_SEQUENCE;
973
8
            ASN1_STRING_set0(astr, str, (int)str_sz);
974
8
            *pstr = astr;
975
976
8
            return 1;
977
0
        err:
978
0
            OPENSSL_free(str);
979
0
            return 0;
980
8
        }
981
8
    }
982
983
    /* Currently unsupported RSA key type */
984
0
    return 0;
985
8
}
986
987
k2d_NOCTX(rsa_prv, i2d_RSAPrivateKey)
988
    k2d_NOCTX(rsa_pub, i2d_RSAPublicKey)
989
990
/*
991
 * RSA is extremely simple, as PKCS#1 is used for the PKCS#8 |privateKey|
992
 * field as well as the SubjectPublicKeyInfo |subjectPublicKey| field.
993
 */
994
8
#define rsa_pki_priv_to_der rsa_type_specific_priv_to_der
995
0
#define rsa_epki_priv_to_der rsa_type_specific_priv_to_der
996
0
#define rsa_spki_pub_to_der rsa_type_specific_pub_to_der
997
1.09k
#define rsa_type_specific_priv_to_der rsa_prv_k2d
998
0
#define rsa_type_specific_pub_to_der rsa_pub_k2d
999
#define rsa_type_specific_params_to_der NULL
1000
1001
        static int rsa_check_key_type(const void *rsa, int expected_type)
1002
1.09k
{
1003
1.09k
    switch (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK)) {
1004
1.08k
    case RSA_FLAG_TYPE_RSA:
1005
1.08k
        return expected_type == EVP_PKEY_RSA;
1006
8
    case RSA_FLAG_TYPE_RSASSAPSS:
1007
8
        return expected_type == EVP_PKEY_RSA_PSS;
1008
1.09k
    }
1009
1010
    /* Currently unsupported RSA key type */
1011
0
    return EVP_PKEY_NONE;
1012
1.09k
}
1013
1014
1.08k
#define rsa_evp_type EVP_PKEY_RSA
1015
8
#define rsapss_evp_type EVP_PKEY_RSA_PSS
1016
1.08k
#define rsa_pem_type "RSA"
1017
8
#define rsapss_pem_type "RSA-PSS"
1018
1019
/* ---------------------------------------------------------------------- */
1020
1021
#ifndef OPENSSL_NO_SLH_DSA
1022
17
#define prepare_slh_dsa_params NULL
1023
1024
static int slh_dsa_spki_pub_to_der(const void *vkey, unsigned char **pder,
1025
    ossl_unused void *ctx)
1026
0
{
1027
0
    const SLH_DSA_KEY *key = vkey;
1028
0
    uint8_t *key_blob;
1029
0
    size_t key_len;
1030
1031
0
    if (key == NULL) {
1032
0
        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_NULL_PARAMETER);
1033
0
        return 0;
1034
0
    }
1035
0
    key_len = ossl_slh_dsa_key_get_pub_len(key);
1036
0
    key_blob = OPENSSL_memdup(ossl_slh_dsa_key_get_pub(key), key_len);
1037
0
    if (key_blob == NULL)
1038
0
        return 0;
1039
1040
0
    *pder = key_blob;
1041
0
    return (int)key_len;
1042
0
}
1043
1044
static int slh_dsa_pki_priv_to_der(const void *vkey, unsigned char **pder,
1045
    ossl_unused void *ctx)
1046
17
{
1047
17
    const SLH_DSA_KEY *key = vkey;
1048
17
    size_t len;
1049
1050
17
    if (ossl_slh_dsa_key_get_priv(key) == NULL) {
1051
0
        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_NULL_PARAMETER);
1052
0
        return 0;
1053
0
    }
1054
17
    len = ossl_slh_dsa_key_get_priv_len(key);
1055
1056
17
    if (pder != NULL
1057
17
        && ((*pder = OPENSSL_memdup(ossl_slh_dsa_key_get_priv(key), len)) == NULL))
1058
0
        return 0;
1059
1060
17
    return (int)len;
1061
17
}
1062
0
#define slh_dsa_epki_priv_to_der slh_dsa_pki_priv_to_der
1063
1064
/* SLH_DSA only has PKCS#8 / SubjectPublicKeyInfo representations. */
1065
1066
17
#define slh_dsa_check_key_type NULL
1067
1
#define slh_dsa_sha2_128s_evp_type EVP_PKEY_SLH_DSA_SHA2_128S
1068
1
#define slh_dsa_sha2_128f_evp_type EVP_PKEY_SLH_DSA_SHA2_128F
1069
1
#define slh_dsa_sha2_192s_evp_type EVP_PKEY_SLH_DSA_SHA2_192S
1070
1
#define slh_dsa_sha2_192f_evp_type EVP_PKEY_SLH_DSA_SHA2_192F
1071
1
#define slh_dsa_sha2_256s_evp_type EVP_PKEY_SLH_DSA_SHA2_256S
1072
1
#define slh_dsa_sha2_256f_evp_type EVP_PKEY_SLH_DSA_SHA2_256F
1073
1
#define slh_dsa_shake_128s_evp_type EVP_PKEY_SLH_DSA_SHAKE_128S
1074
1
#define slh_dsa_shake_128f_evp_type EVP_PKEY_SLH_DSA_SHAKE_128F
1075
2
#define slh_dsa_shake_192s_evp_type EVP_PKEY_SLH_DSA_SHAKE_192S
1076
2
#define slh_dsa_shake_192f_evp_type EVP_PKEY_SLH_DSA_SHAKE_192F
1077
3
#define slh_dsa_shake_256s_evp_type EVP_PKEY_SLH_DSA_SHAKE_256S
1078
2
#define slh_dsa_shake_256f_evp_type EVP_PKEY_SLH_DSA_SHAKE_256F
1079
#define slh_dsa_sha2_128s_input_type "SLH-DSA-SHA2-128s"
1080
#define slh_dsa_sha2_128f_input_type "SLH-DSA-SHA2-128f"
1081
#define slh_dsa_sha2_192s_input_type "SLH-DSA-SHA2-192s"
1082
#define slh_dsa_sha2_192f_input_type "SLH-DSA-SHA2-192f"
1083
#define slh_dsa_sha2_256s_input_type "SLH-DSA-SHA2-256s"
1084
#define slh_dsa_sha2_256f_input_type "SLH-DSA-SHA2-256f"
1085
#define slh_dsa_shake_128s_input_type "SLH-DSA-SHAKE-128s"
1086
#define slh_dsa_shake_128f_input_type "SLH-DSA-SHAKE-128f"
1087
#define slh_dsa_shake_192s_input_type "SLH-DSA-SHAKE-192s"
1088
#define slh_dsa_shake_192f_input_type "SLH-DSA-SHAKE-192f"
1089
#define slh_dsa_shake_256s_input_type "SLH-DSA-SHAKE-256s"
1090
#define slh_dsa_shake_256f_input_type "SLH-DSA-SHAKE-256f"
1091
1
#define slh_dsa_sha2_128s_pem_type "SLH-DSA-SHA2-128s"
1092
1
#define slh_dsa_sha2_128f_pem_type "SLH-DSA-SHA2-128f"
1093
1
#define slh_dsa_sha2_192s_pem_type "SLH-DSA-SHA2-192s"
1094
1
#define slh_dsa_sha2_192f_pem_type "SLH-DSA-SHA2-192f"
1095
1
#define slh_dsa_sha2_256s_pem_type "SLH-DSA-SHA2-256s"
1096
1
#define slh_dsa_sha2_256f_pem_type "SLH-DSA-SHA2-256f"
1097
1
#define slh_dsa_shake_128s_pem_type "SLH-DSA-SHAKE-128s"
1098
1
#define slh_dsa_shake_128f_pem_type "SLH-DSA-SHAKE-128f"
1099
2
#define slh_dsa_shake_192s_pem_type "SLH-DSA-SHAKE-192s"
1100
2
#define slh_dsa_shake_192f_pem_type "SLH-DSA-SHAKE-192f"
1101
3
#define slh_dsa_shake_256s_pem_type "SLH-DSA-SHAKE-256s"
1102
2
#define slh_dsa_shake_256f_pem_type "SLH-DSA-SHAKE-256f"
1103
#endif /* OPENSSL_NO_SLH_DSA */
1104
1105
/* ---------------------------------------------------------------------- */
1106
1107
static OSSL_FUNC_decoder_newctx_fn key2any_newctx;
1108
static OSSL_FUNC_decoder_freectx_fn key2any_freectx;
1109
1110
static void *key2any_newctx(void *provctx)
1111
566k
{
1112
566k
    KEY2ANY_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
1113
1114
566k
    if (ctx != NULL) {
1115
566k
        ctx->provctx = provctx;
1116
566k
        ctx->save_parameters = 1;
1117
566k
    }
1118
1119
566k
    return ctx;
1120
566k
}
1121
1122
static void key2any_freectx(void *vctx)
1123
566k
{
1124
566k
    KEY2ANY_CTX *ctx = vctx;
1125
1126
566k
    ossl_pw_clear_passphrase_data(&ctx->pwdata);
1127
566k
    EVP_CIPHER_free(ctx->cipher);
1128
566k
    OPENSSL_free(ctx);
1129
566k
}
1130
1131
/* clang-format off */
1132
/* Machine generated by util/perl/OpenSSL/paramnames.pm */
1133
#ifndef key2any_set_ctx_params_list
1134
static const OSSL_PARAM key2any_set_ctx_params_list[] = {
1135
    OSSL_PARAM_utf8_string(OSSL_ENCODER_PARAM_CIPHER, NULL, 0),
1136
    OSSL_PARAM_utf8_string(OSSL_ENCODER_PARAM_PROPERTIES, NULL, 0),
1137
    OSSL_PARAM_int(OSSL_ENCODER_PARAM_SAVE_PARAMETERS, NULL),
1138
    OSSL_PARAM_END
1139
};
1140
#endif
1141
1142
#ifndef key2any_set_ctx_params_st
1143
struct key2any_set_ctx_params_st {
1144
    OSSL_PARAM *cipher;
1145
    OSSL_PARAM *propq;
1146
    OSSL_PARAM *svprm;
1147
};
1148
#endif
1149
1150
#ifndef key2any_set_ctx_params_decoder
1151
static int key2any_set_ctx_params_decoder
1152
    (const OSSL_PARAM *p, struct key2any_set_ctx_params_st *r)
1153
101k
{
1154
101k
    const char *s;
1155
1156
101k
    memset(r, 0, sizeof(*r));
1157
101k
    if (p != NULL)
1158
202k
        for (; (s = p->key) != NULL; p++)
1159
101k
            switch(s[0]) {
1160
0
            default:
1161
0
                break;
1162
0
            case 'c':
1163
0
                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
1164
                    /* OSSL_ENCODER_PARAM_CIPHER */
1165
0
                    if (ossl_unlikely(r->cipher != NULL)) {
1166
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
1167
0
                                       "param %s is repeated", s);
1168
0
                        return 0;
1169
0
                    }
1170
0
                    r->cipher = (OSSL_PARAM *)p;
1171
0
                }
1172
0
                break;
1173
0
            case 'p':
1174
0
                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
1175
                    /* OSSL_ENCODER_PARAM_PROPERTIES */
1176
0
                    if (ossl_unlikely(r->propq != NULL)) {
1177
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
1178
0
                                       "param %s is repeated", s);
1179
0
                        return 0;
1180
0
                    }
1181
0
                    r->propq = (OSSL_PARAM *)p;
1182
0
                }
1183
0
                break;
1184
101k
            case 's':
1185
101k
                if (ossl_likely(strcmp("ave-parameters", s + 1) == 0)) {
1186
                    /* OSSL_ENCODER_PARAM_SAVE_PARAMETERS */
1187
101k
                    if (ossl_unlikely(r->svprm != NULL)) {
1188
0
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
1189
0
                                       "param %s is repeated", s);
1190
0
                        return 0;
1191
0
                    }
1192
101k
                    r->svprm = (OSSL_PARAM *)p;
1193
101k
                }
1194
101k
            }
1195
101k
    return 1;
1196
101k
}
1197
#endif
1198
/* End of machine generated */
1199
/* clang-format on */
1200
1201
static const OSSL_PARAM *key2any_settable_ctx_params(ossl_unused void *provctx)
1202
0
{
1203
0
    return key2any_set_ctx_params_list;
1204
0
}
1205
1206
static int key2any_set_ctx_params(void *vctx, const OSSL_PARAM params[])
1207
101k
{
1208
101k
    KEY2ANY_CTX *ctx = vctx;
1209
101k
    struct key2any_set_ctx_params_st p;
1210
1211
101k
    if (ctx == NULL || !key2any_set_ctx_params_decoder(params, &p))
1212
0
        return 0;
1213
1214
101k
    if (p.cipher != NULL) {
1215
0
        const char *ciphername = NULL;
1216
0
        const char *props = NULL;
1217
0
        OSSL_LIB_CTX *libctx;
1218
1219
0
        if (!OSSL_PARAM_get_utf8_string_ptr(p.cipher, &ciphername))
1220
0
            return 0;
1221
0
        if (p.propq != NULL && !OSSL_PARAM_get_utf8_string_ptr(p.propq, &props))
1222
0
            return 0;
1223
1224
0
        libctx = ossl_prov_ctx_get0_libctx(ctx->provctx);
1225
0
        EVP_CIPHER_free(ctx->cipher);
1226
0
        ctx->cipher = NULL;
1227
0
        ctx->cipher_intent = ciphername != NULL;
1228
0
        if (ciphername != NULL
1229
0
            && ((ctx->cipher = EVP_CIPHER_fetch(libctx, ciphername, props)) == NULL))
1230
0
            return 0;
1231
0
    }
1232
1233
101k
    if (p.svprm != NULL && !OSSL_PARAM_get_int(p.svprm, &ctx->save_parameters))
1234
0
        return 0;
1235
1236
101k
    return 1;
1237
101k
}
1238
1239
static int key2any_check_selection(int selection, int selection_mask)
1240
2.53M
{
1241
    /*
1242
     * The selections are kinda sorta "levels", i.e. each selection given
1243
     * here is assumed to include those following.
1244
     */
1245
2.53M
    int checks[] = {
1246
2.53M
        OSSL_KEYMGMT_SELECT_PRIVATE_KEY,
1247
2.53M
        OSSL_KEYMGMT_SELECT_PUBLIC_KEY,
1248
2.53M
        OSSL_KEYMGMT_SELECT_ALL_PARAMETERS
1249
2.53M
    };
1250
2.53M
    size_t i;
1251
1252
    /* The decoder implementations made here support guessing */
1253
2.53M
    if (selection == 0)
1254
0
        return 1;
1255
1256
4.87M
    for (i = 0; i < OSSL_NELEM(checks); i++) {
1257
4.87M
        int check1 = (selection & checks[i]) != 0;
1258
4.87M
        int check2 = (selection_mask & checks[i]) != 0;
1259
1260
        /*
1261
         * If the caller asked for the currently checked bit(s), return
1262
         * whether the decoder description says it's supported.
1263
         */
1264
4.87M
        if (check1)
1265
2.53M
            return check2;
1266
4.87M
    }
1267
1268
    /* This should be dead code, but just to be safe... */
1269
0
    return 0;
1270
2.53M
}
1271
1272
static int key2any_encode(KEY2ANY_CTX *ctx, OSSL_CORE_BIO *cout,
1273
    const void *key, int type, const char *pemname,
1274
    check_key_type_fn *checker,
1275
    key_to_der_fn *writer,
1276
    OSSL_PASSPHRASE_CALLBACK *pwcb, void *pwcbarg,
1277
    key_to_paramstring_fn *key2paramstring,
1278
    OSSL_i2d_of_void_ctx *key2der)
1279
11.0k
{
1280
11.0k
    int ret = 0;
1281
1282
11.0k
    if (key == NULL) {
1283
0
        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_NULL_PARAMETER);
1284
11.0k
    } else if (writer != NULL
1285
11.0k
        && (checker == NULL || checker(key, type))) {
1286
11.0k
        BIO *out = ossl_bio_new_from_core_bio(ctx->provctx, cout);
1287
1288
11.0k
        if (out != NULL
1289
11.0k
            && (pwcb == NULL
1290
11.0k
                || ossl_pw_set_ossl_passphrase_cb(&ctx->pwdata, pwcb, pwcbarg)))
1291
11.0k
            ret = writer(out, key, type, pemname, key2paramstring, key2der, ctx);
1292
1293
11.0k
        BIO_free(out);
1294
11.0k
    } else {
1295
0
        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
1296
0
    }
1297
11.0k
    return ret;
1298
11.0k
}
1299
1300
1.52M
#define DO_PRIVATE_KEY_selection_mask OSSL_KEYMGMT_SELECT_PRIVATE_KEY
1301
#define DO_PRIVATE_KEY(impl, type, kind, output)               \
1302
11.0k
    if ((selection & DO_PRIVATE_KEY_selection_mask) != 0)      \
1303
11.0k
        return key2any_encode(ctx, cout, key, impl##_evp_type, \
1304
11.0k
            impl##_pem_type " PRIVATE KEY",                    \
1305
11.0k
            type##_check_key_type,                             \
1306
11.0k
            key_to_##kind##_##output##_priv_bio,               \
1307
11.0k
            cb, cbarg, prepare_##type##_params,                \
1308
11.0k
            type##_##kind##_priv_to_der);
1309
1310
867k
#define DO_PUBLIC_KEY_selection_mask OSSL_KEYMGMT_SELECT_PUBLIC_KEY
1311
#define DO_PUBLIC_KEY(impl, type, kind, output)                \
1312
0
    if ((selection & DO_PUBLIC_KEY_selection_mask) != 0)       \
1313
0
        return key2any_encode(ctx, cout, key, impl##_evp_type, \
1314
0
            impl##_pem_type " PUBLIC KEY",                     \
1315
0
            type##_check_key_type,                             \
1316
0
            key_to_##kind##_##output##_pub_bio,                \
1317
0
            cb, cbarg, prepare_##type##_params,                \
1318
0
            type##_##kind##_pub_to_der);
1319
1320
737k
#define DO_PARAMETERS_selection_mask OSSL_KEYMGMT_SELECT_ALL_PARAMETERS
1321
#define DO_PARAMETERS(impl, type, kind, output)                \
1322
0
    if ((selection & DO_PARAMETERS_selection_mask) != 0)       \
1323
0
        return key2any_encode(ctx, cout, key, impl##_evp_type, \
1324
0
            impl##_pem_type " PARAMETERS",                     \
1325
0
            type##_check_key_type,                             \
1326
0
            key_to_##kind##_##output##_param_bio,              \
1327
0
            NULL, NULL, NULL,                                  \
1328
0
            type##_##kind##_params_to_der);
1329
1330
/*-
1331
 * Implement the kinds of output structure that can be produced.  They are
1332
 * referred to by name, and for each name, the following macros are defined
1333
 * (braces not included):
1334
 *
1335
 * DO_{kind}_selection_mask
1336
 *
1337
 *      A mask of selection bits that must not be zero.  This is used as a
1338
 *      selection criterion for each implementation.
1339
 *      This mask must never be zero.
1340
 *
1341
 * DO_{kind}
1342
 *
1343
 *      The performing macro.  It must use the DO_ macros defined above,
1344
 *      always in this order:
1345
 *
1346
 *      - DO_PRIVATE_KEY
1347
 *      - DO_PUBLIC_KEY
1348
 *      - DO_PARAMETERS
1349
 *
1350
 *      Any of those may be omitted, but the relative order must still be
1351
 *      the same.
1352
 */
1353
1354
/*
1355
 * PKCS#8 defines two structures for private keys only:
1356
 * - PrivateKeyInfo             (raw unencrypted form)
1357
 * - EncryptedPrivateKeyInfo    (encrypted wrapping)
1358
 *
1359
 * To allow a certain amount of flexibility, we allow the routines
1360
 * for PrivateKeyInfo to also produce EncryptedPrivateKeyInfo if a
1361
 * passphrase callback has been passed to them.
1362
 */
1363
499k
#define DO_PrivateKeyInfo_selection_mask DO_PRIVATE_KEY_selection_mask
1364
#define DO_PrivateKeyInfo(impl, type, output) \
1365
1.74k
    DO_PRIVATE_KEY(impl, type, pki, output)
1366
1367
499k
#define DO_EncryptedPrivateKeyInfo_selection_mask DO_PRIVATE_KEY_selection_mask
1368
#define DO_EncryptedPrivateKeyInfo(impl, type, output) \
1369
0
    DO_PRIVATE_KEY(impl, type, epki, output)
1370
1371
/* SubjectPublicKeyInfo is a structure for public keys only */
1372
608k
#define DO_SubjectPublicKeyInfo_selection_mask DO_PUBLIC_KEY_selection_mask
1373
#define DO_SubjectPublicKeyInfo(impl, type, output) \
1374
0
    DO_PUBLIC_KEY(impl, type, spki, output)
1375
1376
/*
1377
 * "type-specific" is a uniform name for key type specific output for private
1378
 * and public keys as well as key parameters.  This is used internally in
1379
 * libcrypto so it doesn't have to have special knowledge about select key
1380
 * types, but also when no better name has been found.  If there are more
1381
 * expressive DO_ names above, those are preferred.
1382
 *
1383
 * Three forms exist:
1384
 *
1385
 * - type_specific_keypair              Only supports private and public key
1386
 * - type_specific_params               Only supports parameters
1387
 * - type_specific                      Supports all parts of an EVP_PKEY
1388
 * - type_specific_no_pub               Supports all parts of an EVP_PKEY
1389
 *                                      except public key
1390
 */
1391
484k
#define DO_type_specific_params_selection_mask DO_PARAMETERS_selection_mask
1392
#define DO_type_specific_params(impl, type, output) \
1393
0
    DO_PARAMETERS(impl, type, type_specific, output)
1394
#define DO_type_specific_keypair_selection_mask \
1395
258k
    (DO_PRIVATE_KEY_selection_mask | DO_PUBLIC_KEY_selection_mask)
1396
#define DO_type_specific_keypair(impl, type, output)  \
1397
4.30k
    DO_PRIVATE_KEY(impl, type, type_specific, output) \
1398
4.30k
    DO_PUBLIC_KEY(impl, type, type_specific, output)
1399
#define DO_type_specific_selection_mask      \
1400
70.7k
    (DO_type_specific_keypair_selection_mask \
1401
70.7k
        | DO_type_specific_params_selection_mask)
1402
#define DO_type_specific(impl, type, output)     \
1403
3.21k
    DO_type_specific_keypair(impl, type, output) \
1404
0
        DO_type_specific_params(impl, type, output)
1405
#define DO_type_specific_no_pub_selection_mask \
1406
253k
    (DO_PRIVATE_KEY_selection_mask | DO_PARAMETERS_selection_mask)
1407
#define DO_type_specific_no_pub(impl, type, output)   \
1408
4.99k
    DO_PRIVATE_KEY(impl, type, type_specific, output) \
1409
4.99k
    DO_type_specific_params(impl, type, output)
1410
1411
/*
1412
 * Type specific aliases for the cases where we need to refer to them by
1413
 * type name.
1414
 * This only covers key types that are represented with i2d_{TYPE}PrivateKey,
1415
 * i2d_{TYPE}PublicKey and i2d_{TYPE}params / i2d_{TYPE}Parameters.
1416
 */
1417
125k
#define DO_RSA_selection_mask DO_type_specific_keypair_selection_mask
1418
0
#define DO_RSA(impl, type, output) DO_type_specific_keypair(impl, type, output)
1419
1420
68.0k
#define DO_DH_selection_mask DO_type_specific_params_selection_mask
1421
0
#define DO_DH(impl, type, output) DO_type_specific_params(impl, type, output)
1422
1423
207k
#define DO_DHX_selection_mask DO_type_specific_params_selection_mask
1424
0
#define DO_DHX(impl, type, output) DO_type_specific_params(impl, type, output)
1425
1426
35.3k
#define DO_DSA_selection_mask DO_type_specific_selection_mask
1427
0
#define DO_DSA(impl, type, output) DO_type_specific(impl, type, output)
1428
1429
168k
#define DO_EC_selection_mask DO_type_specific_no_pub_selection_mask
1430
0
#define DO_EC(impl, type, output) DO_type_specific_no_pub(impl, type, output)
1431
1432
0
#define DO_SM2_selection_mask DO_type_specific_no_pub_selection_mask
1433
0
#define DO_SM2(impl, type, output) DO_type_specific_no_pub(impl, type, output)
1434
1435
/* PKCS#1 defines a structure for RSA private and public keys */
1436
63.3k
#define DO_PKCS1_selection_mask DO_RSA_selection_mask
1437
0
#define DO_PKCS1(impl, type, output) DO_RSA(impl, type, output)
1438
1439
/* PKCS#3 defines a structure for DH parameters */
1440
34.0k
#define DO_PKCS3_selection_mask DO_DH_selection_mask
1441
0
#define DO_PKCS3(impl, type, output) DO_DH(impl, type, output)
1442
/* X9.42 defines a structure for DHx parameters */
1443
103k
#define DO_X9_42_selection_mask DO_DHX_selection_mask
1444
0
#define DO_X9_42(impl, type, output) DO_DHX(impl, type, output)
1445
1446
/* X9.62 defines a structure for EC keys and parameters */
1447
84.2k
#define DO_X9_62_selection_mask DO_EC_selection_mask
1448
0
#define DO_X9_62(impl, type, output) DO_EC(impl, type, output)
1449
1450
/*
1451
 * MAKE_ENCODER is the single driver for creating OSSL_DISPATCH tables.
1452
 * It takes the following arguments:
1453
 *
1454
 * impl         This is the key type name that's being implemented.
1455
 * type         This is the type name for the set of functions that implement
1456
 *              the key type.  For example, ed25519, ed448, x25519 and x448
1457
 *              are all implemented with the exact same set of functions.
1458
 * kind         What kind of support to implement.  These translate into
1459
 *              the DO_##kind macros above.
1460
 * output       The output type to implement.  may be der or pem.
1461
 *
1462
 * The resulting OSSL_DISPATCH array gets the following name (expressed in
1463
 * C preprocessor terms) from those arguments:
1464
 *
1465
 * ossl_##impl##_to_##kind##_##output##_encoder_functions
1466
 */
1467
#define MAKE_ENCODER(impl, type, kind, output)                                    \
1468
    static OSSL_FUNC_encoder_import_object_fn                                     \
1469
        impl##_to_##kind##_##output##_import_object;                              \
1470
    static OSSL_FUNC_encoder_free_object_fn                                       \
1471
        impl##_to_##kind##_##output##_free_object;                                \
1472
    static OSSL_FUNC_encoder_encode_fn                                            \
1473
        impl##_to_##kind##_##output##_encode;                                     \
1474
                                                                                  \
1475
    static void *                                                                 \
1476
    impl##_to_##kind##_##output##_import_object(void *vctx, int selection,        \
1477
        const OSSL_PARAM params[])                                                \
1478
0
    {                                                                             \
1479
0
        KEY2ANY_CTX *ctx = vctx;                                                  \
1480
0
                                                                                  \
1481
0
        return ossl_prov_import_key(ossl_##impl##_keymgmt_functions,              \
1482
0
            ctx->provctx, selection, params);                                     \
1483
0
    }                                                                             \
Unexecuted instantiation: encode_key2any.c:rsa_to_type_specific_keypair_der_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_type_specific_params_der_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_type_specific_params_der_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_type_specific_der_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_type_specific_no_pub_der_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_type_specific_no_pub_der_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_type_specific_keypair_pem_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_type_specific_params_pem_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_type_specific_params_pem_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_type_specific_pem_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_type_specific_no_pub_pem_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_type_specific_no_pub_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ed448_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ed448_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ed448_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ed448_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ed448_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ed448_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:x25519_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:x25519_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:x25519_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:x25519_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:x25519_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:x25519_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:x448_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:x448_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:x448_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:x448_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:x448_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:x448_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_RSA_der_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_RSA_pem_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_DH_der_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_DH_pem_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_DHX_der_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_DHX_pem_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_DSA_der_import_object
Unexecuted instantiation: encode_key2any.c:dsa_to_DSA_pem_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_EC_der_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_EC_pem_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SM2_der_import_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SM2_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PKCS1_der_import_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PKCS1_pem_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PKCS1_der_import_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PKCS1_pem_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_PKCS3_der_import_object
Unexecuted instantiation: encode_key2any.c:dh_to_PKCS3_pem_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_X9_42_der_import_object
Unexecuted instantiation: encode_key2any.c:dhx_to_X9_42_pem_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_X9_62_der_import_object
Unexecuted instantiation: encode_key2any.c:ec_to_X9_62_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_SubjectPublicKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_EncryptedPrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_EncryptedPrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_PrivateKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_PrivateKeyInfo_pem_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_SubjectPublicKeyInfo_der_import_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_SubjectPublicKeyInfo_pem_import_object
1484
    static void impl##_to_##kind##_##output##_free_object(void *key)              \
1485
0
    {                                                                             \
1486
0
        ossl_prov_free_key(ossl_##impl##_keymgmt_functions, key);                 \
1487
0
    }                                                                             \
Unexecuted instantiation: encode_key2any.c:rsa_to_type_specific_keypair_der_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_type_specific_params_der_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_type_specific_params_der_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_type_specific_der_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_type_specific_no_pub_der_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_type_specific_no_pub_der_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_type_specific_keypair_pem_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_type_specific_params_pem_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_type_specific_params_pem_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_type_specific_pem_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_type_specific_no_pub_pem_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_type_specific_no_pub_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ed25519_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ed448_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ed448_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ed448_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ed448_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ed448_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ed448_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:x25519_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:x25519_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:x25519_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:x25519_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:x25519_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:x25519_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:x448_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:x448_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:x448_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:x448_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:x448_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:x448_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128s_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_128f_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192s_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_192f_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256s_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_sha2_256f_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128s_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_128f_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192s_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_192f_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256s_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:slh_dsa_shake_256f_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_512_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_768_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_kem_1024_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_RSA_der_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_RSA_pem_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_DH_der_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_DH_pem_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_DHX_der_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_DHX_pem_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_DSA_der_free_object
Unexecuted instantiation: encode_key2any.c:dsa_to_DSA_pem_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_EC_der_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_EC_pem_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SM2_der_free_object
Unexecuted instantiation: encode_key2any.c:sm2_to_SM2_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PKCS1_der_free_object
Unexecuted instantiation: encode_key2any.c:rsa_to_PKCS1_pem_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PKCS1_der_free_object
Unexecuted instantiation: encode_key2any.c:rsapss_to_PKCS1_pem_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_PKCS3_der_free_object
Unexecuted instantiation: encode_key2any.c:dh_to_PKCS3_pem_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_X9_42_der_free_object
Unexecuted instantiation: encode_key2any.c:dhx_to_X9_42_pem_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_X9_62_der_free_object
Unexecuted instantiation: encode_key2any.c:ec_to_X9_62_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_44_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_65_to_SubjectPublicKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_EncryptedPrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_EncryptedPrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_PrivateKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_PrivateKeyInfo_pem_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_SubjectPublicKeyInfo_der_free_object
Unexecuted instantiation: encode_key2any.c:ml_dsa_87_to_SubjectPublicKeyInfo_pem_free_object
1488
    static int impl##_to_##kind##_##output##_does_selection(void *ctx,            \
1489
        int selection)                                                            \
1490
2.53M
    {                                                                             \
1491
2.53M
        return key2any_check_selection(selection,                                 \
1492
2.53M
            DO_##kind##_selection_mask);                                          \
1493
2.53M
    }                                                                             \
encode_key2any.c:rsa_to_type_specific_keypair_der_does_selection
Line
Count
Source
1490
31.2k
    {                                                                             \
1491
31.2k
        return key2any_check_selection(selection,                                 \
1492
31.2k
            DO_##kind##_selection_mask);                                          \
1493
31.2k
    }                                                                             \
encode_key2any.c:dh_to_type_specific_params_der_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dhx_to_type_specific_params_der_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:dsa_to_type_specific_der_does_selection
Line
Count
Source
1490
17.6k
    {                                                                             \
1491
17.6k
        return key2any_check_selection(selection,                                 \
1492
17.6k
            DO_##kind##_selection_mask);                                          \
1493
17.6k
    }                                                                             \
encode_key2any.c:ec_to_type_specific_no_pub_der_does_selection
Line
Count
Source
1490
42.1k
    {                                                                             \
1491
42.1k
        return key2any_check_selection(selection,                                 \
1492
42.1k
            DO_##kind##_selection_mask);                                          \
1493
42.1k
    }                                                                             \
encode_key2any.c:sm2_to_type_specific_no_pub_der_does_selection
Line
Count
Source
1490
288
    {                                                                             \
1491
288
        return key2any_check_selection(selection,                                 \
1492
288
            DO_##kind##_selection_mask);                                          \
1493
288
    }                                                                             \
encode_key2any.c:rsa_to_type_specific_keypair_pem_does_selection
Line
Count
Source
1490
31.2k
    {                                                                             \
1491
31.2k
        return key2any_check_selection(selection,                                 \
1492
31.2k
            DO_##kind##_selection_mask);                                          \
1493
31.2k
    }                                                                             \
encode_key2any.c:dh_to_type_specific_params_pem_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dhx_to_type_specific_params_pem_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:dsa_to_type_specific_pem_does_selection
Line
Count
Source
1490
17.6k
    {                                                                             \
1491
17.6k
        return key2any_check_selection(selection,                                 \
1492
17.6k
            DO_##kind##_selection_mask);                                          \
1493
17.6k
    }                                                                             \
encode_key2any.c:ec_to_type_specific_no_pub_pem_does_selection
Line
Count
Source
1490
42.1k
    {                                                                             \
1491
42.1k
        return key2any_check_selection(selection,                                 \
1492
42.1k
            DO_##kind##_selection_mask);                                          \
1493
42.1k
    }                                                                             \
encode_key2any.c:sm2_to_type_specific_no_pub_pem_does_selection
Line
Count
Source
1490
288
    {                                                                             \
1491
288
        return key2any_check_selection(selection,                                 \
1492
288
            DO_##kind##_selection_mask);                                          \
1493
288
    }                                                                             \
encode_key2any.c:rsa_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
60.8k
    {                                                                             \
1491
60.8k
        return key2any_check_selection(selection,                                 \
1492
60.8k
            DO_##kind##_selection_mask);                                          \
1493
60.8k
    }                                                                             \
encode_key2any.c:rsa_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
60.8k
    {                                                                             \
1491
60.8k
        return key2any_check_selection(selection,                                 \
1492
60.8k
            DO_##kind##_selection_mask);                                          \
1493
60.8k
    }                                                                             \
encode_key2any.c:rsa_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
60.8k
    {                                                                             \
1491
60.8k
        return key2any_check_selection(selection,                                 \
1492
60.8k
            DO_##kind##_selection_mask);                                          \
1493
60.8k
    }                                                                             \
encode_key2any.c:rsa_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
60.8k
    {                                                                             \
1491
60.8k
        return key2any_check_selection(selection,                                 \
1492
60.8k
            DO_##kind##_selection_mask);                                          \
1493
60.8k
    }                                                                             \
encode_key2any.c:rsa_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
49.2k
    {                                                                             \
1491
49.2k
        return key2any_check_selection(selection,                                 \
1492
49.2k
            DO_##kind##_selection_mask);                                          \
1493
49.2k
    }                                                                             \
encode_key2any.c:rsa_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
49.2k
    {                                                                             \
1491
49.2k
        return key2any_check_selection(selection,                                 \
1492
49.2k
            DO_##kind##_selection_mask);                                          \
1493
49.2k
    }                                                                             \
encode_key2any.c:rsapss_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
1.47k
    {                                                                             \
1491
1.47k
        return key2any_check_selection(selection,                                 \
1492
1.47k
            DO_##kind##_selection_mask);                                          \
1493
1.47k
    }                                                                             \
encode_key2any.c:rsapss_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
1.47k
    {                                                                             \
1491
1.47k
        return key2any_check_selection(selection,                                 \
1492
1.47k
            DO_##kind##_selection_mask);                                          \
1493
1.47k
    }                                                                             \
encode_key2any.c:rsapss_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
1.47k
    {                                                                             \
1491
1.47k
        return key2any_check_selection(selection,                                 \
1492
1.47k
            DO_##kind##_selection_mask);                                          \
1493
1.47k
    }                                                                             \
encode_key2any.c:rsapss_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
1.47k
    {                                                                             \
1491
1.47k
        return key2any_check_selection(selection,                                 \
1492
1.47k
            DO_##kind##_selection_mask);                                          \
1493
1.47k
    }                                                                             \
encode_key2any.c:rsapss_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
574
    {                                                                             \
1491
574
        return key2any_check_selection(selection,                                 \
1492
574
            DO_##kind##_selection_mask);                                          \
1493
574
    }                                                                             \
encode_key2any.c:rsapss_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
574
    {                                                                             \
1491
574
        return key2any_check_selection(selection,                                 \
1492
574
            DO_##kind##_selection_mask);                                          \
1493
574
    }                                                                             \
encode_key2any.c:dh_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dh_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dh_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dh_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dh_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
15.4k
    {                                                                             \
1491
15.4k
        return key2any_check_selection(selection,                                 \
1492
15.4k
            DO_##kind##_selection_mask);                                          \
1493
15.4k
    }                                                                             \
encode_key2any.c:dh_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
15.4k
    {                                                                             \
1491
15.4k
        return key2any_check_selection(selection,                                 \
1492
15.4k
            DO_##kind##_selection_mask);                                          \
1493
15.4k
    }                                                                             \
encode_key2any.c:dhx_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
51.0k
    {                                                                             \
1491
51.0k
        return key2any_check_selection(selection,                                 \
1492
51.0k
            DO_##kind##_selection_mask);                                          \
1493
51.0k
    }                                                                             \
encode_key2any.c:dhx_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
51.0k
    {                                                                             \
1491
51.0k
        return key2any_check_selection(selection,                                 \
1492
51.0k
            DO_##kind##_selection_mask);                                          \
1493
51.0k
    }                                                                             \
encode_key2any.c:dhx_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
51.0k
    {                                                                             \
1491
51.0k
        return key2any_check_selection(selection,                                 \
1492
51.0k
            DO_##kind##_selection_mask);                                          \
1493
51.0k
    }                                                                             \
encode_key2any.c:dhx_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
51.0k
    {                                                                             \
1491
51.0k
        return key2any_check_selection(selection,                                 \
1492
51.0k
            DO_##kind##_selection_mask);                                          \
1493
51.0k
    }                                                                             \
encode_key2any.c:dhx_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
51.7k
    {                                                                             \
1491
51.7k
        return key2any_check_selection(selection,                                 \
1492
51.7k
            DO_##kind##_selection_mask);                                          \
1493
51.7k
    }                                                                             \
encode_key2any.c:dhx_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
51.7k
    {                                                                             \
1491
51.7k
        return key2any_check_selection(selection,                                 \
1492
51.7k
            DO_##kind##_selection_mask);                                          \
1493
51.7k
    }                                                                             \
encode_key2any.c:dsa_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
64.5k
    {                                                                             \
1491
64.5k
        return key2any_check_selection(selection,                                 \
1492
64.5k
            DO_##kind##_selection_mask);                                          \
1493
64.5k
    }                                                                             \
encode_key2any.c:dsa_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
64.5k
    {                                                                             \
1491
64.5k
        return key2any_check_selection(selection,                                 \
1492
64.5k
            DO_##kind##_selection_mask);                                          \
1493
64.5k
    }                                                                             \
encode_key2any.c:dsa_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
64.5k
    {                                                                             \
1491
64.5k
        return key2any_check_selection(selection,                                 \
1492
64.5k
            DO_##kind##_selection_mask);                                          \
1493
64.5k
    }                                                                             \
encode_key2any.c:dsa_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
64.5k
    {                                                                             \
1491
64.5k
        return key2any_check_selection(selection,                                 \
1492
64.5k
            DO_##kind##_selection_mask);                                          \
1493
64.5k
    }                                                                             \
encode_key2any.c:dsa_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
112k
    {                                                                             \
1491
112k
        return key2any_check_selection(selection,                                 \
1492
112k
            DO_##kind##_selection_mask);                                          \
1493
112k
    }                                                                             \
encode_key2any.c:dsa_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
112k
    {                                                                             \
1491
112k
        return key2any_check_selection(selection,                                 \
1492
112k
            DO_##kind##_selection_mask);                                          \
1493
112k
    }                                                                             \
encode_key2any.c:ec_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:ec_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:ec_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:ec_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:ec_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
70.6k
    {                                                                             \
1491
70.6k
        return key2any_check_selection(selection,                                 \
1492
70.6k
            DO_##kind##_selection_mask);                                          \
1493
70.6k
    }                                                                             \
encode_key2any.c:ec_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
70.6k
    {                                                                             \
1491
70.6k
        return key2any_check_selection(selection,                                 \
1492
70.6k
            DO_##kind##_selection_mask);                                          \
1493
70.6k
    }                                                                             \
encode_key2any.c:sm2_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
331
    {                                                                             \
1491
331
        return key2any_check_selection(selection,                                 \
1492
331
            DO_##kind##_selection_mask);                                          \
1493
331
    }                                                                             \
encode_key2any.c:sm2_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
331
    {                                                                             \
1491
331
        return key2any_check_selection(selection,                                 \
1492
331
            DO_##kind##_selection_mask);                                          \
1493
331
    }                                                                             \
encode_key2any.c:sm2_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
331
    {                                                                             \
1491
331
        return key2any_check_selection(selection,                                 \
1492
331
            DO_##kind##_selection_mask);                                          \
1493
331
    }                                                                             \
encode_key2any.c:sm2_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
331
    {                                                                             \
1491
331
        return key2any_check_selection(selection,                                 \
1492
331
            DO_##kind##_selection_mask);                                          \
1493
331
    }                                                                             \
encode_key2any.c:sm2_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
363
    {                                                                             \
1491
363
        return key2any_check_selection(selection,                                 \
1492
363
            DO_##kind##_selection_mask);                                          \
1493
363
    }                                                                             \
encode_key2any.c:sm2_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
363
    {                                                                             \
1491
363
        return key2any_check_selection(selection,                                 \
1492
363
            DO_##kind##_selection_mask);                                          \
1493
363
    }                                                                             \
encode_key2any.c:ed25519_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
384
    {                                                                             \
1491
384
        return key2any_check_selection(selection,                                 \
1492
384
            DO_##kind##_selection_mask);                                          \
1493
384
    }                                                                             \
encode_key2any.c:ed25519_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
384
    {                                                                             \
1491
384
        return key2any_check_selection(selection,                                 \
1492
384
            DO_##kind##_selection_mask);                                          \
1493
384
    }                                                                             \
encode_key2any.c:ed25519_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
384
    {                                                                             \
1491
384
        return key2any_check_selection(selection,                                 \
1492
384
            DO_##kind##_selection_mask);                                          \
1493
384
    }                                                                             \
encode_key2any.c:ed25519_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
384
    {                                                                             \
1491
384
        return key2any_check_selection(selection,                                 \
1492
384
            DO_##kind##_selection_mask);                                          \
1493
384
    }                                                                             \
encode_key2any.c:ed25519_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
246
    {                                                                             \
1491
246
        return key2any_check_selection(selection,                                 \
1492
246
            DO_##kind##_selection_mask);                                          \
1493
246
    }                                                                             \
encode_key2any.c:ed25519_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
246
    {                                                                             \
1491
246
        return key2any_check_selection(selection,                                 \
1492
246
            DO_##kind##_selection_mask);                                          \
1493
246
    }                                                                             \
encode_key2any.c:ed448_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
233
    {                                                                             \
1491
233
        return key2any_check_selection(selection,                                 \
1492
233
            DO_##kind##_selection_mask);                                          \
1493
233
    }                                                                             \
encode_key2any.c:ed448_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
233
    {                                                                             \
1491
233
        return key2any_check_selection(selection,                                 \
1492
233
            DO_##kind##_selection_mask);                                          \
1493
233
    }                                                                             \
encode_key2any.c:ed448_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
233
    {                                                                             \
1491
233
        return key2any_check_selection(selection,                                 \
1492
233
            DO_##kind##_selection_mask);                                          \
1493
233
    }                                                                             \
encode_key2any.c:ed448_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
233
    {                                                                             \
1491
233
        return key2any_check_selection(selection,                                 \
1492
233
            DO_##kind##_selection_mask);                                          \
1493
233
    }                                                                             \
encode_key2any.c:ed448_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
167
    {                                                                             \
1491
167
        return key2any_check_selection(selection,                                 \
1492
167
            DO_##kind##_selection_mask);                                          \
1493
167
    }                                                                             \
encode_key2any.c:ed448_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
167
    {                                                                             \
1491
167
        return key2any_check_selection(selection,                                 \
1492
167
            DO_##kind##_selection_mask);                                          \
1493
167
    }                                                                             \
encode_key2any.c:x25519_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
136
    {                                                                             \
1491
136
        return key2any_check_selection(selection,                                 \
1492
136
            DO_##kind##_selection_mask);                                          \
1493
136
    }                                                                             \
encode_key2any.c:x25519_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
136
    {                                                                             \
1491
136
        return key2any_check_selection(selection,                                 \
1492
136
            DO_##kind##_selection_mask);                                          \
1493
136
    }                                                                             \
encode_key2any.c:x25519_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
136
    {                                                                             \
1491
136
        return key2any_check_selection(selection,                                 \
1492
136
            DO_##kind##_selection_mask);                                          \
1493
136
    }                                                                             \
encode_key2any.c:x25519_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
136
    {                                                                             \
1491
136
        return key2any_check_selection(selection,                                 \
1492
136
            DO_##kind##_selection_mask);                                          \
1493
136
    }                                                                             \
encode_key2any.c:x25519_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
131
    {                                                                             \
1491
131
        return key2any_check_selection(selection,                                 \
1492
131
            DO_##kind##_selection_mask);                                          \
1493
131
    }                                                                             \
encode_key2any.c:x25519_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
131
    {                                                                             \
1491
131
        return key2any_check_selection(selection,                                 \
1492
131
            DO_##kind##_selection_mask);                                          \
1493
131
    }                                                                             \
encode_key2any.c:x448_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
126
    {                                                                             \
1491
126
        return key2any_check_selection(selection,                                 \
1492
126
            DO_##kind##_selection_mask);                                          \
1493
126
    }                                                                             \
encode_key2any.c:x448_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
126
    {                                                                             \
1491
126
        return key2any_check_selection(selection,                                 \
1492
126
            DO_##kind##_selection_mask);                                          \
1493
126
    }                                                                             \
encode_key2any.c:x448_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
126
    {                                                                             \
1491
126
        return key2any_check_selection(selection,                                 \
1492
126
            DO_##kind##_selection_mask);                                          \
1493
126
    }                                                                             \
encode_key2any.c:x448_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
126
    {                                                                             \
1491
126
        return key2any_check_selection(selection,                                 \
1492
126
            DO_##kind##_selection_mask);                                          \
1493
126
    }                                                                             \
encode_key2any.c:x448_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
115
    {                                                                             \
1491
115
        return key2any_check_selection(selection,                                 \
1492
115
            DO_##kind##_selection_mask);                                          \
1493
115
    }                                                                             \
encode_key2any.c:x448_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
115
    {                                                                             \
1491
115
        return key2any_check_selection(selection,                                 \
1492
115
            DO_##kind##_selection_mask);                                          \
1493
115
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128s_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128f_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192s_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192f_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256s_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256f_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128s_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128f_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192s_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192f_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256s_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256f_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128s_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128f_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192s_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192f_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256s_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256f_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128s_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128f_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192s_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192f_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256s_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256f_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128s_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128f_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192s_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192f_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256s_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256f_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128s_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128f_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192s_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192f_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256s_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256f_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128s_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128f_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192s_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192f_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256s_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256f_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128s_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128f_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
3
    {                                                                             \
1491
3
        return key2any_check_selection(selection,                                 \
1492
3
            DO_##kind##_selection_mask);                                          \
1493
3
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192s_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192f_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256s_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256f_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
6
    {                                                                             \
1491
6
        return key2any_check_selection(selection,                                 \
1492
6
            DO_##kind##_selection_mask);                                          \
1493
6
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128s_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128f_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192s_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192f_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256s_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256f_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128s_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_128f_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192s_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_192f_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256s_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_sha2_256f_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128s_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128f_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192s_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
18
    {                                                                             \
1491
18
        return key2any_check_selection(selection,                                 \
1492
18
            DO_##kind##_selection_mask);                                          \
1493
18
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192f_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
18
    {                                                                             \
1491
18
        return key2any_check_selection(selection,                                 \
1492
18
            DO_##kind##_selection_mask);                                          \
1493
18
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256s_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
27
    {                                                                             \
1491
27
        return key2any_check_selection(selection,                                 \
1492
27
            DO_##kind##_selection_mask);                                          \
1493
27
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256f_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
18
    {                                                                             \
1491
18
        return key2any_check_selection(selection,                                 \
1492
18
            DO_##kind##_selection_mask);                                          \
1493
18
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128s_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_128f_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
9
    {                                                                             \
1491
9
        return key2any_check_selection(selection,                                 \
1492
9
            DO_##kind##_selection_mask);                                          \
1493
9
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192s_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
18
    {                                                                             \
1491
18
        return key2any_check_selection(selection,                                 \
1492
18
            DO_##kind##_selection_mask);                                          \
1493
18
    }                                                                             \
encode_key2any.c:slh_dsa_shake_192f_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
18
    {                                                                             \
1491
18
        return key2any_check_selection(selection,                                 \
1492
18
            DO_##kind##_selection_mask);                                          \
1493
18
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256s_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
27
    {                                                                             \
1491
27
        return key2any_check_selection(selection,                                 \
1492
27
            DO_##kind##_selection_mask);                                          \
1493
27
    }                                                                             \
encode_key2any.c:slh_dsa_shake_256f_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
18
    {                                                                             \
1491
18
        return key2any_check_selection(selection,                                 \
1492
18
            DO_##kind##_selection_mask);                                          \
1493
18
    }                                                                             \
encode_key2any.c:ml_kem_512_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
480
    {                                                                             \
1491
480
        return key2any_check_selection(selection,                                 \
1492
480
            DO_##kind##_selection_mask);                                          \
1493
480
    }                                                                             \
encode_key2any.c:ml_kem_512_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
480
    {                                                                             \
1491
480
        return key2any_check_selection(selection,                                 \
1492
480
            DO_##kind##_selection_mask);                                          \
1493
480
    }                                                                             \
encode_key2any.c:ml_kem_512_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
480
    {                                                                             \
1491
480
        return key2any_check_selection(selection,                                 \
1492
480
            DO_##kind##_selection_mask);                                          \
1493
480
    }                                                                             \
encode_key2any.c:ml_kem_512_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
480
    {                                                                             \
1491
480
        return key2any_check_selection(selection,                                 \
1492
480
            DO_##kind##_selection_mask);                                          \
1493
480
    }                                                                             \
encode_key2any.c:ml_kem_512_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
489
    {                                                                             \
1491
489
        return key2any_check_selection(selection,                                 \
1492
489
            DO_##kind##_selection_mask);                                          \
1493
489
    }                                                                             \
encode_key2any.c:ml_kem_512_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
489
    {                                                                             \
1491
489
        return key2any_check_selection(selection,                                 \
1492
489
            DO_##kind##_selection_mask);                                          \
1493
489
    }                                                                             \
encode_key2any.c:ml_kem_768_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
323
    {                                                                             \
1491
323
        return key2any_check_selection(selection,                                 \
1492
323
            DO_##kind##_selection_mask);                                          \
1493
323
    }                                                                             \
encode_key2any.c:ml_kem_768_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
323
    {                                                                             \
1491
323
        return key2any_check_selection(selection,                                 \
1492
323
            DO_##kind##_selection_mask);                                          \
1493
323
    }                                                                             \
encode_key2any.c:ml_kem_768_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
323
    {                                                                             \
1491
323
        return key2any_check_selection(selection,                                 \
1492
323
            DO_##kind##_selection_mask);                                          \
1493
323
    }                                                                             \
encode_key2any.c:ml_kem_768_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
323
    {                                                                             \
1491
323
        return key2any_check_selection(selection,                                 \
1492
323
            DO_##kind##_selection_mask);                                          \
1493
323
    }                                                                             \
encode_key2any.c:ml_kem_768_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
317
    {                                                                             \
1491
317
        return key2any_check_selection(selection,                                 \
1492
317
            DO_##kind##_selection_mask);                                          \
1493
317
    }                                                                             \
encode_key2any.c:ml_kem_768_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
317
    {                                                                             \
1491
317
        return key2any_check_selection(selection,                                 \
1492
317
            DO_##kind##_selection_mask);                                          \
1493
317
    }                                                                             \
encode_key2any.c:ml_kem_1024_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
96
    {                                                                             \
1491
96
        return key2any_check_selection(selection,                                 \
1492
96
            DO_##kind##_selection_mask);                                          \
1493
96
    }                                                                             \
encode_key2any.c:ml_kem_1024_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
96
    {                                                                             \
1491
96
        return key2any_check_selection(selection,                                 \
1492
96
            DO_##kind##_selection_mask);                                          \
1493
96
    }                                                                             \
encode_key2any.c:ml_kem_1024_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
96
    {                                                                             \
1491
96
        return key2any_check_selection(selection,                                 \
1492
96
            DO_##kind##_selection_mask);                                          \
1493
96
    }                                                                             \
encode_key2any.c:ml_kem_1024_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
96
    {                                                                             \
1491
96
        return key2any_check_selection(selection,                                 \
1492
96
            DO_##kind##_selection_mask);                                          \
1493
96
    }                                                                             \
encode_key2any.c:ml_kem_1024_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
231
    {                                                                             \
1491
231
        return key2any_check_selection(selection,                                 \
1492
231
            DO_##kind##_selection_mask);                                          \
1493
231
    }                                                                             \
encode_key2any.c:ml_kem_1024_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
231
    {                                                                             \
1491
231
        return key2any_check_selection(selection,                                 \
1492
231
            DO_##kind##_selection_mask);                                          \
1493
231
    }                                                                             \
encode_key2any.c:rsa_to_RSA_der_does_selection
Line
Count
Source
1490
31.2k
    {                                                                             \
1491
31.2k
        return key2any_check_selection(selection,                                 \
1492
31.2k
            DO_##kind##_selection_mask);                                          \
1493
31.2k
    }                                                                             \
encode_key2any.c:rsa_to_RSA_pem_does_selection
Line
Count
Source
1490
31.2k
    {                                                                             \
1491
31.2k
        return key2any_check_selection(selection,                                 \
1492
31.2k
            DO_##kind##_selection_mask);                                          \
1493
31.2k
    }                                                                             \
encode_key2any.c:dh_to_DH_der_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dh_to_DH_pem_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dhx_to_DHX_der_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:dhx_to_DHX_pem_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:dsa_to_DSA_der_does_selection
Line
Count
Source
1490
17.6k
    {                                                                             \
1491
17.6k
        return key2any_check_selection(selection,                                 \
1492
17.6k
            DO_##kind##_selection_mask);                                          \
1493
17.6k
    }                                                                             \
encode_key2any.c:dsa_to_DSA_pem_does_selection
Line
Count
Source
1490
17.6k
    {                                                                             \
1491
17.6k
        return key2any_check_selection(selection,                                 \
1492
17.6k
            DO_##kind##_selection_mask);                                          \
1493
17.6k
    }                                                                             \
encode_key2any.c:ec_to_EC_der_does_selection
Line
Count
Source
1490
42.1k
    {                                                                             \
1491
42.1k
        return key2any_check_selection(selection,                                 \
1492
42.1k
            DO_##kind##_selection_mask);                                          \
1493
42.1k
    }                                                                             \
encode_key2any.c:ec_to_EC_pem_does_selection
Line
Count
Source
1490
42.1k
    {                                                                             \
1491
42.1k
        return key2any_check_selection(selection,                                 \
1492
42.1k
            DO_##kind##_selection_mask);                                          \
1493
42.1k
    }                                                                             \
Unexecuted instantiation: encode_key2any.c:sm2_to_SM2_der_does_selection
Unexecuted instantiation: encode_key2any.c:sm2_to_SM2_pem_does_selection
encode_key2any.c:rsa_to_PKCS1_der_does_selection
Line
Count
Source
1490
31.2k
    {                                                                             \
1491
31.2k
        return key2any_check_selection(selection,                                 \
1492
31.2k
            DO_##kind##_selection_mask);                                          \
1493
31.2k
    }                                                                             \
encode_key2any.c:rsa_to_PKCS1_pem_does_selection
Line
Count
Source
1490
31.2k
    {                                                                             \
1491
31.2k
        return key2any_check_selection(selection,                                 \
1492
31.2k
            DO_##kind##_selection_mask);                                          \
1493
31.2k
    }                                                                             \
encode_key2any.c:rsapss_to_PKCS1_der_does_selection
Line
Count
Source
1490
451
    {                                                                             \
1491
451
        return key2any_check_selection(selection,                                 \
1492
451
            DO_##kind##_selection_mask);                                          \
1493
451
    }                                                                             \
encode_key2any.c:rsapss_to_PKCS1_pem_does_selection
Line
Count
Source
1490
451
    {                                                                             \
1491
451
        return key2any_check_selection(selection,                                 \
1492
451
            DO_##kind##_selection_mask);                                          \
1493
451
    }                                                                             \
encode_key2any.c:dh_to_PKCS3_der_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dh_to_PKCS3_pem_does_selection
Line
Count
Source
1490
17.0k
    {                                                                             \
1491
17.0k
        return key2any_check_selection(selection,                                 \
1492
17.0k
            DO_##kind##_selection_mask);                                          \
1493
17.0k
    }                                                                             \
encode_key2any.c:dhx_to_X9_42_der_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:dhx_to_X9_42_pem_does_selection
Line
Count
Source
1490
51.9k
    {                                                                             \
1491
51.9k
        return key2any_check_selection(selection,                                 \
1492
51.9k
            DO_##kind##_selection_mask);                                          \
1493
51.9k
    }                                                                             \
encode_key2any.c:ec_to_X9_62_der_does_selection
Line
Count
Source
1490
42.1k
    {                                                                             \
1491
42.1k
        return key2any_check_selection(selection,                                 \
1492
42.1k
            DO_##kind##_selection_mask);                                          \
1493
42.1k
    }                                                                             \
encode_key2any.c:ec_to_X9_62_pem_does_selection
Line
Count
Source
1490
42.1k
    {                                                                             \
1491
42.1k
        return key2any_check_selection(selection,                                 \
1492
42.1k
            DO_##kind##_selection_mask);                                          \
1493
42.1k
    }                                                                             \
encode_key2any.c:ml_dsa_44_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
296
    {                                                                             \
1491
296
        return key2any_check_selection(selection,                                 \
1492
296
            DO_##kind##_selection_mask);                                          \
1493
296
    }                                                                             \
encode_key2any.c:ml_dsa_44_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
296
    {                                                                             \
1491
296
        return key2any_check_selection(selection,                                 \
1492
296
            DO_##kind##_selection_mask);                                          \
1493
296
    }                                                                             \
encode_key2any.c:ml_dsa_44_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
296
    {                                                                             \
1491
296
        return key2any_check_selection(selection,                                 \
1492
296
            DO_##kind##_selection_mask);                                          \
1493
296
    }                                                                             \
encode_key2any.c:ml_dsa_44_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
296
    {                                                                             \
1491
296
        return key2any_check_selection(selection,                                 \
1492
296
            DO_##kind##_selection_mask);                                          \
1493
296
    }                                                                             \
encode_key2any.c:ml_dsa_44_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
578
    {                                                                             \
1491
578
        return key2any_check_selection(selection,                                 \
1492
578
            DO_##kind##_selection_mask);                                          \
1493
578
    }                                                                             \
encode_key2any.c:ml_dsa_44_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
578
    {                                                                             \
1491
578
        return key2any_check_selection(selection,                                 \
1492
578
            DO_##kind##_selection_mask);                                          \
1493
578
    }                                                                             \
encode_key2any.c:ml_dsa_65_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
333
    {                                                                             \
1491
333
        return key2any_check_selection(selection,                                 \
1492
333
            DO_##kind##_selection_mask);                                          \
1493
333
    }                                                                             \
encode_key2any.c:ml_dsa_65_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
333
    {                                                                             \
1491
333
        return key2any_check_selection(selection,                                 \
1492
333
            DO_##kind##_selection_mask);                                          \
1493
333
    }                                                                             \
encode_key2any.c:ml_dsa_65_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
333
    {                                                                             \
1491
333
        return key2any_check_selection(selection,                                 \
1492
333
            DO_##kind##_selection_mask);                                          \
1493
333
    }                                                                             \
encode_key2any.c:ml_dsa_65_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
333
    {                                                                             \
1491
333
        return key2any_check_selection(selection,                                 \
1492
333
            DO_##kind##_selection_mask);                                          \
1493
333
    }                                                                             \
encode_key2any.c:ml_dsa_65_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
738
    {                                                                             \
1491
738
        return key2any_check_selection(selection,                                 \
1492
738
            DO_##kind##_selection_mask);                                          \
1493
738
    }                                                                             \
encode_key2any.c:ml_dsa_65_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
738
    {                                                                             \
1491
738
        return key2any_check_selection(selection,                                 \
1492
738
            DO_##kind##_selection_mask);                                          \
1493
738
    }                                                                             \
encode_key2any.c:ml_dsa_87_to_EncryptedPrivateKeyInfo_der_does_selection
Line
Count
Source
1490
243
    {                                                                             \
1491
243
        return key2any_check_selection(selection,                                 \
1492
243
            DO_##kind##_selection_mask);                                          \
1493
243
    }                                                                             \
encode_key2any.c:ml_dsa_87_to_EncryptedPrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
243
    {                                                                             \
1491
243
        return key2any_check_selection(selection,                                 \
1492
243
            DO_##kind##_selection_mask);                                          \
1493
243
    }                                                                             \
encode_key2any.c:ml_dsa_87_to_PrivateKeyInfo_der_does_selection
Line
Count
Source
1490
243
    {                                                                             \
1491
243
        return key2any_check_selection(selection,                                 \
1492
243
            DO_##kind##_selection_mask);                                          \
1493
243
    }                                                                             \
encode_key2any.c:ml_dsa_87_to_PrivateKeyInfo_pem_does_selection
Line
Count
Source
1490
243
    {                                                                             \
1491
243
        return key2any_check_selection(selection,                                 \
1492
243
            DO_##kind##_selection_mask);                                          \
1493
243
    }                                                                             \
encode_key2any.c:ml_dsa_87_to_SubjectPublicKeyInfo_der_does_selection
Line
Count
Source
1490
567
    {                                                                             \
1491
567
        return key2any_check_selection(selection,                                 \
1492
567
            DO_##kind##_selection_mask);                                          \
1493
567
    }                                                                             \
encode_key2any.c:ml_dsa_87_to_SubjectPublicKeyInfo_pem_does_selection
Line
Count
Source
1490
567
    {                                                                             \
1491
567
        return key2any_check_selection(selection,                                 \
1492
567
            DO_##kind##_selection_mask);                                          \
1493
567
    }                                                                             \
1494
    static int                                                                    \
1495
    impl##_to_##kind##_##output##_encode(void *ctx, OSSL_CORE_BIO *cout,          \
1496
        const void *key,                                                          \
1497
        const OSSL_PARAM key_abstract[],                                          \
1498
        int selection,                                                            \
1499
        OSSL_PASSPHRASE_CALLBACK *cb,                                             \
1500
        void *cbarg)                                                              \
1501
11.0k
    {                                                                             \
1502
11.0k
        /* We don't deal with abstract objects */                                 \
1503
11.0k
        if (key_abstract != NULL) {                                               \
1504
0
            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);               \
1505
0
            return 0;                                                             \
1506
0
        }                                                                         \
1507
11.0k
        DO_##kind(impl, type, output)                                             \
1508
11.0k
                                                                                  \
1509
11.0k
            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);               \
1510
0
        return 0;                                                                 \
1511
11.0k
    }                                                                             \
1512
    const OSSL_DISPATCH                                                           \
1513
        ossl_##impl##_to_##kind##_##output##_encoder_functions[]                  \
1514
        = {                                                                       \
1515
              { OSSL_FUNC_ENCODER_NEWCTX,                                         \
1516
                  (void (*)(void))key2any_newctx },                               \
1517
              { OSSL_FUNC_ENCODER_FREECTX,                                        \
1518
                  (void (*)(void))key2any_freectx },                              \
1519
              { OSSL_FUNC_ENCODER_SETTABLE_CTX_PARAMS,                            \
1520
                  (void (*)(void))key2any_settable_ctx_params },                  \
1521
              { OSSL_FUNC_ENCODER_SET_CTX_PARAMS,                                 \
1522
                  (void (*)(void))key2any_set_ctx_params },                       \
1523
              { OSSL_FUNC_ENCODER_DOES_SELECTION,                                 \
1524
                  (void (*)(void))impl##_to_##kind##_##output##_does_selection }, \
1525
              { OSSL_FUNC_ENCODER_IMPORT_OBJECT,                                  \
1526
                  (void (*)(void))impl##_to_##kind##_##output##_import_object },  \
1527
              { OSSL_FUNC_ENCODER_FREE_OBJECT,                                    \
1528
                  (void (*)(void))impl##_to_##kind##_##output##_free_object },    \
1529
              { OSSL_FUNC_ENCODER_ENCODE,                                         \
1530
                  (void (*)(void))impl##_to_##kind##_##output##_encode },         \
1531
              OSSL_DISPATCH_END                                                   \
1532
          }
1533
1534
/*
1535
 * Replacements for i2d_{TYPE}PrivateKey, i2d_{TYPE}PublicKey,
1536
 * i2d_{TYPE}params, as they exist.
1537
 */
1538
1.08k
MAKE_ENCODER(rsa, rsa, type_specific_keypair, der);
1539
#ifndef OPENSSL_NO_DH
1540
0
MAKE_ENCODER(dh, dh, type_specific_params, der);
1541
0
MAKE_ENCODER(dhx, dh, type_specific_params, der);
1542
#endif
1543
#ifndef OPENSSL_NO_DSA
1544
3.21k
MAKE_ENCODER(dsa, dsa, type_specific, der);
1545
#endif
1546
#ifndef OPENSSL_NO_EC
1547
4.96k
MAKE_ENCODER(ec, ec, type_specific_no_pub, der);
1548
#ifndef OPENSSL_NO_SM2
1549
26
MAKE_ENCODER(sm2, ec, type_specific_no_pub, der);
1550
#endif
1551
#endif
1552
1553
/*
1554
 * Replacements for PEM_write_bio_{TYPE}PrivateKey,
1555
 * PEM_write_bio_{TYPE}PublicKey, PEM_write_bio_{TYPE}params, as they exist.
1556
 */
1557
0
MAKE_ENCODER(rsa, rsa, type_specific_keypair, pem);
1558
#ifndef OPENSSL_NO_DH
1559
0
MAKE_ENCODER(dh, dh, type_specific_params, pem);
1560
0
MAKE_ENCODER(dhx, dh, type_specific_params, pem);
1561
#endif
1562
#ifndef OPENSSL_NO_DSA
1563
0
MAKE_ENCODER(dsa, dsa, type_specific, pem);
1564
#endif
1565
#ifndef OPENSSL_NO_EC
1566
0
MAKE_ENCODER(ec, ec, type_specific_no_pub, pem);
1567
#ifndef OPENSSL_NO_SM2
1568
0
MAKE_ENCODER(sm2, ec, type_specific_no_pub, pem);
1569
#endif
1570
#endif
1571
1572
/*
1573
 * PKCS#8 and SubjectPublicKeyInfo support.  This may duplicate some of the
1574
 * implementations specified above, but are more specific.
1575
 * The SubjectPublicKeyInfo implementations also replace the
1576
 * PEM_write_bio_{TYPE}_PUBKEY functions.
1577
 * For PEM, these are expected to be used by PEM_write_bio_PrivateKey(),
1578
 * PEM_write_bio_PUBKEY() and PEM_write_bio_Parameters().
1579
 */
1580
0
MAKE_ENCODER(rsa, rsa, EncryptedPrivateKeyInfo, der);
1581
0
MAKE_ENCODER(rsa, rsa, EncryptedPrivateKeyInfo, pem);
1582
0
MAKE_ENCODER(rsa, rsa, PrivateKeyInfo, der);
1583
0
MAKE_ENCODER(rsa, rsa, PrivateKeyInfo, pem);
1584
0
MAKE_ENCODER(rsa, rsa, SubjectPublicKeyInfo, der);
1585
0
MAKE_ENCODER(rsa, rsa, SubjectPublicKeyInfo, pem);
1586
0
MAKE_ENCODER(rsapss, rsa, EncryptedPrivateKeyInfo, der);
1587
0
MAKE_ENCODER(rsapss, rsa, EncryptedPrivateKeyInfo, pem);
1588
8
MAKE_ENCODER(rsapss, rsa, PrivateKeyInfo, der);
1589
0
MAKE_ENCODER(rsapss, rsa, PrivateKeyInfo, pem);
1590
0
MAKE_ENCODER(rsapss, rsa, SubjectPublicKeyInfo, der);
1591
0
MAKE_ENCODER(rsapss, rsa, SubjectPublicKeyInfo, pem);
1592
#ifndef OPENSSL_NO_DH
1593
0
MAKE_ENCODER(dh, dh, EncryptedPrivateKeyInfo, der);
1594
0
MAKE_ENCODER(dh, dh, EncryptedPrivateKeyInfo, pem);
1595
0
MAKE_ENCODER(dh, dh, PrivateKeyInfo, der);
1596
0
MAKE_ENCODER(dh, dh, PrivateKeyInfo, pem);
1597
0
MAKE_ENCODER(dh, dh, SubjectPublicKeyInfo, der);
1598
0
MAKE_ENCODER(dh, dh, SubjectPublicKeyInfo, pem);
1599
0
MAKE_ENCODER(dhx, dh, EncryptedPrivateKeyInfo, der);
1600
0
MAKE_ENCODER(dhx, dh, EncryptedPrivateKeyInfo, pem);
1601
105
MAKE_ENCODER(dhx, dh, PrivateKeyInfo, der);
1602
0
MAKE_ENCODER(dhx, dh, PrivateKeyInfo, pem);
1603
0
MAKE_ENCODER(dhx, dh, SubjectPublicKeyInfo, der);
1604
0
MAKE_ENCODER(dhx, dh, SubjectPublicKeyInfo, pem);
1605
#endif
1606
#ifndef OPENSSL_NO_DSA
1607
0
MAKE_ENCODER(dsa, dsa, EncryptedPrivateKeyInfo, der);
1608
0
MAKE_ENCODER(dsa, dsa, EncryptedPrivateKeyInfo, pem);
1609
0
MAKE_ENCODER(dsa, dsa, PrivateKeyInfo, der);
1610
0
MAKE_ENCODER(dsa, dsa, PrivateKeyInfo, pem);
1611
0
MAKE_ENCODER(dsa, dsa, SubjectPublicKeyInfo, der);
1612
0
MAKE_ENCODER(dsa, dsa, SubjectPublicKeyInfo, pem);
1613
#endif
1614
#ifndef OPENSSL_NO_EC
1615
0
MAKE_ENCODER(ec, ec, EncryptedPrivateKeyInfo, der);
1616
0
MAKE_ENCODER(ec, ec, EncryptedPrivateKeyInfo, pem);
1617
1.43k
MAKE_ENCODER(ec, ec, PrivateKeyInfo, der);
1618
0
MAKE_ENCODER(ec, ec, PrivateKeyInfo, pem);
1619
0
MAKE_ENCODER(ec, ec, SubjectPublicKeyInfo, der);
1620
0
MAKE_ENCODER(ec, ec, SubjectPublicKeyInfo, pem);
1621
#ifndef OPENSSL_NO_SM2
1622
0
MAKE_ENCODER(sm2, ec, EncryptedPrivateKeyInfo, der);
1623
0
MAKE_ENCODER(sm2, ec, EncryptedPrivateKeyInfo, pem);
1624
8
MAKE_ENCODER(sm2, ec, PrivateKeyInfo, der);
1625
0
MAKE_ENCODER(sm2, ec, PrivateKeyInfo, pem);
1626
0
MAKE_ENCODER(sm2, ec, SubjectPublicKeyInfo, der);
1627
0
MAKE_ENCODER(sm2, ec, SubjectPublicKeyInfo, pem);
1628
#endif
1629
#ifndef OPENSSL_NO_ECX
1630
0
MAKE_ENCODER(ed25519, ecx, EncryptedPrivateKeyInfo, der);
1631
0
MAKE_ENCODER(ed25519, ecx, EncryptedPrivateKeyInfo, pem);
1632
7
MAKE_ENCODER(ed25519, ecx, PrivateKeyInfo, der);
1633
0
MAKE_ENCODER(ed25519, ecx, PrivateKeyInfo, pem);
1634
0
MAKE_ENCODER(ed25519, ecx, SubjectPublicKeyInfo, der);
1635
0
MAKE_ENCODER(ed25519, ecx, SubjectPublicKeyInfo, pem);
1636
0
MAKE_ENCODER(ed448, ecx, EncryptedPrivateKeyInfo, der);
1637
0
MAKE_ENCODER(ed448, ecx, EncryptedPrivateKeyInfo, pem);
1638
4
MAKE_ENCODER(ed448, ecx, PrivateKeyInfo, der);
1639
0
MAKE_ENCODER(ed448, ecx, PrivateKeyInfo, pem);
1640
0
MAKE_ENCODER(ed448, ecx, SubjectPublicKeyInfo, der);
1641
0
MAKE_ENCODER(ed448, ecx, SubjectPublicKeyInfo, pem);
1642
0
MAKE_ENCODER(x25519, ecx, EncryptedPrivateKeyInfo, der);
1643
0
MAKE_ENCODER(x25519, ecx, EncryptedPrivateKeyInfo, pem);
1644
9
MAKE_ENCODER(x25519, ecx, PrivateKeyInfo, der);
1645
0
MAKE_ENCODER(x25519, ecx, PrivateKeyInfo, pem);
1646
0
MAKE_ENCODER(x25519, ecx, SubjectPublicKeyInfo, der);
1647
0
MAKE_ENCODER(x25519, ecx, SubjectPublicKeyInfo, pem);
1648
0
MAKE_ENCODER(x448, ecx, EncryptedPrivateKeyInfo, der);
1649
0
MAKE_ENCODER(x448, ecx, EncryptedPrivateKeyInfo, pem);
1650
6
MAKE_ENCODER(x448, ecx, PrivateKeyInfo, der);
1651
0
MAKE_ENCODER(x448, ecx, PrivateKeyInfo, pem);
1652
0
MAKE_ENCODER(x448, ecx, SubjectPublicKeyInfo, der);
1653
0
MAKE_ENCODER(x448, ecx, SubjectPublicKeyInfo, pem);
1654
#endif
1655
#endif
1656
#ifndef OPENSSL_NO_SLH_DSA
1657
0
MAKE_ENCODER(slh_dsa_sha2_128s, slh_dsa, EncryptedPrivateKeyInfo, der);
1658
0
MAKE_ENCODER(slh_dsa_sha2_128f, slh_dsa, EncryptedPrivateKeyInfo, der);
1659
0
MAKE_ENCODER(slh_dsa_sha2_192s, slh_dsa, EncryptedPrivateKeyInfo, der);
1660
0
MAKE_ENCODER(slh_dsa_sha2_192f, slh_dsa, EncryptedPrivateKeyInfo, der);
1661
0
MAKE_ENCODER(slh_dsa_sha2_256s, slh_dsa, EncryptedPrivateKeyInfo, der);
1662
0
MAKE_ENCODER(slh_dsa_sha2_256f, slh_dsa, EncryptedPrivateKeyInfo, der);
1663
0
MAKE_ENCODER(slh_dsa_sha2_128s, slh_dsa, EncryptedPrivateKeyInfo, pem);
1664
0
MAKE_ENCODER(slh_dsa_sha2_128f, slh_dsa, EncryptedPrivateKeyInfo, pem);
1665
0
MAKE_ENCODER(slh_dsa_sha2_192s, slh_dsa, EncryptedPrivateKeyInfo, pem);
1666
0
MAKE_ENCODER(slh_dsa_sha2_192f, slh_dsa, EncryptedPrivateKeyInfo, pem);
1667
0
MAKE_ENCODER(slh_dsa_sha2_256s, slh_dsa, EncryptedPrivateKeyInfo, pem);
1668
0
MAKE_ENCODER(slh_dsa_sha2_256f, slh_dsa, EncryptedPrivateKeyInfo, pem);
1669
0
MAKE_ENCODER(slh_dsa_shake_128s, slh_dsa, EncryptedPrivateKeyInfo, der);
1670
0
MAKE_ENCODER(slh_dsa_shake_128f, slh_dsa, EncryptedPrivateKeyInfo, der);
1671
0
MAKE_ENCODER(slh_dsa_shake_192s, slh_dsa, EncryptedPrivateKeyInfo, der);
1672
0
MAKE_ENCODER(slh_dsa_shake_192f, slh_dsa, EncryptedPrivateKeyInfo, der);
1673
0
MAKE_ENCODER(slh_dsa_shake_256s, slh_dsa, EncryptedPrivateKeyInfo, der);
1674
0
MAKE_ENCODER(slh_dsa_shake_256f, slh_dsa, EncryptedPrivateKeyInfo, der);
1675
0
MAKE_ENCODER(slh_dsa_shake_128s, slh_dsa, EncryptedPrivateKeyInfo, pem);
1676
0
MAKE_ENCODER(slh_dsa_shake_128f, slh_dsa, EncryptedPrivateKeyInfo, pem);
1677
0
MAKE_ENCODER(slh_dsa_shake_192s, slh_dsa, EncryptedPrivateKeyInfo, pem);
1678
0
MAKE_ENCODER(slh_dsa_shake_192f, slh_dsa, EncryptedPrivateKeyInfo, pem);
1679
0
MAKE_ENCODER(slh_dsa_shake_256s, slh_dsa, EncryptedPrivateKeyInfo, pem);
1680
0
MAKE_ENCODER(slh_dsa_shake_256f, slh_dsa, EncryptedPrivateKeyInfo, pem);
1681
1
MAKE_ENCODER(slh_dsa_sha2_128s, slh_dsa, PrivateKeyInfo, der);
1682
1
MAKE_ENCODER(slh_dsa_sha2_128f, slh_dsa, PrivateKeyInfo, der);
1683
1
MAKE_ENCODER(slh_dsa_sha2_192s, slh_dsa, PrivateKeyInfo, der);
1684
1
MAKE_ENCODER(slh_dsa_sha2_192f, slh_dsa, PrivateKeyInfo, der);
1685
1
MAKE_ENCODER(slh_dsa_sha2_256s, slh_dsa, PrivateKeyInfo, der);
1686
1
MAKE_ENCODER(slh_dsa_sha2_256f, slh_dsa, PrivateKeyInfo, der);
1687
0
MAKE_ENCODER(slh_dsa_sha2_128s, slh_dsa, PrivateKeyInfo, pem);
1688
0
MAKE_ENCODER(slh_dsa_sha2_128f, slh_dsa, PrivateKeyInfo, pem);
1689
0
MAKE_ENCODER(slh_dsa_sha2_192s, slh_dsa, PrivateKeyInfo, pem);
1690
0
MAKE_ENCODER(slh_dsa_sha2_192f, slh_dsa, PrivateKeyInfo, pem);
1691
0
MAKE_ENCODER(slh_dsa_sha2_256s, slh_dsa, PrivateKeyInfo, pem);
1692
0
MAKE_ENCODER(slh_dsa_sha2_256f, slh_dsa, PrivateKeyInfo, pem);
1693
1
MAKE_ENCODER(slh_dsa_shake_128s, slh_dsa, PrivateKeyInfo, der);
1694
1
MAKE_ENCODER(slh_dsa_shake_128f, slh_dsa, PrivateKeyInfo, der);
1695
2
MAKE_ENCODER(slh_dsa_shake_192s, slh_dsa, PrivateKeyInfo, der);
1696
2
MAKE_ENCODER(slh_dsa_shake_192f, slh_dsa, PrivateKeyInfo, der);
1697
3
MAKE_ENCODER(slh_dsa_shake_256s, slh_dsa, PrivateKeyInfo, der);
1698
2
MAKE_ENCODER(slh_dsa_shake_256f, slh_dsa, PrivateKeyInfo, der);
1699
0
MAKE_ENCODER(slh_dsa_shake_128s, slh_dsa, PrivateKeyInfo, pem);
1700
0
MAKE_ENCODER(slh_dsa_shake_128f, slh_dsa, PrivateKeyInfo, pem);
1701
0
MAKE_ENCODER(slh_dsa_shake_192s, slh_dsa, PrivateKeyInfo, pem);
1702
0
MAKE_ENCODER(slh_dsa_shake_192f, slh_dsa, PrivateKeyInfo, pem);
1703
0
MAKE_ENCODER(slh_dsa_shake_256s, slh_dsa, PrivateKeyInfo, pem);
1704
0
MAKE_ENCODER(slh_dsa_shake_256f, slh_dsa, PrivateKeyInfo, pem);
1705
0
MAKE_ENCODER(slh_dsa_sha2_128s, slh_dsa, SubjectPublicKeyInfo, der);
1706
0
MAKE_ENCODER(slh_dsa_sha2_128f, slh_dsa, SubjectPublicKeyInfo, der);
1707
0
MAKE_ENCODER(slh_dsa_sha2_192s, slh_dsa, SubjectPublicKeyInfo, der);
1708
0
MAKE_ENCODER(slh_dsa_sha2_192f, slh_dsa, SubjectPublicKeyInfo, der);
1709
0
MAKE_ENCODER(slh_dsa_sha2_256s, slh_dsa, SubjectPublicKeyInfo, der);
1710
0
MAKE_ENCODER(slh_dsa_sha2_256f, slh_dsa, SubjectPublicKeyInfo, der);
1711
0
MAKE_ENCODER(slh_dsa_sha2_128s, slh_dsa, SubjectPublicKeyInfo, pem);
1712
0
MAKE_ENCODER(slh_dsa_sha2_128f, slh_dsa, SubjectPublicKeyInfo, pem);
1713
0
MAKE_ENCODER(slh_dsa_sha2_192s, slh_dsa, SubjectPublicKeyInfo, pem);
1714
0
MAKE_ENCODER(slh_dsa_sha2_192f, slh_dsa, SubjectPublicKeyInfo, pem);
1715
0
MAKE_ENCODER(slh_dsa_sha2_256s, slh_dsa, SubjectPublicKeyInfo, pem);
1716
0
MAKE_ENCODER(slh_dsa_sha2_256f, slh_dsa, SubjectPublicKeyInfo, pem);
1717
0
MAKE_ENCODER(slh_dsa_shake_128s, slh_dsa, SubjectPublicKeyInfo, der);
1718
0
MAKE_ENCODER(slh_dsa_shake_128f, slh_dsa, SubjectPublicKeyInfo, der);
1719
0
MAKE_ENCODER(slh_dsa_shake_192s, slh_dsa, SubjectPublicKeyInfo, der);
1720
0
MAKE_ENCODER(slh_dsa_shake_192f, slh_dsa, SubjectPublicKeyInfo, der);
1721
0
MAKE_ENCODER(slh_dsa_shake_256s, slh_dsa, SubjectPublicKeyInfo, der);
1722
0
MAKE_ENCODER(slh_dsa_shake_256f, slh_dsa, SubjectPublicKeyInfo, der);
1723
0
MAKE_ENCODER(slh_dsa_shake_128s, slh_dsa, SubjectPublicKeyInfo, pem);
1724
0
MAKE_ENCODER(slh_dsa_shake_128f, slh_dsa, SubjectPublicKeyInfo, pem);
1725
0
MAKE_ENCODER(slh_dsa_shake_192s, slh_dsa, SubjectPublicKeyInfo, pem);
1726
0
MAKE_ENCODER(slh_dsa_shake_192f, slh_dsa, SubjectPublicKeyInfo, pem);
1727
0
MAKE_ENCODER(slh_dsa_shake_256s, slh_dsa, SubjectPublicKeyInfo, pem);
1728
0
MAKE_ENCODER(slh_dsa_shake_256f, slh_dsa, SubjectPublicKeyInfo, pem);
1729
#endif /* OPENSSL_NO_SLH_DSA */
1730
1731
#ifndef OPENSSL_NO_ML_KEM
1732
0
MAKE_ENCODER(ml_kem_512, ml_kem, EncryptedPrivateKeyInfo, der);
1733
0
MAKE_ENCODER(ml_kem_512, ml_kem, EncryptedPrivateKeyInfo, pem);
1734
4
MAKE_ENCODER(ml_kem_512, ml_kem, PrivateKeyInfo, der);
1735
0
MAKE_ENCODER(ml_kem_512, ml_kem, PrivateKeyInfo, pem);
1736
0
MAKE_ENCODER(ml_kem_512, ml_kem, SubjectPublicKeyInfo, der);
1737
0
MAKE_ENCODER(ml_kem_512, ml_kem, SubjectPublicKeyInfo, pem);
1738
1739
0
MAKE_ENCODER(ml_kem_768, ml_kem, EncryptedPrivateKeyInfo, der);
1740
0
MAKE_ENCODER(ml_kem_768, ml_kem, EncryptedPrivateKeyInfo, pem);
1741
9
MAKE_ENCODER(ml_kem_768, ml_kem, PrivateKeyInfo, der);
1742
0
MAKE_ENCODER(ml_kem_768, ml_kem, PrivateKeyInfo, pem);
1743
0
MAKE_ENCODER(ml_kem_768, ml_kem, SubjectPublicKeyInfo, der);
1744
0
MAKE_ENCODER(ml_kem_768, ml_kem, SubjectPublicKeyInfo, pem);
1745
1746
0
MAKE_ENCODER(ml_kem_1024, ml_kem, EncryptedPrivateKeyInfo, der);
1747
0
MAKE_ENCODER(ml_kem_1024, ml_kem, EncryptedPrivateKeyInfo, pem);
1748
16
MAKE_ENCODER(ml_kem_1024, ml_kem, PrivateKeyInfo, der);
1749
0
MAKE_ENCODER(ml_kem_1024, ml_kem, PrivateKeyInfo, pem);
1750
0
MAKE_ENCODER(ml_kem_1024, ml_kem, SubjectPublicKeyInfo, der);
1751
0
MAKE_ENCODER(ml_kem_1024, ml_kem, SubjectPublicKeyInfo, pem);
1752
#endif
1753
1754
/*
1755
 * Support for key type specific output formats.  Not all key types have
1756
 * this, we only aim to duplicate what is available in 1.1.1 as
1757
 * i2d_TYPEPrivateKey(), i2d_TYPEPublicKey() and i2d_TYPEparams().
1758
 * For example, there are no publicly available i2d_ function for
1759
 * ED25519, ED448, X25519 or X448, and they therefore only have PKCS#8
1760
 * and SubjectPublicKeyInfo implementations as implemented above.
1761
 */
1762
0
MAKE_ENCODER(rsa, rsa, RSA, der);
1763
0
MAKE_ENCODER(rsa, rsa, RSA, pem);
1764
#ifndef OPENSSL_NO_DH
1765
0
MAKE_ENCODER(dh, dh, DH, der);
1766
0
MAKE_ENCODER(dh, dh, DH, pem);
1767
0
MAKE_ENCODER(dhx, dh, DHX, der);
1768
0
MAKE_ENCODER(dhx, dh, DHX, pem);
1769
#endif
1770
#ifndef OPENSSL_NO_DSA
1771
0
MAKE_ENCODER(dsa, dsa, DSA, der);
1772
0
MAKE_ENCODER(dsa, dsa, DSA, pem);
1773
#endif
1774
#ifndef OPENSSL_NO_EC
1775
0
MAKE_ENCODER(ec, ec, EC, der);
1776
0
MAKE_ENCODER(ec, ec, EC, pem);
1777
#ifndef OPENSSL_NO_SM2
1778
0
MAKE_ENCODER(sm2, ec, SM2, der);
1779
0
MAKE_ENCODER(sm2, ec, SM2, pem);
1780
#endif
1781
#endif
1782
1783
/* Convenience structure names */
1784
0
MAKE_ENCODER(rsa, rsa, PKCS1, der);
1785
0
MAKE_ENCODER(rsa, rsa, PKCS1, pem);
1786
0
MAKE_ENCODER(rsapss, rsa, PKCS1, der);
1787
0
MAKE_ENCODER(rsapss, rsa, PKCS1, pem);
1788
#ifndef OPENSSL_NO_DH
1789
0
MAKE_ENCODER(dh, dh, PKCS3, der); /* parameters only */
1790
0
MAKE_ENCODER(dh, dh, PKCS3, pem); /* parameters only */
1791
0
MAKE_ENCODER(dhx, dh, X9_42, der); /* parameters only */
1792
0
MAKE_ENCODER(dhx, dh, X9_42, pem); /* parameters only */
1793
#endif
1794
#ifndef OPENSSL_NO_EC
1795
0
MAKE_ENCODER(ec, ec, X9_62, der);
1796
0
MAKE_ENCODER(ec, ec, X9_62, pem);
1797
#endif
1798
1799
#ifndef OPENSSL_NO_ML_DSA
1800
0
MAKE_ENCODER(ml_dsa_44, ml_dsa, EncryptedPrivateKeyInfo, der);
1801
0
MAKE_ENCODER(ml_dsa_44, ml_dsa, EncryptedPrivateKeyInfo, pem);
1802
34
MAKE_ENCODER(ml_dsa_44, ml_dsa, PrivateKeyInfo, der);
1803
0
MAKE_ENCODER(ml_dsa_44, ml_dsa, PrivateKeyInfo, pem);
1804
0
MAKE_ENCODER(ml_dsa_44, ml_dsa, SubjectPublicKeyInfo, der);
1805
0
MAKE_ENCODER(ml_dsa_44, ml_dsa, SubjectPublicKeyInfo, pem);
1806
1807
0
MAKE_ENCODER(ml_dsa_65, ml_dsa, EncryptedPrivateKeyInfo, der);
1808
0
MAKE_ENCODER(ml_dsa_65, ml_dsa, EncryptedPrivateKeyInfo, pem);
1809
45
MAKE_ENCODER(ml_dsa_65, ml_dsa, PrivateKeyInfo, der);
1810
0
MAKE_ENCODER(ml_dsa_65, ml_dsa, PrivateKeyInfo, pem);
1811
0
MAKE_ENCODER(ml_dsa_65, ml_dsa, SubjectPublicKeyInfo, der);
1812
0
MAKE_ENCODER(ml_dsa_65, ml_dsa, SubjectPublicKeyInfo, pem);
1813
1814
0
MAKE_ENCODER(ml_dsa_87, ml_dsa, EncryptedPrivateKeyInfo, der);
1815
0
MAKE_ENCODER(ml_dsa_87, ml_dsa, EncryptedPrivateKeyInfo, pem);
1816
36
MAKE_ENCODER(ml_dsa_87, ml_dsa, PrivateKeyInfo, der);
1817
0
MAKE_ENCODER(ml_dsa_87, ml_dsa, PrivateKeyInfo, pem);
1818
0
MAKE_ENCODER(ml_dsa_87, ml_dsa, SubjectPublicKeyInfo, der);
1819
MAKE_ENCODER(ml_dsa_87, ml_dsa, SubjectPublicKeyInfo, pem);
1820
#endif /* OPENSSL_NO_ML_DSA */