From 2ce3be8c6e191f07165daf51d93c4bfe7e151f81 Mon Sep 17 00:00:00 2001 From: xiazhvera Date: Thu, 12 Oct 2023 18:12:33 -0700 Subject: [PATCH] more prints --- source/pem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/pem.c b/source/pem.c index a1a9627be..121d7f7e1 100644 --- a/source/pem.c +++ b/source/pem.c @@ -232,11 +232,13 @@ int s_extract_header_type_cur(struct aws_byte_cursor cur, struct aws_byte_cursor } aws_byte_cursor_advance(&cur, s_begin_header_cur.len); + AWS_LOGF_ERROR(AWS_LS_IO_PEM, "Invalid PEM buffer: invalid end token %d:"PRInSTR, cur.len, AWS_BYTE_CURSOR_PRI(cur)); aws_byte_cursor_advance(&cur, 1); // space after begin + AWS_LOGF_ERROR(AWS_LS_IO_PEM, "Invalid PEM buffer: invalid end token %d:"PRInSTR, cur.len, AWS_BYTE_CURSOR_PRI(cur)); struct aws_byte_cursor type_cur = aws_byte_cursor_advance(&cur, cur.len - s_delim_cur.len); if (!aws_byte_cursor_eq(&cur, &s_delim_cur)) { - AWS_LOGF_ERROR(AWS_LS_IO_PEM, "Invalid PEM buffer: invalid end token :"PRInSTR, AWS_BYTE_CURSOR_PRI(cur)); + AWS_LOGF_ERROR(AWS_LS_IO_PEM, "Invalid PEM buffer: invalid end token %d:"PRInSTR, cur.len, AWS_BYTE_CURSOR_PRI(cur)); return aws_raise_error(AWS_ERROR_PEM_MALFORMED); }