summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-01-08 23:37:48 +0100
committerJan Pokorný <jpokorny@redhat.com>2014-01-08 23:37:48 +0100
commitb99c17b6e0709767122fee9699ace094c415cacc (patch)
tree19b3b0e84f0ff2fe150ae897ece8758db67c294d /scripts
parent87c9392d7c81de68ca899ccf0f6e983f5aa54e65 (diff)
downloaddotfiles-b99c17b6e0709767122fee9699ace094c415cacc.tar.gz
dotfiles-b99c17b6e0709767122fee9699ace094c415cacc.tar.xz
dotfiles-b99c17b6e0709767122fee9699ace094c415cacc.zip
Cert scripts: move some path defs to a separate file
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/certs/cert-def2
-rwxr-xr-xscripts/certs/cert-import14
2 files changed, 8 insertions, 8 deletions
diff --git a/scripts/certs/cert-def b/scripts/certs/cert-def
index 40b2092..30e1434 100644
--- a/scripts/certs/cert-def
+++ b/scripts/certs/cert-def
@@ -1 +1,3 @@
HOMEBUNDLE=${HOME}/.pki/tls/certs/ca-bundle.crt
+CA_BUNDLE_MUTT=${HOME}/.pki/tls/certs/ca-bundle-mutt.crt
+CA_BUNDLE_NPM=${HOME}/.pki/tls/certs/ca-bundle-npm.crt
diff --git a/scripts/certs/cert-import b/scripts/certs/cert-import
index 60d6423..14cb7d4 100755
--- a/scripts/certs/cert-import
+++ b/scripts/certs/cert-import
@@ -10,11 +10,9 @@
source cert-check
-MUTT_CERTIFICATES=~/.mutt_certificates
-
cert_import_homebundle() {
[ "$1" != "1" ] && return
- echo "Adding to homebundle" >&2
+ echo "Adding to default home bundle" >&2
mkdir -p "$(dirname ${HOMEBUNDLE})"
cp ${HOMEBUNDLE}{,.$(date '+%y%m%d%H%M%s')}
cat >>${HOMEBUNDLE}
@@ -22,17 +20,17 @@ cert_import_homebundle() {
cert_import_mutt() {
[ "$1" != "1" ] && return
- echo "Adding to mutt" >&2
- mkdir -p "$(dirname ${MUTT_CERTIFICATES})"
- cp ${MUTT_CERTIFICATES}{,.$(date '+%y%m%d%H%M%s')}
- cat >>${MUTT_CERTIFICATES}
+ echo "Adding to mutt bundle" >&2
+ mkdir -p "$(dirname "${CA_BUNDLE_MUTT}")"
+ cp ${CA_BUNDLE_MUTT}{,.$(date '+%y%m%d%H%M%s')}
+ cat >>${CA_BUNDLE_MUTT}
}
cert_import_firefox() {
# XXX: stdin is consumed in the first profile found
# XXX: explore certificate to get a proper name (-n) for it
[ "$1" != "1" ] && return
- echo "Adding to firefox" >&2
+ echo "Adding to firefox bundle" >&2
for d in $(find ~/.mozilla/firefox/ -maxdepth 1 -mindepth 1 -type d); do
grep -qs $(basename $d) ~/.mozilla/firefox/profiles.ini \
&& certutil -A -n "cert-import:$(date +'%y%m%d%H%M%S')" -t C,p,p -d $d \