Debian Codegraph @

crt/aws-c-cal/include/aws/cal/private/ecc.h

raw symbols SCIP
1 #ifndef AWS_C_CAL_PRIVATE_ECC_H
2 #define AWS_C_CAL_PRIVATE_ECC_H
3 /**
4 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * SPDX-License-Identifier: Apache-2.0.
6 */
7
8 #include <aws/cal/ecc.h>
9
10 #include <aws/common/byte_buf.h>
11
12 struct aws_der_decoder;
13
14 AWS_EXTERN_C_BEGIN
15
16 /*
17 * Helper to load keypair from various ASN1 format.
18 * Note: there are several formats in the wild: Sec1 and PKCS8 for private key and X509 for public key.
19 * This function attempts to automatically recognize the format and load from it.
20 * Depending on data available in the asn, either private or public key might be empty (zeroed out).
21 */
22 AWS_CAL_API int aws_der_decoder_load_ecc_key_pair(
23 struct aws_der_decoder *decoder,
24 struct aws_byte_cursor *out_public_x_coord,
25 struct aws_byte_cursor *out_public_y_coord,
26 struct aws_byte_cursor *out_private_d,
27 enum aws_ecc_curve_name *out_curve_name);
28
29 AWS_EXTERN_C_END
30
31 #endif /* AWS_C_CAL_PRIVATE_ECC_H */