Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Script to download SSL certs.

  • Loading branch information...
commit 23ed75467c764d5d34e8c064e5a11b8557df31ef 1 parent 6b83537
@fwenzel authored
Showing with 24 additions and 2 deletions.
  1. +6 −2 README.md
  2. +18 −0 download_ssl_certs.sh
View
8 README.md
@@ -12,9 +12,11 @@ Contents
This toolkit contains:
-* .fetchmailrc file to download gmail data via POP3 and pass it into procmail.
-* .procmailrc file to place fetched email into a backup directory in Maildir
+* ``.fetchmailrc`` file to download gmail data via POP3 and pass it into procmail.
+* ``.procmailrc`` file to place fetched email into a backup directory in Maildir
format.
+* ``download_ssl_certs.sh``: Simple script to download SSL certificates for
+ pop.gmail.com and its root CA.
* maildir-deduplicate script to identify and remove duplicate messages once
downloaded.
@@ -29,6 +31,8 @@ me.
Thanks to the following people/sources for their great code and documentation:
+* [Ali Rantakari](http://hasseg.org/blog/post/161/gmail-backups-with-fetchmail-on-os-x/)
+ for a good manual configuration howto for backing up gmail.
* [maildir-deduplicate](https://github.com/kdeldycke/scripts/blob/master/maildir-deduplicate.py)
by Kevid Deldycke. GPL.
View
18 download_ssl_certs.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Usage: download_ssl_certs.sh
+# Downloads pop.gmail.com cert and CA cert to ~/.ssl/certs
+
+CERTDIR=$HOME/.ssl/certs
+
+mkdir -p $CERTDIR
+pushd $CERTDIR
+
+# Extract GMail and root cert.
+echo | openssl s_client -connect pop.gmail.com:995 2>&1 |\
+ sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > gmailpop.pem
+wget -O equifax.pem "https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.cer"
+
+# Rehash certs.
+c_rehash $CERTDIR
+popd
Please sign in to comment.
Something went wrong with that request. Please try again.