Advertisement
Guest User

Untitled

a guest
Dec 4th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. przodownik ~/b/s/openSSL (x509|✚7)$ openssl req -new -newkey rsa -nodes -out ca.csr -keyout ca.key
  2. Generating a 2048 bit RSA private key
  3. .........................................+++
  4. ......................................+++
  5. writing new private key to 'ca.key'
  6.  
  7. Country Name (2 letter code) [AU]:PL
  8. State or Province Name (full name) [Some-State]:mazowieckie
  9. Locality Name (eg, city) []:Warsaw
  10. Organization Name (eg, company) [Internet Widgits Pty Ltd]:scalatech
  11. Organizational Unit Name (eg, section) []:scalatech
  12. Common Name (e.g. server FQDN or YOUR name) []:przodownik
  13. Email Address []:przodownikR1@gmail.com
  14.  
  15. Please enter the following 'extra' attributes
  16. to be sent with your certificate request
  17. A challenge password []:
  18. An optional company name []:
  19. przodownik ~/b/s/openSSL (x509|✚7…2)$ ls
  20. ca.csr ca.key
  21. przodownik ~/b/s/openSSL (x509|✚7…2)$ openssl x509 -trustout -signkey ca.key -days 3650 -req -in ca.csr -out ca.pem
  22. Signature ok
  23. subject=/C=PL/ST=mazowieckie/L=Warsaw/O=scalatech/OU=scalatech/CN=przodownik/emailAddress=przodownikR1@gmail.com
  24. Getting Private key
  25. przodownik ~/b/s/openSSL (x509|✚7…3)$ ls
  26. ca.csr ca.key ca.pem
  27. przodownik ~/b/s/openSSL (x509|✚7…3)$
  28.  
  29.  
  30. przodownik ~/b/s/openSSL (x509|✚7…3)$ ls
  31. ca.csr ca.key ca.pem
  32. przodownik ~/b/s/openSSL (x509|✚7…3)$ openssl x509 -outform der -in ca.pem -out ca.crt
  33. przodownik ~/b/s/openSSL (x509|✚7…4)$ ls
  34. ca.crt ca.csr ca.key ca.pem
  35. przodownik ~/b/s/openSSL (x509|✚7…4)$
  36.  
  37.  
  38.  
  39. keytool -import -keystore trust.jks -trustcacerts -file ca.crt -storepass secret-trust 15:05
  40. Owner: EMAILADDRESS=przodownikR1@gmail.com, CN=przodownik, OU=scalatech, O=scalatech, L=Warsaw, ST=mazowieckie, C=PL
  41. Issuer: EMAILADDRESS=przodownikR1@gmail.com, CN=przodownik, OU=scalatech, O=scalatech, L=Warsaw, ST=mazowieckie, C=PL
  42. Serial number: ed056d7a97490de5
  43. Valid from: Fri Dec 04 14:34:38 CET 2015 until: Mon Dec 01 14:34:38 CET 2025
  44. Certificate fingerprints:
  45. MD5: 34:01:C0:B2:FB:E1:C5:A7:96:1F:81:78:9E:F9:1D:3F
  46. SHA1: 45:EA:3E:52:57:04:95:DB:B3:60:61:FF:48:BE:EF:89:1D:6A:14:BD
  47. SHA256: E8:F4:E9:72:75:74:1D:B9:C7:EA:1B:19:26:AD:A4:B6:73:D5:8E:FD:E2:9E:52:B7:A7:B4:AE:5D:12:52:62:FD
  48. Signature algorithm name: SHA256withRSA
  49. Version: 1
  50. Trust this certificate? [no]: yes
  51. Certificate was added to keystore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement