Showing posts with label certificate. Show all posts
Showing posts with label certificate. Show all posts

Friday, July 15, 2016

Using openssl to test SSL connection

Install openssl


Connect to server


openssl s_client -connect youserver.com:443 -showcerts


CONNECTED(00000164)
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify return:1
depth=1 C = US, O = GeoTrust Inc., CN = RapidSSL SHA256 CA
verify return:1
depth=0 CN = yourserver.com
verify return:1
---
Certificate chain
 0 s:/CN=yourserver.com
   i:/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
 1 s:/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
---
Server certificate
subject=/CN=yourserver.com
issuer=/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA
---
No client certificate CA names sent
Peer signing digest: SHA1
Server Temp Key: ECDH, P-521, 521 bits
---
SSL handshake has read 3100 bytes and written 558 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-SHA384
    Session-ID: ED280000CF500FD12BFD3637345041B63883D2BE08BB1E94B6E5DDBD18AD0C7A
    Session-ID-ctx:
    Master-Key: E0DCBBE41656F4118954F91B9E9B63BEF98576173C5BC48DF8B62446F0357700FC86C1BA6157EC7BCFCF
20EB485897B5
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1468613406
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)

Send HTTP commands

GET / HTTP/1.1
Host: youserver.com

Monday, March 7, 2016

Creating self signed certificates with makecert.exe for development

Creating self signed certificates with makecert.exe for development


makecert.exe ^
-n "CN=CARoot" ^
-r ^
-pe ^
-a sha512 ^
-len 4096 ^
-cy authority ^
-sv CARoot.pvk ^
CARoot.cer

pvk2pfx.exe ^
-pvk CARoot.pvk ^
-spc CARoot.cer ^
-pfx CARoot.pfx ^
-po Test123



Source