aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'check-certificates.rsc')
-rw-r--r--check-certificates.rsc6
1 files changed, 5 insertions, 1 deletions
diff --git a/check-certificates.rsc b/check-certificates.rsc
index 1968641..e470b59 100644
--- a/check-certificates.rsc
+++ b/check-certificates.rsc
@@ -98,8 +98,12 @@
:global ParseKeyValueStore;
:local CertVal [ /certificate/get $Cert ];
- :local Return "";
+ :if ([ :typeof ($CertVal->"issuer") ] = "nothing") do={
+ :return "self-signed";
+ }
+
+ :local Return "";
:for I from=0 to=5 do={
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]);