Web services: Difference between revisions

Jump to navigation Jump to search
iwu
 
Line 7: Line 7:


1. Create a secure key for CSR
1. Create a secure key for CSR
<syntaxhighlight lang="bash">
<source lang="bash" highlight="1">
# openssl genrsa -des3 -out server.key 2048
$ openssl genrsa -des3 -out server.key 2048
Generating RSA private key, 2048 bit long modulus
Generating RSA private key, 2048 bit long modulus
.....................+++
.....................+++
Line 15: Line 15:
Enter pass phrase for server.key:
Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:
</syntaxhighlight>
</source>


2. Create an insecure key for CSR sourcing from the secure one
2. Create an insecure key for CSR sourcing from the secure one
<syntaxhighlight lang="bash">
<source lang="bash" highlight="1">
# openssl rsa -in server.key -out server.key.insecure
$ openssl rsa -in server.key -out server.key.insecure
Enter pass phrase for server.key:
Enter pass phrase for server.key:
writing RSA key
writing RSA key
</syntaxhighlight>
</source>


3. Rename the keys
3. Rename the keys
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# mv server.key server.key.secure
$ mv server.key server.key.secure
# mv server.key.insecure server.key
$ mv server.key.insecure server.key
</syntaxhighlight>
</syntaxhighlight>


4. Create the CSR
4. Create the CSR
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash" highlight="1">
# openssl req -new -key server.key -out server.csr
$ openssl req -new -key server.key -out server.csr
</syntaxhighlight>
</syntaxhighlight>

Navigation menu