주 메뉴 열기

wwiki β

바뀜

Openssl

12 바이트 제거됨, 2019년 4월 20일 (토) 03:12
인증서
== 개인키 생성 ==
genrsa -out private.key 1024
=== 비밀번호 제거 ===
openssl rsa -in key.pem.orig -out key.pem
=== 개인키로 파일 암복호화 ===
openssl rsautl -encrypt -inkey public.pem -pubin -in file.txt -out file.ssl;
openssl rsautl -decrypt -inkey private.pem -in file.ssl -out decrypted.txt
== 공개키 생성 ==
openssl rsa -in private.key -out public.key -pubout -outform derwriting
=== PEM포맷으로 생성 ===
openssl rsa -in private.key -out public.key -pubout
== 인증서 ==
=== 인증서 생성(crt) ===
private.key로 만든 인증서(crt)
국가코드: KR
=== 인증서의 내용 ===
인증서는 pem포맷으로 윈도우의 경우 crt확장자를 인증서로 인식한다. 더블클릭하면 발급대상과 발급자가 있으며, 자세히를 보면 버전, 서명 알고리즘, 유효기간, 주체, 공개키 등이 있다.
===== 웹서버용 인증서 =====  참조문서[[Let's Encrypt certificate]]
== pfx ==
=== 인증서와 개인키로 생성 ===
crt(pem포맷의 인증서)와 key(pem포맷의 개인키)로부터 생성
  openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
=== 인증서로 생성 ===
cer 인증서 생성
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes
==== 개인키 추출: ====
openssl.exe pkcs12 -in my.pfx -nocerts -nodes -out private.key
편집
2,431