You've already forked guix-tribes
Disable Common Name for IP ACME certificates
This commit is contained in:
@@ -86,6 +86,14 @@
|
|||||||
(string-append "IP:" subject)
|
(string-append "IP:" subject)
|
||||||
(string-append "DNS:" subject)))
|
(string-append "DNS:" subject)))
|
||||||
|
|
||||||
|
(define (ip-subject? subject)
|
||||||
|
(and (not (string-any char-alphabetic? subject))
|
||||||
|
(string-any (lambda (chr)
|
||||||
|
(or (char-numeric? chr)
|
||||||
|
(char=? chr #\.)
|
||||||
|
(char=? chr #\:)))
|
||||||
|
subject)))
|
||||||
|
|
||||||
(define (certificate-key-name certificate)
|
(define (certificate-key-name certificate)
|
||||||
(string-map (lambda (chr)
|
(string-map (lambda (chr)
|
||||||
(if (char=? chr #\*)
|
(if (char=? chr #\*)
|
||||||
@@ -121,6 +129,9 @@
|
|||||||
(if server
|
(if server
|
||||||
(list "--server" server)
|
(list "--server" server)
|
||||||
'())
|
'())
|
||||||
|
(if (any ip-subject? subjects)
|
||||||
|
(list "--disable-cn")
|
||||||
|
'())
|
||||||
(list "--key-type" key-type)
|
(list "--key-type" key-type)
|
||||||
(append-map (lambda (subject)
|
(append-map (lambda (subject)
|
||||||
(list "-d" subject))
|
(list "-d" subject))
|
||||||
|
|||||||
Reference in New Issue
Block a user