Skip to content

Commit 718c6fe

Browse files
authored
Merge pull request #2947 from 24icewolf42/fix-mtls-client-pem-check
Add support for EC private key in mTLS check
2 parents 1394cc8 + 91caad6 commit 718c6fe

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 -Eaq '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)