Advertisement
Guest User

Untitled

a guest
Nov 4th, 2017
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.60 KB | None | 0 0
  1.  
  2. ~/Desktop/Studies/BezpKomp λ openssl version -a
  3. OpenSSL 1.0.2k  26 Jan 2017
  4. built on: reproducible build, date unspecified
  5. platform: darwin64-x86_64-cc
  6. options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
  7. compiler: /usr/bin/clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
  8. OPENSSLDIR: "/opt/local/etc/openssl"
  9. ~/Desktop/Studies/BezpKomp λ ls
  10. Lista3/
  11. ~/Desktop/Studies/BezpKomp λ cd Lista3
  12. ~/Desktop/Studies/BezpKomp/Lista3 λ ls
  13. ~/Desktop/Studies/BezpKomp/Lista3 λ clear
  14. ~/Desktop/Studies/BezpKomp/Lista3 λ openssl genrsa -des3 -out privkeyA.pem 2048
  15. Generating RSA private key, 2048 bit long modulus
  16. ............+++
  17. ....+++
  18. e is 65537 (0x10001)
  19. Enter pass phrase for privkeyA.pem:
  20. Verifying - Enter pass phrase for privkeyA.pem:
  21. ~/Desktop/Studies/BezpKomp/Lista3 λ openssl req -new -key privkeyA.pem -out certA.csr
  22. Enter pass phrase for privkeyA.pem:
  23. You are about to be asked to enter information that will be incorporated
  24. into your certificate request.
  25. What you are about to enter is what is called a Distinguished Name or a DN.
  26. There are quite a few fields but you can leave some blank
  27. For some fields there will be a default value,
  28. If you enter '.', the field will be left blank.
  29. -----
  30. Country Name (2 letter code) [AU]:PL
  31. State or Province Name (full name) [Some-State]:DOLNOSLASKI
  32. Locality Name (eg, city) []:WROCLAW
  33. Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
  34. Organizational Unit Name (eg, section) []:.
  35. Common Name (e.g. server FQDN or YOUR name) []:JAKUBSAPOTA
  36. Email Address []:jsapota@gmail.com
  37.  
  38. Please enter the following 'extra' attributes
  39. to be sent with your certificate request
  40. A challenge password []:jakub123
  41. An optional company name []:studia
  42. ~/Desktop/Studies/BezpKomp/Lista3 λ openssl genrsa -des3 -out privkeyB.pem 2048
  43. Generating RSA private key, 2048 bit long modulus
  44. ....+++
  45. ....................................................................................................+++
  46. e is 65537 (0x10001)
  47. Enter pass phrase for privkeyB.pem:
  48. Verifying - Enter pass phrase for privkeyB.pem:
  49. ~/Desktop/Studies/BezpKomp/Lista3 λ openssl req -new -x509 -key privkeyB.pem -out CAcert.crt -days 365
  50. Enter pass phrase for privkeyB.pem:
  51. You are about to be asked to enter information that will be incorporated
  52. into your certificate request.
  53. What you are about to enter is what is called a Distinguished Name or a DN.
  54. There are quite a few fields but you can leave some blank
  55. For some fields there will be a default value,
  56. If you enter '.', the field will be left blank.
  57. -----
  58. Country Name (2 letter code) [AU]:PL
  59. State or Province Name (full name) [Some-State]:DOLNOSLASKI
  60. Locality Name (eg, city) []:WROCLAW
  61. Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
  62. Organizational Unit Name (eg, section) []:.
  63. Common Name (e.g. server FQDN or YOUR name) []:JAKUBSAPOTA
  64. Email Address []:jsapota@gmail.com
  65. ~/Desktop/Studies/BezpKomp/Lista3 λ openssl x509 -req -days 365 -in certA.csr -CA CAcert.crt -CAkey privkeyB.pem -set_serial 01 -out certA.crt
  66. Signature ok
  67. subject=/C=PL/ST=DOLNOSLASKI/L=WROCLAW/CN=JAKUBSAPOTA/emailAddress=jsapota@gmail.com
  68. Getting CA Private Key
  69. Enter pass phrase for privkeyB.pem:
  70. ~/Desktop/Studies/BezpKomp/Lista3 λ ls
  71. CAcert.crt    certA.crt     certA.csr     info          privkeyA.pem  privkeyB.pem
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement