Debian Codegraph @

crt/aws-c-io/include/aws/io/private/pem_utils.h

raw symbols SCIP
1 #ifndef AWS_IO_PEM_UTILS_H
2 #define AWS_IO_PEM_UTILS_H
3
4 /**
5 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6 * SPDX-License-Identifier: Apache-2.0.
7 */
8 #include <aws/io/io.h>
9
10 AWS_EXTERN_C_BEGIN
11
12 /**
13 * Cleanup Function that parses the full PEM Chain object once and strip the comments out for the pem parser not
14 * handling the comments. The passed in pem will be cleaned up.
15 *
16 * - Garbage characters in-between PEM objects (characters before the first BEGIN or after an END and before the next
17 * BEGIN) are removed
18 *
19 * - AWS_ERROR_INVALID_ARGUMENT will be raised if the file contains no PEM encoded data.
20 */
21 AWS_IO_API
22 int aws_sanitize_pem(struct aws_byte_buf *pem, struct aws_allocator *allocator);
23
24 AWS_EXTERN_C_END
25 #endif /* AWS_IO_PEM_UTILS_H */