Openssl 05 2001
Openssl 05 2001
Onno W. Purbo
[email protected]
Reference
http://www.openssl.org
http://www.linuxdoc.org
http://www.redhat.com
OpenSSL
OpenSSL is a cryptography toolkit
implementing the Secure Sockets Layer
(SSL v2/v3) and Transport Layer
Security (TLS v1) network protocols and
related cryptography standards required
by them.
Private Key
make server.key
[root@linux conf]# make server.key
umask 77 ; \
/usr/bin/openssl genrsa -des3 -rand 1024 > server.key
0 semi-random bytes loaded
Generating RSA private key, 512 bit long modulus
...++++++++++++
..++++++++++++
e is 65537 (0x10001)
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:
More server.key
[root@linux conf]# more server.key
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,317BF4C50E1C590B
X/V5VDJxPg702miehbOCsumLf2QS9vpO2YxI9BLsNrtBkPyN363UEVQ9Hsrpct
mQhDa+/BXuUFqKtZcGJJef2kIhwqe1L5oW0RBRk5XJvOtVWkxobEuRq28f76+j
9+gtNW9O12tTXEg+nGR5KOWd+UEOCtLyCgs2YMfUwloGYzc26lw9n77VI7g0RC
ViiNdZLGWlg2ywFBXGVBHeuo2a8NHXxOTuFdPdBP0UCodknzd+Af761FZPJDg0
HEvFzHUpoEExn00NzBUj0YvkUMtOXi4Q9GNB1V7UUiAJNwUZXjbjRgbUXfSMcZ
ZY9LkHoc4cq5F4w+IN8O4KLkTfzLENdbbFP04R2BJ5ASx4r7GADaeCMaXUYuqU
DjP5gGDIG0lHXSnn31tPBZeVX+AcYEmDU2Zbch5PxPs=
-----END RSA PRIVATE KEY-----
Private Key
[root@linux conf]# openssl rsa -noout -text -in server.key
read RSA key
Enter PEM pass phrase:
Private-Key: (512 bit)
modulus:
00:a3:f6:5c:c5:39:72:54:80:41:94:6a:a0:ae:0c:
7c:eb:d8:ac:f5
publicExponent: 65537 (0x10001)
privateExponent:
10:08:c2:af:c2:db:6c:6a:12:7f:ba:21:b6:83:9e:
fa:e3:74:e1
prime1:
00:d3:a3:99:4f:43:ba:b3:97:a3:bc:58:e3:58:ce:
c6:9a:ad
prime2:
00:c6:54:77:29:cf:8d:8c:6a:f0:76:e5:61:db:c3:
33:ac:69
Testing s_client
S_client
[root@linux conf]# openssl s_client -host localhost -port 443
CONNECTED(00000003)
depth=0 /C=ID/ST=DKI/L=Jakarta/O=Free
Agent/OU=Owner/CN=www.purbo.org/Email=onno
@indo.net.id
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=ID/ST=DKI/L=Jakarta/O=Free
Agent/OU=Owner/CN=www.purbo.org/Email=onno
@indo.net.id
verify return:1
---
Certificate chain
0 s:/C=ID/ST=DKI/L=Jakarta/O=Free
Agent/OU=Owner/CN=www.purbo.org/[email protected]
i:/C=ID/ST=DKI/L=Jakarta/O=Free
Agent/OU=Owner/CN=www.purbo.org/[email protected]
S_client Command Line