From daa6ca8b5e23276e1da2d81ae2f2ac7dc8b69b0d Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Thu, 26 Jul 2012 13:39:21 +0200 Subject: [PATCH] added documentation for ssl options --- Doxygen/Examples.ArangoDB/openssl-ciphers | 8 ++ Doxygen/Examples.ArangoDB/openssl-options | 9 ++ Doxygen/Examples.ArangoDB/server-keyfile | 10 +++ .../Examples.ArangoDB/server-keyfile-openssl | 17 ++++ .../Documentation/command-line-options.dox | 26 +++++- arangod/RestServer/ArangoServer.h | 2 +- lib/HttpsServer/ApplicationHttpsServer.h | 87 ++++++++++++++++++- 7 files changed, 155 insertions(+), 4 deletions(-) create mode 100644 Doxygen/Examples.ArangoDB/openssl-ciphers create mode 100644 Doxygen/Examples.ArangoDB/openssl-options create mode 100644 Doxygen/Examples.ArangoDB/server-keyfile create mode 100644 Doxygen/Examples.ArangoDB/server-keyfile-openssl diff --git a/Doxygen/Examples.ArangoDB/openssl-ciphers b/Doxygen/Examples.ArangoDB/openssl-ciphers new file mode 100644 index 0000000000..068db8041f --- /dev/null +++ b/Doxygen/Examples.ArangoDB/openssl-ciphers @@ -0,0 +1,8 @@ +> openssl ciphers -v + +ECDHE-RSA-AES256-SHA SSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1 +ECDHE-ECDSA-AES256-SHA SSLv3 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA1 +DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1 +DHE-DSS-AES256-SHA SSLv3 Kx=DH Au=DSS Enc=AES(256) Mac=SHA1 +DHE-RSA-CAMELLIA256-SHA SSLv3 Kx=DH Au=RSA Enc=Camellia(256) Mac=SHA1 +... diff --git a/Doxygen/Examples.ArangoDB/openssl-options b/Doxygen/Examples.ArangoDB/openssl-options new file mode 100644 index 0000000000..532b8af543 --- /dev/null +++ b/Doxygen/Examples.ArangoDB/openssl-options @@ -0,0 +1,9 @@ +> grep "#define SSL_OP_.*" /usr/include/openssl/ssl.h + +#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L +#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L +#define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004L +#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L +#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x00000010L +#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L +... diff --git a/Doxygen/Examples.ArangoDB/server-keyfile b/Doxygen/Examples.ArangoDB/server-keyfile new file mode 100644 index 0000000000..46539d0a7a --- /dev/null +++ b/Doxygen/Examples.ArangoDB/server-keyfile @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE----- + +(base64 encoded certificate) + +-----END CERTIFICATE----- +-----BEGIN RSA PRIVATE KEY----- + +(base64 encoded private key) + +-----END RSA PRIVATE KEY----- diff --git a/Doxygen/Examples.ArangoDB/server-keyfile-openssl b/Doxygen/Examples.ArangoDB/server-keyfile-openssl new file mode 100644 index 0000000000..c85a30f4ca --- /dev/null +++ b/Doxygen/Examples.ArangoDB/server-keyfile-openssl @@ -0,0 +1,17 @@ +# create private key in file "server.key" +openssl genrsa -des3 -out server.key 1024 + +# create certificate signing request (csr) in file "server.csr" +openssl req -new -key server.key -out server.csr + +# copy away original private key to "server.key.org" +cp server.key server.key.org + +# remove passphrase from the private key +openssl rsa -in server.key.org -out server.key + +# sign the csr with the key, creates certificate file "server.crt" +openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt + +# combine certificate and key into single file "ssl.keyfile" +cat server.crt server.key > ssl.keyfile diff --git a/arangod/Documentation/command-line-options.dox b/arangod/Documentation/command-line-options.dox index 7b29f42ccd..8b18e71c91 100644 --- a/arangod/Documentation/command-line-options.dox +++ b/arangod/Documentation/command-line-options.dox @@ -47,6 +47,12 @@ ///