Fix policy status rendering
ober
3d41022f6ea438b09b37561e4934e65f51bf4fc7
--- a/proton-bridge/cli.ss +++ b/proton-bridge/cli.ss @@ -71,7 +71,7 @@ " " (symbol->string (car item)) ": " - (if (cdr item) "yes" "no")))) + (policy-value->string (cdr item))))) (security-summary)) (println (string-append "native Proton SRP: " (if (proton-srp-native-available?) @@ -84,6 +84,12 @@ (println "FIDO2/WebAuthn via jerboa-yubikey: payload path available") (println "password-authenticated local IMAP: intentionally disabled")) + (define (policy-value->string value) + (cond + [(boolean? value) (if value "yes" "no")] + [(symbol? value) (symbol->string value)] + [else (format "~a" value)])) + (define (print-session-policy) (let ([policy (default-security-policy)]) (println "session policy")