Skip to content

Commit

Permalink
Remove unnecessary headers
Browse files Browse the repository at this point in the history
  • Loading branch information
chelseacheung committed Jan 26, 2017
1 parent 2e36935 commit 7eb6e2c
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 100 deletions.
21 changes: 7 additions & 14 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,10 @@ Step 1 – Environment setup
^^^^^^^^^^^^^^^^^^^^^^^^^^
Install all the prerequisite items. The rest of this guide assumes that they are all running on the same machine.

Step 2 – Configuration
^^^^^^^^^^^^^^^^^^^^^^
Databases
"""""""""
Step 2 – Database Configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Postgres
''''''''
**Postgres**

#. Create a database user with username ``corvus`` and password ``corvus``.

Expand All @@ -114,8 +111,7 @@ Postgres
#. Enter the password ``corvus``
#. Repeat steps 2.3 - 2.4 for the ``ebms`` database.

MySQL
'''''
**MySQL**

1. Create two databases named ``as2`` and ``ebms`` with username ``corvus`` and password ``corvus``.

Expand All @@ -136,8 +132,7 @@ MySQL
#. Repeat steps 1.4 – 1.5 for the ``ebms`` database.

Oracle
''''''
**Oracle**

Oracle database creation involves a number of steps and custom parameters for different requirements for the database server. We propose the following reference as a guideline for creating an Oracle database for Hermes 2:

Expand Down Expand Up @@ -735,8 +730,7 @@ To further ensure the security of message transfers, secure channels are prefera
FAQ
---

Hermes 2 Deployment
^^^^^^^^^^^^^^^^^^^
**Hermes 2 Deployment**

Q1. The :file:`corvus.log` shows:

Expand All @@ -763,8 +757,7 @@ A2. Ensure PostgreSQL/MySQL/Oracle was installed properly and check the followin

:file:`{<HERMES2_HOME>}/plugins/hk.hku.cecid.ebms/conf/hk/hku/cecid/ebms/spa/conf/ebms.module.xml`. There is a tag in this file named ``parameter`` with the attribute ``name=url``. Check the ``value`` attribute to see if it references the correct server address. The format of the ``value`` attribute is the same as the JDBC connection string.

Web Service Usage Sample
^^^^^^^^^^^^^^^^^^^^^^^^
**Web Service Usage Sample**

Q1. The following exception is thrown:

Expand Down
92 changes: 46 additions & 46 deletions docs/source/message_signing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,94 +172,94 @@ Using Keytool
:program:`Keytool` is provided with Java SDK.


1. Invoke ``keytool`` with parameters
"""""""""""""""""""""""""""""""""""""
.. code-block:: sh
1. Invoke ``keytool`` with parameters.

.. code-block:: sh
keytool -genkey -alias {key-alias} -keyalg RSA -keystore {filepath-and-name-of-keystore} -storetype pkcs12 -storepass {password} -keypass {password}
keytool -genkey -alias {key-alias} -keyalg RSA -keystore {filepath-and-name-of-keystore} -storetype pkcs12 -storepass {password} -keypass {password}
The same password value is used for ``keypass`` and ``storepass`` in this command.
The same password value is used for ``keypass`` and ``storepass`` in this command.

.. image:: /_static/images/message_signing/keytool_command.png
.. image:: /_static/images/message_signing/keytool_command.png


2. Input more detailed information
""""""""""""""""""""""""""""""""""
.. image:: /_static/images/message_signing/keytool_command_detail.png
#. Input more detailed information.

After entering the information, a keystore will be created. It can be verified using :program:`Keytool`.
.. image:: /_static/images/message_signing/keytool_command_detail.png

.. code-block:: sh
After entering the information, a keystore will be created. It can be verified using :program:`Keytool`.

.. code-block:: sh
keytool -list -keystore {filepath-and-name-of-keystore} -storetype pkcs12
keytool -list -keystore {filepath-and-name-of-keystore} -storetype pkcs12
The password specified in the ``storepass`` attribute is needed to access the keystore.
The password specified in the ``storepass`` attribute is needed to access the keystore.

.. image:: /_static/images/message_signing/keytool_list_keystore.png
.. image:: /_static/images/message_signing/keytool_list_keystore.png


3. Export certificate
"""""""""""""""""""""
The private key has been generated and stored in the keystore, but a public certificate is still needed for the receiver to verify signatures.
#. Export certificate.

.. code-block:: sh
The private key has been generated and stored in the keystore, but a public certificate is still needed for the receiver to verify signatures.

.. code-block:: sh
keytool -exportcert -alias {key-alias} -keystore {filepath-and-name-of-keystore} -storetype pkcs12 -file {filepath-and-name-of-certificate}
keytool -exportcert -alias {key-alias} -keystore {filepath-and-name-of-keystore} -storetype pkcs12 -file {filepath-and-name-of-certificate}
Enter the password specified in the ``storepass`` attribute to access the keystore.
Enter the password specified in the ``storepass`` attribute to access the keystore.

.. image:: /_static/images/message_signing/keytool_generate_certificate.png
.. image:: /_static/images/message_signing/keytool_generate_certificate.png

The certificate can be verified with the following command:
The certificate can be verified with the following command:

.. code-block:: sh
.. code-block:: sh
keytool -printcert -file {filepath-and-name-of-certificate}
keytool -printcert -file {filepath-and-name-of-certificate}
.. image:: /_static/images/message_signing/keytool_printcert.png
.. image:: /_static/images/message_signing/keytool_printcert.png


Using OpenSSL
^^^^^^^^^^^^^
:program:`OpenSSL` can be found `here <https://www.openssl.org/>`_.


1. Generate private key
"""""""""""""""""""""""
Invoke ``openssl`` to enter the :program:`OpenSSL` environment, then execute the following:
1. Generate private key.

.. code-block:: sh
Invoke ``openssl`` to enter the :program:`OpenSSL` environment, then execute the following:

.. code-block:: sh
genrsa -out {filepath-and-name-of-key} {length-in-bits}
genrsa -out {filepath-and-name-of-key} {length-in-bits}
.. image:: /_static/images/message_signing/openssl_genrsa_1024.png
.. image:: /_static/images/message_signing/openssl_genrsa_1024.png


2. Generate certificate signing request
"""""""""""""""""""""""""""""""""""""""
.. code-block:: sh
#. Generate certificate signing request.

.. code-block:: sh
req -new -key {filepath-and-name-of-key} -out {filepath-and-name-of-signing-request}
req -new -key {filepath-and-name-of-key} -out {filepath-and-name-of-signing-request}
.. image:: /_static/images/message_signing/openssl_create_csr.png
.. image:: /_static/images/message_signing/openssl_create_csr.png


3. Generate self-signed certificate
"""""""""""""""""""""""""""""""""""
.. code-block:: sh
#. Generate self-signed certificate.

.. code-block:: sh
x509 -req -days {number-of-days-valid} -in {filepath-and-name-of-signing-request} -signkey {filepath-and-name-of-key} -sha1 -out {filepath-and-name-of-certificate}
x509 -req -days {number-of-days-valid} -in {filepath-and-name-of-signing-request} -signkey {filepath-and-name-of-key} -sha1 -out {filepath-and-name-of-certificate}
.. image:: /_static/images/message_signing/openssl_gen_cert.png
.. image:: /_static/images/message_signing/openssl_gen_cert.png


4. Export to keystore in PKCS12 format
""""""""""""""""""""""""""""""""""""""
.. code-block:: sh
#. Export to keystore in PKCS12 format.

.. code-block:: sh
pkcs12 -name {key-alias} -export -in {filepath-and-name-of-certificate} -inkey {filepath-and-name-of-key} -out {filepath-and-name-of-keystore}
pkcs12 -name {key-alias} -export -in {filepath-and-name-of-certificate} -inkey {filepath-and-name-of-key} -out {filepath-and-name-of-keystore}
.. image:: /_static/images/message_signing/openssl_pkcs12.png
.. image:: /_static/images/message_signing/openssl_pkcs12.png



Expand Down

0 comments on commit 7eb6e2c

Please sign in to comment.