~mdw
/
ca
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/func.tcl: Stupid long-standing typo in `sync-profiles'.
[ca]
/
lib
/
func.tcl
diff --git
a/lib/func.tcl
b/lib/func.tcl
index
ece7e5b
..
9e03b5b
100644
(file)
--- a/
lib/func.tcl
+++ b/
lib/func.tcl
@@
-86,6
+86,11
@@
array unset P
set C(ca-period) 3650
set C(archive-interval) 32
set C(ca-period) 3650
set C(archive-interval) 32
+## The update hook function.
+proc update-hook {} {
+ ## Called by `bin/update': might publish data to a web server, for example.
+}
+
## Read the user configuration.
if {[file exists "$CERTROOT/etc/config.tcl"]} {
source "$CERTROOT/etc/config.tcl"
## Read the user configuration.
if {[file exists "$CERTROOT/etc/config.tcl"]} {
source "$CERTROOT/etc/config.tcl"
@@
-321,7
+326,7
@@
proc next-matching-date* {pat refvar i} {
{^\d+$} {
## A numeric literal. If it's within bounds then set it; otherwise
## we'll have to start from the beginning.
{^\d+$} {
## A numeric literal. If it's within bounds then set it; otherwise
## we'll have to start from the beginning.
- if {$p < $n || $p > $max} { return step }
+ if {$p < $n
n
|| $p > $max} { return step }
set nn $p
}
set nn $p
}
@@
-420,7
+425,7
@@
proc sync-profiles {} {
UPDATE profile SET
extensions = $d(extensions),
issue_time = $d(issue-time),
UPDATE profile SET
extensions = $d(extensions),
issue_time = $d(issue-time),
- start_skew = $(start-skew),
+ start_skew = $
d
(start-skew),
expire_interval = $d(expire-interval),
tombstone = 0
WHERE label = $p;
expire_interval = $d(expire-interval),
tombstone = 0
WHERE label = $p;
@@
-443,10
+448,10
@@
proc sync-profiles {} {
proc req-key-hash {file} {
## Return the key hash from the certificate request in FILE.
proc req-key-hash {file} {
## Return the key hash from the certificate request in FILE.
- return [exec \
+ return [
lindex [
exec \
openssl req -in $file -noout -pubkey | \
openssl rsa 2>/dev/null -pubin -outform der | \
openssl req -in $file -noout -pubkey | \
openssl rsa 2>/dev/null -pubin -outform der | \
- openssl dgst -sha256 -hex]
+ openssl dgst -sha256 -hex]
end]
}
proc req-dn {file} {
}
proc req-dn {file} {
@@
-461,10
+466,10
@@
proc req-dn {file} {
proc cert-key-hash {file} {
## Return the key hash from the certificate in FILE.
proc cert-key-hash {file} {
## Return the key hash from the certificate in FILE.
- return [exec \
+ return [
lindex [
exec \
openssl x509 -in $file -noout -pubkey | \
openssl rsa 2>/dev/null -pubin -outform der | \
openssl x509 -in $file -noout -pubkey | \
openssl rsa 2>/dev/null -pubin -outform der | \
- openssl dgst -sha256 -hex]
+ openssl dgst -sha256 -hex]
end]
}
proc cert-dn {file} {
}
proc cert-dn {file} {