File: run.sh

package info (click to toggle)
certmonger 0.75.14-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,540 kB
  • ctags: 2,176
  • sloc: ansic: 41,340; sh: 9,551; makefile: 528; python: 207; xml: 190; sed: 16
file content (53 lines) | stat: -rwxr-xr-x 1,115 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash -e

cd "$tmpdir"
CERTMONGER_CONFIG_DIR=$tmpdir; export CERTMONGER_CONFIG_DIR

source "$srcdir"/functions

echo '['Empty file.']'
cat > certmonger.conf << EOF
EOF
$toolsdir/prefs

echo '['Empty defaults.']'
cat > certmonger.conf << EOF
[defaults]
EOF
$toolsdir/prefs

echo '['Other settings.']'
cat > certmonger.conf << EOF
[defaults]
cipher = aes256
digest = sha-1
ttls = 30 60 90
notification_method = mail
notification_destination = root
EOF
$toolsdir/prefs

echo '['Other settings.']'
cat > certmonger.conf << EOF
[defaults]
cipher = aes128
digest = sha512
ttls = 1d 14d 7d 28d 1y
notification_method = mail
notification_destination = root
EOF
# Accept 366*24*60*60 as a valid substitute for 365*24*60*60 when computing
# seconds-until-it's-one-year-from-now
$toolsdir/prefs | sed -e 's,31622400$,31536000,g'

echo '['TTL settings compatibility and notification commands.']'
cat > certmonger.conf << EOF
[defaults]
enroll_ttls = 1d 14d 7d 28d
notify_ttls = 1d 14d 7d
notification_method = command
notification_destination = logger "The sky is falling!"
EOF
$toolsdir/prefs

echo '['Test complete.']'