Skip to content

Commit 7c62ae5

Browse files
authored
Add support for EC private key in mTLS check
1 parent ae48b68 commit 7c62ae5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25214,7 +25214,7 @@ parse_cmd_line() {
2521425214
if [[ ! -z "$MTLS" ]]; then
2521525215
if [[ -f $MTLS ]]; then
2521625216
grep -q 'BEGIN CERTIFICATE' "$MTLS" || fatal_cmd_line "\"$MTLS\" is not a client certificate file in PEM format" $ERR_RESOURCE
25217-
grep -q 'BEGIN PRIVATE KEY\|BEGIN RSA PRIVATE KEY' "$MTLS" || fatal_cmd_line "\"$MTLS\" the not encrypted private key is missing in the specified PEM file" $ERR_RESOURCE
25217+
grep -q 'BEGIN PRIVATE KEY\|BEGIN RSA PRIVATE KEY\|BEGIN EC PRIVATE KEY' "$MTLS" || fatal_cmd_line "\"$MTLS\" the not encrypted private key is missing in the specified PEM file" $ERR_RESOURCE
2521825218
MTLS=$MTLS
2521925219
else
2522025220
[[ -s "$MTLS" ]] || fatal_cmd_line "the specified client certificate file \"$MTLS\" does not exist" $ERR_RESOURCE

0 commit comments

Comments
 (0)