mirror of
https://github.com/clearlinux/clrtrust.git
synced 2026-06-16 02:55:58 +00:00
Check for variations of textually encoded cert.
Specifically, account for 'BEGIN X509 CERTIFICATE' and 'BEGIN TRUSTED CERTIFICATE' markers.
This commit is contained in:
@@ -54,7 +54,7 @@ is_single_cert() {
|
||||
# each certificate provided as input to clrtrust must contain single
|
||||
# certificate, so it can be used in CAPath. in other words, OpenSSL's bundle
|
||||
# certificates are not accepted. this function checks for that
|
||||
t=$(cat "$1" | grep 'BEGIN CERTIFICATE' | wc -l)
|
||||
t=$(cat "$1" | grep 'BEGIN \(X509 \|TRUSTED \|\)CERTIFICATE' | wc -l)
|
||||
test $t -eq 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user