First, an explanation of the command line options:> openssl req -new -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcsr.pem Generating a 1024 bit RSA private key ........++++++ ........++++++ writing new private key to 'hostkey.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:Illinois Locality Name (eg, city) []:Urbana Organization Name (eg, company) [Internet Widgits Pty Ltd]:NCSA Organizational Unit Name (eg, section) []:Security Research Division Common Name (eg, YOUR name) []:Terry Fleury Email Address []:tfleury@ncsa.uiuc.edu Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: >
Here's and explanation of the command line options:openssl req -x509 -days 365 -in hostcsr.pem -key hostkey.pem -out hostcert.pem
First, an explanation of the command line options:> openssl req -x509 -days 365 -newkey rsa:1024 -keyout hostkey.pem -nodes -out hostcert.pem Generating a 1024 bit RSA private key ........++++++ ........++++++ writing new private key to 'hostkey.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:Illinois Locality Name (eg, city) []:Urbana Organization Name (eg, company) [Internet Widgits Pty Ltd]:NCSA Organizational Unit Name (eg, section) []:Security Research Division Common Name (eg, YOUR name) []:www.ncsa.uiuc.edu Email Address []:webmaster@ncsa.uiuc.edu >
If you want to see the actual entries for this file, you can view the contents as text. Here's is a typical openssl command and the resulting output:-----BEGIN CERTIFICATE REQUEST----- MIIBhzCB8QIBADBIMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxDzAN BgNVBAcTBlVyYmFuYTEVMBMGA1UEAxMMVGVycnkgRmxldXJ5MIGfMA0GCSqGSIb3 DQEBAQUAA4GNADCBiQKBgQCo/Dod/sGiCSvi+OV295f3eLMMzPKnNjQKabVpGP3x 2bVHYuJTSz5Umq9DtsaBUMHVgwSCeCjfJAtaONERnJKg7yiyy3kdHgxYeqhoqDoJ kqZjoN+bOIZGlGs55ke5AqFYdeIaTAcgcxZMmeYZTdZ4n0cCvLHfcyTuKcGmtWsX +wIDAQABoAAwDQYJKoZIhvcNAQEFBQADgYEAVUelcfGlgus/OaTZgoePEmcvX4Lp 8ofE4sELbM8sg9xiXyw6yQ3e2T3HsYrJnOUUJkgOnL7zwDr29IQ1dG+ScjXKfxgB vr2jnwdNbX20YgLyt8ht6NiUE7tQ33zDcSGoi+V2OxSWpbRHnOl6lGdRdh3A1LQj wpM7Z5VjngNVfWM= -----END CERTIFICATE REQUEST-----
Here's an explanation of the command line options:> openssl req -text -noout -in hostcsr.pem Certificate Request: Data: Version: 0 (0x0) Subject: C=US, ST=Illinois, L=Urbana, CN=Terry Fleury Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:a8:fc:3a:1d:fe:c1:a2:09:2b:e2:f8:e5:76:f7: 97:f7:78:b3:0c:cc:f2:a7:36:34:0a:69:b5:69:18: fd:f1:d9:b5:47:62:e2:53:4b:3e:54:9a:af:43:b6: c6:81:50:c1:d5:83:04:82:78:28:df:24:0b:5a:38: d1:11:9c:92:a0:ef:28:b2:cb:79:1d:1e:0c:58:7a: a8:68:a8:3a:09:92:a6:63:a0:df:9b:38:86:46:94: 6b:39:e6:47:b9:02:a1:58:75:e2:1a:4c:07:20:73: 16:4c:99:e6:19:4d:d6:78:9f:47:02:bc:b1:df:73: 24:ee:29:c1:a6:b5:6b:17:fb Exponent: 65537 (0x10001) Attributes: a0:00 Signature Algorithm: sha1WithRSAEncryption 55:47:a5:71:f1:a5:82:eb:3f:39:a4:d9:82:87:8f:12:67:2f: 5f:82:e9:f2:87:c4:e2:c1:0b:6c:cf:2c:83:dc:62:5f:2c:3a: c9:0d:de:d9:3d:c7:b1:8a:c9:9c:e5:14:26:48:0e:9c:be:f3: c0:3a:f6:f4:84:35:74:6f:92:72:35:ca:7f:18:01:be:bd:a3: 9f:07:4d:6d:7d:b4:62:02:f2:b7:c8:6d:e8:d8:94:13:bb:50: df:7c:c3:71:21:a8:8b:e5:76:3b:14:96:a5:b4:47:9c:e9:7a: 94:67:51:76:1d:c0:d4:b4:23:c2:93:3b:67:95:63:9e:03:55: 7d:63 >
If you want to see the actual entries for this file, you can view the contents as text. Here's is a typical openssl command and the resulting output:-----BEGIN CERTIFICATE----- MIID1zCCA0CgAwIBAgIJAPznkOa+zeeLMA0GCSqGSIb3DQEBBQUAMIGkMQswCQYD VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsG A1UEChMETkNTQTEjMCEGA1UECxMaU2VjdXJpdHkgUmVzZWFyY2ggRGl2aXNpb24x GjAYBgNVBAMTEXd3dy5uY3NhLnVpdWMuZWR1MSEwHwYJKoZIhvcNAQkBFhJyb290 QG5jYXMudWl1Yy5lZHUwHhcNMDYwMzAxMTkzMDMxWhcNMDcwMzAxMTkzMDMxWjCB pDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMQ8wDQYDVQQHEwZVcmJh bmExDTALBgNVBAoTBE5DU0ExIzAhBgNVBAsTGlNlY3VyaXR5IFJlc2VhcmNoIERp dmlzaW9uMRowGAYDVQQDExF3d3cubmNzYS51aXVjLmVkdTEhMB8GCSqGSIb3DQEJ ARYScm9vdEBuY2FzLnVpdWMuZWR1MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB gQCy8/9Afil4C+wvFdm2p7w6sQsZolXJQ1J07VDySCoguXCi6sCR/AyJEr9E6jP3 50FsgFoMn4d0qhkBb6JwczJtJRPphZIvXTi0rrOzZpe0yTF17NWcc5XXn9M8MbR2 jS97pjJ2AyclvOgGN/nYIdEpBfGKJ0cLQr50rBEAu+GScQIDAQABo4IBDTCCAQkw HQYDVR0OBBYEFA9U2p42HR64xIK3uK9TqsuBYkorMIHZBgNVHSMEgdEwgc6AFA9U 2p42HR64xIK3uK9TqsuBYkoroYGqpIGnMIGkMQswCQYDVQQGEwJVUzERMA8GA1UE CBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsGA1UEChMETkNTQTEjMCEG A1UECxMaU2VjdXJpdHkgUmVzZWFyY2ggRGl2aXNpb24xGjAYBgNVBAMTEXd3dy5u Y3NhLnVpdWMuZWR1MSEwHwYJKoZIhvcNAQkBFhJyb290QG5jYXMudWl1Yy5lZHWC CQD855Dmvs3nizAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAAfq52g4 oMVFtzp52pMZevxov9HyJNpuWHOP7y7WHmuYzigDy5vOqJgPki3w3hkdprIKKIb5 7UPwfEZxrW4WwklWllcYV2/00ytZ9tf5GreGhM+AGKOZzv+fDQBtzLr4T4TOjpQO HtceiR1JeNNVHL+Y53cXbP6qKh0TYn8xVQH3 -----END CERTIFICATE-----
Here's an explanation of the command line options:> openssl x509 -text -noout -in hostcert.pem Certificate: Data: Version: 3 (0x2) Serial Number: fc:e7:90:e6:be:cd:e7:8b Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=Illinois, L=Urbana, O=NCSA, OU=Security Research Division, CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu Validity Not Before: Mar 1 19:30:31 2006 GMT Not After : Mar 1 19:30:31 2007 GMT Subject: C=US, ST=Illinois, L=Urbana, O=NCSA, OU=Security Research Division, CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:b2:f3:ff:40:7e:29:78:0b:ec:2f:15:d9:b6:a7: bc:3a:b1:0b:19:a2:55:c9:43:52:74:ed:50:f2:48: 2a:20:b9:70:a2:ea:c0:91:fc:0c:89:12:bf:44:ea: 33:f7:e7:41:6c:80:5a:0c:9f:87:74:aa:19:01:6f: a2:70:73:32:6d:25:13:e9:85:92:2f:5d:38:b4:ae: b3:b3:66:97:b4:c9:31:75:ec:d5:9c:73:95:d7:9f: d3:3c:31:b4:76:8d:2f:7b:a6:32:76:03:27:25:bc: e8:06:37:f9:d8:21:d1:29:05:f1:8a:27:47:0b:42: be:74:ac:11:00:bb:e1:92:71 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: 0F:54:DA:9E:36:1D:1E:B8:C4:82:B7:B8:AF:53:AA:CB:81:62:4A:2B X509v3 Authority Key Identifier: keyid:0F:54:DA:9E:36:1D:1E:B8:C4:82:B7:B8:AF:53:AA:CB:81:62:4A:2B DirName:/C=US/ST=Illinois/L=Urbana/O=NCSA/OU=Security Research Division/ CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu serial:FC:E7:90:E6:BE:CD:E7:8B X509v3 Basic Constraints: CA:TRUE Signature Algorithm: sha1WithRSAEncryption 07:ea:e7:68:38:a0:c5:45:b7:3a:79:da:93:19:7a:fc:68:bf: d1:f2:24:da:6e:58:73:8f:ef:2e:d6:1e:6b:98:ce:28:03:cb: 9b:ce:a8:98:0f:92:2d:f0:de:19:1d:a6:b2:0a:28:86:f9:ed: 43:f0:7c:46:71:ad:6e:16:c2:49:56:96:57:18:57:6f:f4:d3: 2b:59:f6:d7:f9:1a:b7:86:84:cf:80:18:a3:99:ce:ff:9f:0d: 00:6d:cc:ba:f8:4f:84:ce:8e:94:0e:1e:d7:1e:89:1d:49:78: d3:55:1c:bf:98:e7:77:17:6c:fe:aa:2a:1d:13:62:7f:31:55: 01:f7 >
Here's an explanation of the command line options:> openssl x509 -in cert.pem -noout -issuer -issuer_hash issuer= /C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu be7cee67 >
In this case, the two moduli are the same, thus the key.pem file was used to generate the cert.pem file. If you are running bash you can run the following test to easily see if the two moduli are the same:> openssl x509 -in cert.pem -noout -modulus Modulus=D44108D18FC92D916D8BA787EFBB43C1B7CE9BD38DB00C7A1AAE3750CB22D62EB3D5E4DF 09227A8926B96F90E1C34819E5EE6EEB466AE693D9AB10811AB8DDAB74A308B5FD6775D06D5F25DF E97B8680450F3D3215679D5E5348CE6CB340699E5A355A3E0315877BD8CB9B3A0C8A4FADB8EACFB6 14BA6D0518CAEC946FAE8B6D7FCFDB0D6A211B7EB2C8D27D5F02B2AB8FB023B8F5783D44E94BE804 7B6DFE0CB11333B90919C550B93F0D032BF3DF3DDF7AA3B9CBAFC7B685C9537E984291690AA1121A 106D36627D56E65773ECEF63A55934D40102DE6863F3E292EE8E9F06619DAB71FD22E1039F5C9F48 BC180123877213A21070BC8875F3C2242A6E3923 > openssl rsa -in key.pem -noout -modulus Modulus=D44108D18FC92D916D8BA787EFBB43C1B7CE9BD38DB00C7A1AAE3750CB22D62EB3D5E4DF 09227A8926B96F90E1C34819E5EE6EEB466AE693D9AB10811AB8DDAB74A308B5FD6775D06D5F25DF E97B8680450F3D3215679D5E5348CE6CB340699E5A355A3E0315877BD8CB9B3A0C8A4FADB8EACFB6 14BA6D0518CAEC946FAE8B6D7FCFDB0D6A211B7EB2C8D27D5F02B2AB8FB023B8F5783D44E94BE804 7B6DFE0CB11333B90919C550B93F0D032BF3DF3DDF7AA3B9CBAFC7B685C9537E984291690AA1121A 106D36627D56E65773ECEF63A55934D40102DE6863F3E292EE8E9F06619DAB71FD22E1039F5C9F48 BC180123877213A21070BC8875F3C2242A6E3923
if [ "`openssl x509 -in cert.pem -noout -modulus`" = \ "`openssl rsa -in key.pem -noout -modulus`" ]; \ then echo "Match"; else echo "Different"; fi
You would then rename the file cert.pem to be7cee67.0 and place it in the directory you specify for the "-CApath" option. Note that if you are on a *nix box, you can alternatively create a symbolic link to the cert.pem file using this hash value (with ".0" for filename extension) as link name. To do this, you would run the following command:> openssl x509 -noout -hash -in cert.pem be7cee67 >
> ln -s cert.pem `openssl x509 -noout -hash -in cert.pem`.0 >
When using bash:setenv OPENSSL_ALLOW_PROXY_CERTS 1
When using Windows command-shell cmd.exe:export OPENSSL_ALLOW_PROXY_CERTS=1
set OPENSSL_ALLOW_PROXY_CERTS=1
Here's an explanation of the command line options:> openssl x509 -subject -noout -in cert.pem subject= /C=US/O=NCSA/CN=Terry Fleury/emailAddress=tfleury@ncsa.uiuc.edu >
First, an explanation of the command line options:> openssl req -new -config csr.conf -out proxy.csr -keyout proxykey.pem Generating a 512 bit RSA private key .....++++++++++++ ..++++++++++++ writing new private key to 'proxykey.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name "C" (2 letter code) []:US State Name "ST" (full name) []: Locality Name "L" (eg, city) []: Organization Name "O" (eg, company) []:NCSA Organizational Unit Name "OU" (eg, section) []: Common Name "CN" (eg, YOUR name) []:Terry Fleury Email Address []:tfleury@ncsa.uiuc.edu Common Name "CN" (unique 8 digit number) []:73052638 >
Note that the backslash ('\') is a 'continuation character' and is utilized here to make this web page easier to read. When executing this command yourself, you can put all command line options on a single line.openssl x509 -req -md5 -CAcreateserial -in proxy.csr -days 1 \ -CA usercert.pem -CAkey userkey.pem -extfile csr.conf \ -extensions v3_proxy -out proxycert.pem
where USERNAME is your username. The name for this final proxy certificate is taken from the filename generated by the CoGKit's grid-proxy-init command. However, you are free to name the resulting proxy certificate file anything you like.cat proxycert.pem proxykey.pem usercert.pem > x509up_u_USERNAME
Here's an explanation of the command line options:> openssl genrsa -des3 -out key.pem 1024 Generating RSA private key, 1024 bit long modulus ......++++++ .................++++++ e is 65537 (0x10001) Enter pass phrase for key.pem: Verifying - Enter pass phrase for key.pem: >
Here's an explanation of the command line options:> openssl rsa -des3 -in hostkeyNOPASSWORD.pem -out hostkeySECURE.pem writing RSA key Enter PEM pass phrase: Verifying - Enter PEM pass phrase: >
Here's an explanation of the command line options:> openssl rsa -in hostkeySECURE.pem -out hostkeyNOPASSWORD.pem Enter pass phrase for hostkeySECURE.pem: writing RSA key >
First, an explanation of the command line options:> openssl pkcs12 -export -in cert.pem -inkey key.pem -out cred.p12 Enter Export Password: Verifying - Enter Export Password: >
First, an explanation of the command line options:> openssl pkcs12 -in cred.p12 -out certkey.pem -nodes -clcerts Enter Import Password: MAC verified OK >
While OpenSSL can handle both the certificate and the private key in a single file, it is often preferable to keep the two separate. There are two ways to make separate files for the certificate and the key.-----BEGIN CERTIFICATE----- MIID1zCCA0CgAwIBAgIJAPznkOa+zeeLMA0GCSqGSIb3DQEBBQUAMIGkMQswCQYD VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsG A1UEChMETkNTQTEjMCEGA1UECxMaU2VjdXJpdHkgUmVzZWFyY2ggRGl2aXNpb24x GjAYBgNVBAMTEXd3dy5uY3NhLnVpdWMuZWR1MSEwHwYJKoZIhvcNAQkBFhJyb290 QG5jYXMudWl1Yy5lZHUwHhcNMDYwMzAxMTkzMDMxWhcNMDcwMzAxMTkzMDMxWjCB pDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMQ8wDQYDVQQHEwZVcmJh bmExDTALBgNVBAoTBE5DU0ExIzAhBgNVBAsTGlNlY3VyaXR5IFJlc2VhcmNoIERp dmlzaW9uMRowGAYDVQQDExF3d3cubmNzYS51aXVjLmVkdTEhMB8GCSqGSIb3DQEJ ARYScm9vdEBuY2FzLnVpdWMuZWR1MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB gQCy8/9Afil4C+wvFdm2p7w6sQsZolXJQ1J07VDySCoguXCi6sCR/AyJEr9E6jP3 50FsgFoMn4d0qhkBb6JwczJtJRPphZIvXTi0rrOzZpe0yTF17NWcc5XXn9M8MbR2 jS97pjJ2AyclvOgGN/nYIdEpBfGKJ0cLQr50rBEAu+GScQIDAQABo4IBDTCCAQkw HQYDVR0OBBYEFA9U2p42HR64xIK3uK9TqsuBYkorMIHZBgNVHSMEgdEwgc6AFA9U 2p42HR64xIK3uK9TqsuBYkoroYGqpIGnMIGkMQswCQYDVQQGEwJVUzERMA8GA1UE CBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsGA1UEChMETkNTQTEjMCEG A1UECxMaU2VjdXJpdHkgUmVzZWFyY2ggRGl2aXNpb24xGjAYBgNVBAMTEXd3dy5u Y3NhLnVpdWMuZWR1MSEwHwYJKoZIhvcNAQkBFhJyb290QG5jYXMudWl1Yy5lZHWC CQD855Dmvs3nizAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAAfq52g4 oMVFtzp52pMZevxov9HyJNpuWHOP7y7WHmuYzigDy5vOqJgPki3w3hkdprIKKIb5 7UPwfEZxrW4WwklWllcYV2/00ytZ9tf5GreGhM+AGKOZzv+fDQBtzLr4T4TOjpQO HtceiR1JeNNVHL+Y53cXbP6qKh0TYn8xVQH3 -----END CERTIFICATE----- Bag Attributes localKeyID: 9B 8A 85 AF 89 9D EB B0 73 3A F8 F1 D3 F7 88 09 22 47 7C E3 Key Attributes: <No Attributes> -----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQCy8/9Afil4C+wvFdm2p7w6sQsZolXJQ1J07VDySCoguXCi6sCR /AyJEr9E6jP350FsgFoMn4d0qhkBb6JwczJtJRPphZIvXTi0rrOzZpe0yTF17NWc c5XXn9M8MbR2jS97pjJ2AyclvOgGN/nYIdEpBfGKJ0cLQr50rBEAu+GScQIDAQAB AoGATW7y9i8hNobCLiWgTT8LXcIZ8X+i6zGsTlgZ/JxpTjuvl29I4GJV8kIgbWuC DTUNxCtNy8SD0mF/7HUnrszJ9mKM52mrmKDLDNzvKY5J8Vl+u+7oNp7f8MViAIUK DvmUEG2RsA7boELYza6jrHRwEgB2Sk03ArW4M5jrS+/xYKECQQDoCOg7u1HcIj0t eugQmQABfR86N81dE48bILNQlhDjbHlyedmMOmDBMqFEE2ayfb3EtHUoaZ81YHcE 5aDDY8B1AkEAxW+Wy65LE2OnjIYjDSqHUrCpHxa6BrAS2OqYj0VSw1Fs5D4YHg/J Ku41T5tOkeVsuwQcrGDhWR3+E4I2CTwKjQJARxjbl9nYxlvTZQkg7F0FLG+bTupk SZ3Bnq1RZGLm/9hwCgyeBSKqHOiXk1VihVST/h7ROzXJ68AIF/8IWHZLNQJAfCns PJWU81GlqhMlcf8/8TnWcg252cDbaX1Hijp/jQPlJjkCs80bpxr9fd3e8JPG6Gny mlmm/oOFKMGnt/EBdQJBAJDVOMCPGolE06faCy6qpX6dYSVz1thc/Prvlss9CQAC GjxDIISsFw71r2h7XdV70oFeJ/r3uhXxbHRim9tFqsI= -----END RSA PRIVATE KEY-----
> openssl pkcs12 -in cred.p12 -out cert.pem -nodes -clcerts -nokeys Enter Import Password: MAC verified OK > openssl pkcs12 -in cred.p12 -out key.pem -nodes -nocerts Enter Import Password: MAC verified OK >
Here's an explanation of the command line options:> openssl pkcs12 -info -nodes -in cred.p12 Enter Import Password: MAC Iteration 2048 MAC verified OK PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048 Certificate bag Bag Attributes localKeyID: 9B 8A 85 AF 89 9D EB B0 73 3A F8 F1 D3 F7 88 09 22 47 7C E3 subject=/C=US/ST=Illinois/L=Urbana/O=NCSA/CN=Terry Fleury/emailAddress=tfleury@ncsa.uiuc.edu issuer=/C=US/ST=Illinois/L=Urbana/O=NCSA/CN=Terry Fleury/emailAddress=tfleury@ncsa.uiuc.edu -----BEGIN CERTIFICATE----- MIID1zCCA0CgAwIBAgIJAPznkOa+zeeLMA0GCSqGSIb3DQEBBQUAMIGkMQswCQYD VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsG A1UEChMETkNTQTEjMCEGA1UECxMaU2VjdXJpdHkgUmVzZWFyY2ggRGl2aXNpb24x GjAYBgNVBAMTEXd3dy5uY3NhLnVpdWMuZWR1MSEwHwYJKoZIhvcNAQkBFhJyb290 QG5jYXMudWl1Yy5lZHUwHhcNMDYwMzAxMTkzMDMxWhcNMDcwMzAxMTkzMDMxWjCB pDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMQ8wDQYDVQQHEwZVcmJh bmExDTALBgNVBAoTBE5DU0ExIzAhBgNVBAsTGlNlY3VyaXR5IFJlc2VhcmNoIERp dmlzaW9uMRowGAYDVQQDExF3d3cubmNzYS51aXVjLmVkdTEhMB8GCSqGSIb3DQEJ ARYScm9vdEBuY2FzLnVpdWMuZWR1MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB gQCy8/9Afil4C+wvFdm2p7w6sQsZolXJQ1J07VDySCoguXCi6sCR/AyJEr9E6jP3 50FsgFoMn4d0qhkBb6JwczJtJRPphZIvXTi0rrOzZpe0yTF17NWcc5XXn9M8MbR2 jS97pjJ2AyclvOgGN/nYIdEpBfGKJ0cLQr50rBEAu+GScQIDAQABo4IBDTCCAQkw HQYDVR0OBBYEFA9U2p42HR64xIK3uK9TqsuBYkorMIHZBgNVHSMEgdEwgc6AFA9U 2p42HR64xIK3uK9TqsuBYkoroYGqpIGnMIGkMQswCQYDVQQGEwJVUzERMA8GA1UE CBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsGA1UEChMETkNTQTEjMCEG A1UECxMaU2VjdXJpdHkgUmVzZWFyY2ggRGl2aXNpb24xGjAYBgNVBAMTEXd3dy5u Y3NhLnVpdWMuZWR1MSEwHwYJKoZIhvcNAQkBFhJyb290QG5jYXMudWl1Yy5lZHWC CQD855Dmvs3nizAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAAfq52g4 oMVFtzp52pMZevxov9HyJNpuWHOP7y7WHmuYzigDy5vOqJgPki3w3hkdprIKKIb5 7UPwfEZxrW4WwklWllcYV2/00ytZ9tf5GreGhM+AGKOZzv+fDQBtzLr4T4TOjpQO HtceiR1JeNNVHL+Y53cXbP6qKh0TYn8xVQH3 -----END CERTIFICATE----- PKCS7 Data Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048 Bag Attributes localKeyID: 9B 8A 85 AF 89 9D EB B0 73 3A F8 F1 D3 F7 88 09 22 47 7C E3 Key Attributes: <No Attributes> -----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQCy8/9Afil4C+wvFdm2p7w6sQsZolXJQ1J07VDySCoguXCi6sCR /AyJEr9E6jP350FsgFoMn4d0qhkBb6JwczJtJRPphZIvXTi0rrOzZpe0yTF17NWc c5XXn9M8MbR2jS97pjJ2AyclvOgGN/nYIdEpBfGKJ0cLQr50rBEAu+GScQIDAQAB AoGATW7y9i8hNobCLiWgTT8LXcIZ8X+i6zGsTlgZ/JxpTjuvl29I4GJV8kIgbWuC DTUNxCtNy8SD0mF/7HUnrszJ9mKM52mrmKDLDNzvKY5J8Vl+u+7oNp7f8MViAIUK DvmUEG2RsA7boELYza6jrHRwEgB2Sk03ArW4M5jrS+/xYKECQQDoCOg7u1HcIj0t eugQmQABfR86N81dE48bILNQlhDjbHlyedmMOmDBMqFEE2ayfb3EtHUoaZ81YHcE 5aDDY8B1AkEAxW+Wy65LE2OnjIYjDSqHUrCpHxa6BrAS2OqYj0VSw1Fs5D4YHg/J Ku41T5tOkeVsuwQcrGDhWR3+E4I2CTwKjQJARxjbl9nYxlvTZQkg7F0FLG+bTupk SZ3Bnq1RZGLm/9hwCgyeBSKqHOiXk1VihVST/h7ROzXJ68AIF/8IWHZLNQJAfCns PJWU81GlqhMlcf8/8TnWcg252cDbaX1Hijp/jQPlJjkCs80bpxr9fd3e8JPG6Gny mlmm/oOFKMGnt/EBdQJBAJDVOMCPGolE06faCy6qpX6dYSVz1thc/Prvlss9CQAC GjxDIISsFw71r2h7XdV70oFeJ/r3uhXxbHRim9tFqsI= -----END RSA PRIVATE KEY-----
The server will run until it receives a disconnect signal, for example by typing <CTRL>-C. There are many other options for the test server, such as requiring client certificates, starting a basic web server, disabling certain SSL or TLS protocols, etc. For a full list of command line options, run man s_server.> openssl s_server -accept 9000 -cert hostcert.pem -key hostkey.pem Using default temp DH parameters Using default temp ECDH parameters ACCEPT
You can see here that the server is using a self-signed certificate. Upon successful connection, the SSL channel is typically left open. Anything you type at this point will be sent to the server. To quit the client, you can either type <CTRL>-C or the single character "Q". There are many other options for the test client, such as using a client certificate, disabling certain SSL or TLS protocols, etc. For a full list of command line options, run man s_client.> openssl s_client -connect localhost:9000 -CApath /etc/grid-security/certificates CONNECTED(00000003) depth=0 /C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu verify error:num=18:self signed certificate verify return:1 depth=0 /C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu verify return:1 --- Certificate chain 0 s:/C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu i:/C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu --- Server certificate -----BEGIN CERTIFICATE----- MIIDdTCCAt6gAwIBAgIJAI+DwwKU64gxMA0GCSqGSIb3DQEBBQUAMIGEMQswCQYD VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxDzANBgNVBAcTBlVyYmFuYTENMAsG A1UEChMETkNTQTEaMBgGA1UEAxMRd3d3Lm5jc2EudWl1Yy5lZHUxJjAkBgkqhkiG 9w0BCQEWF3dlYm1hc3RlckBuY3NhLnVpdWMuZWR1MB4XDTA2MDMwNzE5MTU0NloX DTA3MDMwNzE5MTU0NlowgYQxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhJbGxpbm9p czEPMA0GA1UEBxMGVXJiYW5hMQ0wCwYDVQQKEwROQ1NBMRowGAYDVQQDExF3d3cu bmNzYS51aXVjLmVkdTEmMCQGCSqGSIb3DQEJARYXd2VibWFzdGVyQG5jc2EudWl1 Yy5lZHUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANXMAH439JNT5EMs6+Jg c8wYNMjakffoRqIohYRb2jJpmaFtCBTskK/dzMcuAjc0/O74qcuSbeL1dJknNJQu 2KoK8teJC0/wnltrt6Wt3mi11Es3REnukn94YvMjPiTcLqyCdybJzIFQIwpUs+2c pSCkHPrds+5XDtm6QSeb1qzjAgMBAAGjgewwgekwHQYDVR0OBBYEFJ0f4iq9saQ1 Br+bbfj/6mO1KGpHMIG5BgNVHSMEgbEwga6AFJ0f4iq9saQ1Br+bbfj/6mO1KGpH oYGKpIGHMIGEMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxDzANBgNV BAcTBlVyYmFuYTENMAsGA1UEChMETkNTQTEaMBgGA1UEAxMRd3d3Lm5jc2EudWl1 Yy5lZHUxJjAkBgkqhkiG9w0BCQEWF3dlYm1hc3RlckBuY3NhLnVpdWMuZWR1ggkA j4PDApTriDEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCbdDKNLTJ4 bJvybjjAqdGzWvu7rX6RExZYm0RuJGK8XSb2CuNhaY/Y7Dp3k2Nb4P9spZlYP9qR ZDmx2lUPhL5SEKLSbTk+Grsj4GdxknkT7+8c58mNHTCnxF3XLMk016hYRc+SFiK7 VaoZ9xdS3g7vKvRO9a+kWD3C3j+ceKaf+g== -----END CERTIFICATE----- subject=/C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu issuer=/C=US/ST=Illinois/L=Urbana/O=NCSA/CN=www.ncsa.uiuc.edu/emailAddress=webmaster@ncsa.uiuc.edu --- No client certificate CA names sent --- SSL handshake has read 1325 bytes and written 276 bytes --- New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA Server public key is 1024 bit Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : DHE-RSA-AES256-SHA Session-ID: 8B3CE529A77AE42B854B0A4A2083BF5E75DB0BE9B8E2847479441F4F70AEA8E6 Session-ID-ctx: Master-Key: BBEDB1ABC87B9E0B7D3576FFD8FC24E4E432E809D881189A7159EA5DA12211E9329C7B422078041F67D0847498AF27DB Key-Arg : None Start Time: 1141759882 Timeout : 300 (sec) Verify return code: 18 (self signed certificate) ---