openssl에서 올레올레 인증서 (pfx 파일)를 만든 이야기

12222 단어 Windowsopenssl

소개


  • HTTPS 화하기 위해 인증서가 필요했지만 Windows에서 pfx 파일을 만드는 데 어려움을 겪었으므로 절차를 참고하십시오.

  • 사전 준비


  • 클라이언트 PC(Windows)

  • 참고 자료


  • 다음 선생님의 기사를 참고하면서 진행합니다. 선생님에게 감사.

  • 오레올레 증명서를 openssl로 작성 (상세 버전)
  • h tps://오즈마. 하테나 bぉg. jp/엔트리/20130511/1368284304

  • 작업 흐름


  • openssl 설치
  • 개인 키 (Private Key) 만들기
  • 인증서 서명 요청 (CSR : Certificate Signing Request) 생성
  • 서버 인증서 만들기
  • pfx 파일 내보내기

  • 【순서 1】openssl의 인스톨


  • 아래 URL을 참고로 설치

  • Win32 openssl 설치 절차
  • htps : // rms ぢぎせ rt. 네. jp / 허 w 및 / 가시 s / 오훗 sl_ 온_ 우동 ws. HTML

  • Shining Light Productions (openssl 다운로드)
  • htp://slp ㄴ b. 코 m/p 로즈 cts/우안 32 오펜 sL. HTML

  • 【순서 2】비밀키(Private Key)의 작성


  • 다음 명령을 순서대로 실행
  • # 秘密鍵(Private Key)の作成
    $ openssl genrsa 2048 > server.key
    

    【순서 3】증명서 서명 요구(CSR : Certificate Signing Request)의 작성


  • 다음 명령을 순서대로 실행
  • # 証明書署名要求(CSR : Certificate Signing Request)の作成
    $ openssl req -new -key server.key > server.csr
    
    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]:
    State or Province Name (full name) [Some-State]:
    Locality Name (eg, city) []:
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:
    Organizational Unit Name (eg, section) []:
    Common Name (e.g. server FQDN or YOUR name) []:
    Email Address []:
    
    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    

    Note: 사실이라면 제대로 입력해야 하지만, 올레올레 증명서의 경우는 모두 ENTER로.

    【순서 4】서버 증명서의 작성


  • 다음 명령을 순서대로 실행
  • # サーバ証明書の作成
    $ openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt
    
    Signature ok
    subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
    Getting Private key
    

    【순서 5】pfx 파일의 내보내기


  • 다음 명령을 순서대로 실행
  • # pfxファイルのエクスポート
    $ openssl pkcs12 -export -inkey server.key -in server.cer -out server.pfx
    

    요약


  • 올레올레 증명서 파일(pfx 파일)이 생겼다!
  • openssl의 사용법은 많이 나오지만, pfx 파일까지 작성하는 순서에 도착하지 않았으므로 비망 메모.
  • 라고 하는지, 이 번거로운 순서 무엇입니까? ? , , , 라고 생각하고 있으면 Let's Encrypt 되는 구세주가 있었군요. 오레올레 증명서라면 안되는 경우도 있으므로, 솔직하게 이쪽으로 하면 좋았을지도.
  • 좋은 웹페이지 즐겨찾기