Coverage Report

Created: 2025-12-31 06:58

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