X-Git-Url: https://git.distorted.org.uk/~mdw/ca/blobdiff_plain/69ab55f79b5b6109be503ff8d61fba82b1468360..1f46e0424b4431efa6b2521d82dc8ed371bb10d2:/bin/add?ds=sidebyside diff --git a/bin/add b/bin/add index 1c2ae81..cb4ecf0 100755 --- a/bin/add +++ b/bin/add @@ -1,4 +1,4 @@ -#! /usr/bin/tclsh8.5 +#! /usr/bin/tclsh ### -*-tcl-*- ### ### Insert a certificate request into the database. @@ -70,14 +70,14 @@ db transaction { ## Check whether the profile exists. if {![db exists { - SELECT 1 FROM profile WHERE label = $profile; + SELECT 1 FROM profile WHERE label = $profile AND tombstone = 0; }]} { error "unknown profile `$profile'" } ## Copy the file away. fresh-temp "$CERTROOT/tmp" tmp { - file copy $file $tmp + exec openssl req -text -in $file -out $tmp } cleanup { file delete $tmp } @@ -109,3 +109,6 @@ db transaction { ## Issue a shiny new certificate. issue-cert $id [now] } + +## Publish any necessary changes. +update-hook