From 5079615e6998a10704a97d17f33e602808e04c90 Mon Sep 17 00:00:00 2001 From: Timothy Prepscius Date: Fri, 9 Aug 2013 16:43:59 -0400 Subject: [PATCH] adds the directory structure for keys used by various functions --- keys/.gitignore | 10 ++++++++++ keys/apk/this-is-for-android | 0 keys/apns/this-is-your-push-certificate-with-apns | 0 keys/certificates/this-is-your-xcode-certificate | 0 keys/client/make | 3 +++ keys/james/final/post-process | 4 ++++ keys/james/make | 2 ++ ...this-is-the-official-mail-server-ssl-certificates | 0 keys/key/make | 3 +++ keys/localrelay/make | 3 +++ .../this-is-the-key-file-for-the-web-mail-submission | 0 keys/mail/make | 3 +++ keys/nginx/clean | 2 ++ keys/nginx/convert | 12 ++++++++++++ ...erver-ssl-certificate-modified-to-work-with-nginx | 0 keys/push/make | 3 +++ 16 files changed, 45 insertions(+) create mode 100644 keys/.gitignore create mode 100644 keys/apk/this-is-for-android create mode 100644 keys/apns/this-is-your-push-certificate-with-apns create mode 100644 keys/certificates/this-is-your-xcode-certificate create mode 100755 keys/client/make create mode 100755 keys/james/final/post-process create mode 100755 keys/james/make create mode 100644 keys/james/this-is-the-official-mail-server-ssl-certificates create mode 100755 keys/key/make create mode 100755 keys/localrelay/make create mode 100644 keys/localrelay/this-is-the-key-file-for-the-web-mail-submission create mode 100755 keys/mail/make create mode 100755 keys/nginx/clean create mode 100755 keys/nginx/convert create mode 100644 keys/nginx/this-is-the-mail-server-ssl-certificate-modified-to-work-with-nginx create mode 100755 keys/push/make diff --git a/keys/.gitignore b/keys/.gitignore new file mode 100644 index 0000000..c6a1c50 --- /dev/null +++ b/keys/.gitignore @@ -0,0 +1,10 @@ +*.jks +*.crt +*.b64 +*.p12 +*.csr +*.keystore + +*.cer +*.key +*.certSigningRequest diff --git a/keys/apk/this-is-for-android b/keys/apk/this-is-for-android new file mode 100644 index 0000000..e69de29 diff --git a/keys/apns/this-is-your-push-certificate-with-apns b/keys/apns/this-is-your-push-certificate-with-apns new file mode 100644 index 0000000..e69de29 diff --git a/keys/certificates/this-is-your-xcode-certificate b/keys/certificates/this-is-your-xcode-certificate new file mode 100644 index 0000000..e69de29 diff --git a/keys/client/make b/keys/client/make new file mode 100755 index 0000000..b70d645 --- /dev/null +++ b/keys/client/make @@ -0,0 +1,3 @@ +keytool -genkeypair -alias client -keyalg RSA -keysize 2048 -keystore keystore.jks +keytool -export -alias client -keystore keystore.jks -rfc -file selfsignedcert.cer +keytool -import -alias client -file selfsignedcert.cer -keystore truststore.jks diff --git a/keys/james/final/post-process b/keys/james/final/post-process new file mode 100755 index 0000000..d1d296e --- /dev/null +++ b/keys/james/final/post-process @@ -0,0 +1,4 @@ +cp ../mail_mailiverse_com.jks . +#keytool -import -trustcacerts -alias root -file ../mail_mailiverse_com/AddTrustExternalCARoot.crt -keystore mail_mailiverse_com.jks +keytool -import -trustcacerts -alias POSITIVESSL -file ../mail_mailiverse_com/PositiveSSLCA2.crt -keystore mail_mailiverse_com.jks +keytool -import -trustcacerts -alias james -file ../mail_mailiverse_com/mail_mailiverse_com.crt -keystore mail_mailiverse_com.jks diff --git a/keys/james/make b/keys/james/make new file mode 100755 index 0000000..7655c59 --- /dev/null +++ b/keys/james/make @@ -0,0 +1,2 @@ +keytool -genkeypair -alias james -keyalg RSA -keysize 2048 -keystore mail_mailiverse_com.jks +keytool -certreq -alias james -keyalg RSA -file mail_mailiverse_com.csr -keystore mail_mailiverse_com.jks diff --git a/keys/james/this-is-the-official-mail-server-ssl-certificates b/keys/james/this-is-the-official-mail-server-ssl-certificates new file mode 100644 index 0000000..e69de29 diff --git a/keys/key/make b/keys/key/make new file mode 100755 index 0000000..a8d860f --- /dev/null +++ b/keys/key/make @@ -0,0 +1,3 @@ +keytool -genkeypair -alias piratekey -keyalg RSA -keysize 2048 -keystore keystore.jks +keytool -export -alias piratekey -keystore keystore.jks -rfc -file selfsignedcert.cer +keytool -import -alias piratekey -file selfsignedcert.cer -keystore truststore.jks diff --git a/keys/localrelay/make b/keys/localrelay/make new file mode 100755 index 0000000..972242d --- /dev/null +++ b/keys/localrelay/make @@ -0,0 +1,3 @@ +keytool -genkeypair -alias localrelay.mailiverse -keyalg RSA -keysize 2048 -keystore keystore.jks +keytool -export -alias localrelay.mailiverse -keystore keystore.jks -rfc -file selfsignedcert.cer +keytool -import -alias localrelay.mailiverse -file selfsignedcert.cer -keystore truststore.jks diff --git a/keys/localrelay/this-is-the-key-file-for-the-web-mail-submission b/keys/localrelay/this-is-the-key-file-for-the-web-mail-submission new file mode 100644 index 0000000..e69de29 diff --git a/keys/mail/make b/keys/mail/make new file mode 100755 index 0000000..660cfd0 --- /dev/null +++ b/keys/mail/make @@ -0,0 +1,3 @@ +keytool -genkeypair -alias piratemail -keyalg RSA -keysize 2048 -keystore keystore.jks +keytool -export -alias piratemail -keystore keystore.jks -rfc -file selfsignedcert.cer +keytool -import -alias piratemail -file selfsignedcert.cer -keystore truststore.jks diff --git a/keys/nginx/clean b/keys/nginx/clean new file mode 100755 index 0000000..bd5bf18 --- /dev/null +++ b/keys/nginx/clean @@ -0,0 +1,2 @@ +rm store.* +rm final.* diff --git a/keys/nginx/convert b/keys/nginx/convert new file mode 100755 index 0000000..b3bf38b --- /dev/null +++ b/keys/nginx/convert @@ -0,0 +1,12 @@ +set -x + +JKSSTORE=mail_mailiverse_com.jks +cp $JKSSTORE store.jks + +keytool -importkeystore -srckeystore store.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore store.p12 +openssl pkcs12 -in store.p12 -nocerts -out store.key +openssl rsa -in store.key -out final.key + +cat mail_mailiverse_com.crt > final.crt +cat PositiveSSLCA2.crt >> final.crt +cat AddTrustExternalCARoot.crt >> final.crt diff --git a/keys/nginx/this-is-the-mail-server-ssl-certificate-modified-to-work-with-nginx b/keys/nginx/this-is-the-mail-server-ssl-certificate-modified-to-work-with-nginx new file mode 100644 index 0000000..e69de29 diff --git a/keys/push/make b/keys/push/make new file mode 100755 index 0000000..b70d645 --- /dev/null +++ b/keys/push/make @@ -0,0 +1,3 @@ +keytool -genkeypair -alias client -keyalg RSA -keysize 2048 -keystore keystore.jks +keytool -export -alias client -keystore keystore.jks -rfc -file selfsignedcert.cer +keytool -import -alias client -file selfsignedcert.cer -keystore truststore.jks