Debian Codegraph @

crt/s2n/crypto/s2n_signature.h

raw symbols SCIP
1 /* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License").
4 * You may not use this file except in compliance with the License.
5 * A copy of the License is located at
6 *
7 * http://aws.amazon.com/apache2.0
8 *
9 * or in the "license" file accompanying this file. This file is distributed
10 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11 * express or implied. See the License for the specific language governing
12 * permissions and limitations under the License.
13 */
14
15 #pragma once
16
17 #include "tls/s2n_tls_parameters.h"
18
19 #define sig_alg_check(a, b) \
20 do { \
21 if ((a) != (b)) { \
22 POSIX_BAIL(S2N_ERR_INVALID_SIGNATURE_ALGORITHM); \
23 } \
24 } while (0)
25
26 typedef enum {
27 S2N_SIGNATURE_ANONYMOUS = S2N_TLS_SIGNATURE_ANONYMOUS,
28 S2N_SIGNATURE_RSA = S2N_TLS_SIGNATURE_RSA,
29 S2N_SIGNATURE_ECDSA = S2N_TLS_SIGNATURE_ECDSA,
30
31 S2N_SIGNATURE_RSA_PSS_RSAE = S2N_TLS_SIGNATURE_RSA_PSS_RSAE,
32 S2N_SIGNATURE_RSA_PSS_PSS = S2N_TLS_SIGNATURE_RSA_PSS_PSS,
33
34 /* For now, ML-DSA does not have a public value */
35 S2N_SIGNATURE_MLDSA,
36 } s2n_signature_algorithm;