Debian Codegraph @

crt/s2n/tls/s2n_signature_algorithms.h

raw symbols SCIP
1 /*
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16 #pragma once
17
18 #include "api/s2n.h"
19 #include "crypto/s2n_hash.h"
20 #include "crypto/s2n_pkey.h"
21 #include "crypto/s2n_signature.h"
22 #include "stuffer/s2n_stuffer.h"
23 #include "tls/s2n_signature_scheme.h"
24
25 struct s2n_connection;
26
27 struct s2n_sig_scheme_list {
28 uint16_t iana_list[TLS_SIGNATURE_SCHEME_LIST_MAX_LEN];
29 uint8_t len;
30 };
31
32 S2N_RESULT s2n_signature_algorithm_recv(struct s2n_connection *conn, struct s2n_stuffer *in);
33
34 S2N_RESULT s2n_signature_algorithm_select(struct s2n_connection *conn);
35
36 int s2n_recv_supported_sig_scheme_list(struct s2n_stuffer *in, struct s2n_sig_scheme_list *sig_hash_algs);
37 S2N_RESULT s2n_signature_algorithms_supported_list_send(struct s2n_connection *conn,
38 struct s2n_stuffer *out);
39
40 S2N_RESULT s2n_signature_algorithm_get_pkey_type(s2n_signature_algorithm sig_alg, s2n_pkey_type *pkey_type);
41
42 S2N_RESULT s2n_signature_scheme_params_match(struct s2n_connection *conn, const struct s2n_pkey *pub_key, const struct s2n_signature_scheme *wire_scheme);