성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] 그냥 RSS Reader 기능과 약간의 UI 편의성 때문에 사용...
[이종효] 오래된 소프트웨어는 보안 위협이 되기도 합니다. 혹시 어떤 기능...
[정성태] @Keystroke IEEE의 문서를 소개해 주시다니... +_...
[손민수 (Keystroke)] 괜히 듀얼채널 구성할 때 한번에 같은 제품 사라고 하는 것이 아...
[정성태] 전각(Full-width)/반각(Half-width) 기능을 토...
[정성태] Vector에 대한 내용은 없습니다. Vector가 닷넷 BCL...
[orion] 글 읽고 찾아보니 디자인 타임에는 InitializeCompon...
[orion] 연휴 전에 재현 프로젝트 올리자 생각해 놓고 여의치 않아서 못 ...
[정성태] 아래의 글에 정리했으니 참고하세요. C# - Typed D...
[정성태] 간단한 재현 프로젝트라도 있을까요? 저런 식으로 설명만 해...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>"Let's Encrypt"에서 제공하는 무료 SSL 인증서를 IIS에 적용하는 방법 (1)</h1> <p> 드디어, "Let's Encrypt"가 베타를 벗어나 정식 서비스로 들어갔습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Let's Encrypt ; <a target='tab' href='https://letsencrypt.org/getting-started/'>https://letsencrypt.org/getting-started/</a> </pre> <br /> 게다가 IIS를 위한 PowerShell 모듈도 ebekker라는 사용자가 github에 공개했습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > How Letsencrypt work for windows IIS? ; <a target='tab' href='https://community.letsencrypt.org/t/how-letsencrypt-work-for-windows-iis/2106/1'>https://community.letsencrypt.org/t/how-letsencrypt-work-for-windows-iis/2106/1</a> ebekker/ACMESharp ; <a target='tab' href='https://github.com/ebekker/ACMESharp/wiki/Quick-Start'>https://github.com/ebekker/ACMESharp/wiki/Quick-Start</a> </pre> <br /> 어디... 한번 써볼까요? ^^<br /> <br /> 방법은 이미 ACMESharp 위키 페이지에 다 있지만 그래도 여기서 다시 한번 설명해 보겠습니다.<br /> <br /> 먼저, "ACMESharp"은 PowerShell 모듈이기 때문에 (관리자 권한의) PowerShell 쉘에서 다음과 같은 명령어로 설치해줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Windows PowerShell Copyright (C) 2015 Microsoft Corporation. All rights reserved. PS C:\WINDOWS\system32> <span style='color: blue; font-weight: bold'>Install-Module -Name ACMESharp</span> NuGet provider is required to continue PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Users\Tester\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet provider now? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y </pre> <br /> 그럼, 다음의 폴더에 모듈이 설치됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\Program Files\WindowsPowerShell\Modules\ACMESharp\[버전] </pre> <br /> 완료되었으면 Import-Module로 확인합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\WINDOWS\system32> Import-Module ACMESharp PS C:\WINDOWS\system32> </pre> <br /> 참고로, 위의 명령어는 PowerShell Gallery로부터 ACMESharp을 설치하는 것인데 이는 PowerShell 5.0부터 지원됩니다. 윈도우 10부터는 5.0 버전이 기본 설치되어 있지만 윈도우 7 SP1 부터는 별도로 설치해줘야 합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Windows Management Framework 5.0 ; <a target='tab' href='https://www.microsoft.com/en-us/download/details.aspx?id=50395'>https://www.microsoft.com/en-us/download/details.aspx?id=50395</a> </pre> <br /> 설치된 PowerShell의 버전을 알고 싶다면 Get-Host 명령으로 확인할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Get-Host</span> Name : ConsoleHost <span style='color: blue; font-weight: bold'>Version : 5.0.10586.122</span> InstanceId : d200e2f8-636f-41a5-b0d8-6714390c59b3 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : ko-KR CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy DebuggerEnabled : True IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace </pre> <br /> 그다음, 인증서를 저장하기 위한 영역을 초기화해줍니다. 이 명령을 관리자 권한으로 실행하면 시스템 전역적인 경로에 인증서 관련 정보가 저장되고, 그렇지 않다면 사용자 관련 경로에 저장됩니다. 저는, 그냥 '비-관리자 권한'으로 다시 PowerShell을 실행시켜 <a target='tab' href='http://www.sysnet.pe.kr/2/0/1845'>Vault</a> 저장소를 초기화시켰습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Initialize-ACMEVault</span> </pre> <br /> 그럼, 관련 파일이 다음의 경로에 생성됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > %LOCALAPPDATA%\ACMESharp\userVault </pre> <br /> 이제 "Let's Encrypt"에 등록을 하고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>New-ACMERegistration -Contacts mailto:kevin13@chol.net -AcceptTos</span> Contacts : {mailto:kevin13@chol.net} PublicKey : { e = AQAB, kty = RSA, n = ...[생략]... } RecoveryKey : RegistrationUri : https://acme-v01.api.letsencrypt.org/acme/reg/1610295 Links : {...[생략]...} TosLinkUri : https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf TosAgreementUri : https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf AuthorizationsUri : CertificatesUri : </pre> <br /> 인증서를 적용할 웹 사이트의 DNS 명을 제출합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>New-ACMEIdentifier -Dns www.sysnet.pe.kr -Alias myblogdns1</span> IdentifierPart : ACMESharp.Messages.IdentifierPart IdentifierType : dns Identifier : www.sysnet.pe.kr Uri : https://acme-v01.api.letsencrypt.org/acme/authz/...[생략]... Status : pending Expires : 2016-05-10 오후 2:45:01 Challenges : {, , } Combinations : {2, 1, 0} </pre> <br /> 제출한 DNS 명이 여러분 소유라는 것을 이제 증명해야 하는데요. 다음의 3가지 방법이 있습니다.<br /> <br /> <ul> <li>If you want to handle the HTTP Challenge using Windows IIS, <a target='tab' href='https://github.com/ebekker/ACMESharp/wiki/Quick-Start#method-1---handling-the-http-challenge-using-iis'>use Method #1.</a></li> <li>If you want to handle the HTTP Challenge manually, <a target='tab' href='https://github.com/ebekker/ACMESharp/wiki/Quick-Start#method-2---handling-the-http-challenge-manually'>use Method #2.</a></li> <li>If you want to handle the DNS Challenge manually, <a target='tab' href='https://github.com/ebekker/ACMESharp/wiki/Quick-Start#method-3---handling-the-dns-challenge-manually'>use Method #3</a></li> </ul> <br /> 제 경우에는, Azure에 올려진 제 블로그에 적용할 것이므로 수작업으로 진행해야 하므로 두 번째 방법을 택했습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Complete-ACMEChallenge myblogdns1 -ChallengeType http-01 -Handler manual</span> == Manual Challenge Handler - HTTP == * Handle Time: [2016-05-03 오후 11:53:01] * Challenge Token: [WRY1jLcW...[생략]...i_2sBI8s] To complete this Challenge please create a new file under the server that is responding to the hostname and path given with the following characteristics: * HTTP URL: [http://www.sysnet.pe.kr/.well-known/acme-challenge/WRY1jLc...[생략]...Ii_2sBI8s] * File Path: [.well-known/acme-challenge/WRY1jLcW...[생략]...2sBI8s] * File Content: [WRY1jLcWYcVO55...[생략]...jB_NHLhicrfTj2Bo] * MIME Type: [text/plain] ------------------------------------ IdentifierPart : ACMESharp.Messages.IdentifierPart IdentifierType : dns Identifier : www.sysnet.pe.kr Uri : https://acme-v01.api.letsencrypt.org/acme/authz/...[생략]... Status : pending Expires : 2016-05-10 오후 2:45:01 Challenges : {, , manual} Combinations : {2, 1, 0} </pre> <br /> 위의 메시지에 대한 의미는 간단합니다. "HTTP URL"이 여러분들의 웹 사이트이므로 "<a target='tab' href='/.well-known/acme-challenge/WRY1jLc'>http://www.sysnet.pe.kr/.well-known/acme-challenge/WRY1jLc</a>...[생략]...Ii_2sBI8s" 경로를 방문하면 "File Content"로 지정된 내용인 "WRY1jLcWYcVO55...[생략]...jB_NHLhicrfTj2Bo"을 반환할 수 있도록 파일을 생성해 주면 됩니다. (잊지 말고, Visual Studio의 속성 창에서 해당 파일의 "Build Action"을 "Content"로 설정합니다. 그렇지 않으면 배포에 포함되지 않습니다.)<br /> <br /> 단지, 해당 파일이 확장자가 없기 때문에 "text/plain"으로 인식해 주려면 .well-known/acme-challenge/ 폴더에 web.config 파일도 함께 생성해서 다음과 같은 설정을 추가해 줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <span style='color: blue; font-weight: bold'><staticContent> <mimeMap fileExtension="." mimeType="text/plain" /> </staticContent></span> </system.webServer> </configuration> </pre> <br /> 확인을 위해 꼭 웹 브라우저로 "<a target='tab' href='/.well-known/acme-challenge/WRY1jLc'>http://www.sysnet.pe.kr/.well-known/acme-challenge/WRY1jLc</a>...[생략]...Ii_2sBI8s" 경로를 방문해 보고 "F12" 키를 눌러 "Developer Tools"의 "Network" 탭을 이용해 해당 파일의 "Content type"이 "text/plain"으로 나오는지 보면 좋습니다.<br /> <br /> 준비가 되었으면 도메인의 소유자임을 "Let's encrypt" 측에 확인하라고 다음의 명령을 내려줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Submit-ACMEChallenge myblogdns1 -ChallengeType http-01</span> IdentifierPart : ACMESharp.Messages.IdentifierPart IdentifierType : dns Identifier : www.sysnet.pe.kr Uri : https://acme-v01.api.letsencrypt.org/acme/authz/8c7cHBK5xMF8SEDc0t9KT_OYok6OFEaI5uWqgxfpNQg <span style='color: blue; font-weight: bold'>Status : pending</span> Expires : 2016-05-10 오후 2:45:01 Challenges : {, , manual} Combinations : {2, 1, 0} </pre> <br /> 보시면 상태가 "pending"으로 나옵니다. 이게 완료될 때까지 기다려야 하는데요. 다음의 명령어로 한번씩 확인해 볼 수 있습니다. (금방 상태가 확정됩니다.)<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>(Update-ACMEIdentifier myblogdns1 -ChallengeType http-01).Challenges | Where-Object {$_.Type -eq "http-01"}</span> ChallengePart : ACMESharp.Messages.ChallengePart Challenge : ACMESharp.ACME.HttpChallenge Type : http-01 Uri : https://acme-v01.api.letsencrypt.org/acme/challenge/8c7cHBK5xMF8SEDc0t9KT_OYok6OFEaI5uWqgxfpNQg/69449312 Token : WRY1jLcWYcVO55PhB1h6fUTzUQs1uRbaGsIi_2sBI8s <span style='color: blue; font-weight: bold'>Status : invalid</span> OldChallengeAnswer : [, ] ChallengeAnswerMessage : HandlerName : manual HandlerHandleDate : 2016-05-03 오후 11:53:01 HandlerCleanUpDate : SubmitDate : 2016-05-04 오전 12:59:08 SubmitResponse : {StatusCode, Headers, Links, RawContent...} </pre> <br /> 저렇게 invalid로 나오면, "New-ACMEIdentifier" 단계로 돌아가서 다시 진행해야 합니다. 따라서, 이렇게 되면 Identifier까지 변경해야 하므로 다음과 같이 이름을 바꿔서 다시 진행해 줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> New-ACMEIdentifier -Dns www.sysnet.pe.kr -Alias <span style='color: blue; font-weight: bold'>myblogdns2</span> IdentifierPart : ACMESharp.Messages.IdentifierPart IdentifierType : dns Identifier : www.sysnet.pe.kr Uri : https://acme-v01.api.letsencrypt.org/acme/authz/EY0wWw0bW1qdwATTtEwZrvzB8UJBi7nIjl7BeIata88 Status : pending Expires : 2016-05-10 오후 4:10:00 Challenges : {, , } Combinations : {1, 0, 2} </pre> <br /> 참고로, 제 경우에 "invalid"로 나왔던 원인은 해당 파일이 "UTF-8 with signature" 형식으로 저장되어 발생한 문제였습니다. 그래서 "ASCII" 형식으로 메모장을 이용해 다시 저장한 후 웹 사이트를 배포해 "Status: valid" 상태까지 진행했습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> (Update-ACMEIdentifier <span style='color: blue; font-weight: bold'>myblogdns2</span> -ChallengeType http-01).Challenges | Where-Object {$_.Type -eq "http-01"} ChallengePart : ACMESharp.Messages.ChallengePart Challenge : ACMESharp.ACME.HttpChallenge Type : http-01 Uri : https://acme-v01.api.letsencrypt.org/acme/challenge/EY0wWw0bW1qdwATTtEwZrvzB8UJBi7nIjl7BeIata8 8/69514095 Token : 3lA782rH5W43rIX_rTwi3zSdjPRgILkajdKAIfnH2y8 <span style='color: blue; font-weight: bold'>Status : valid</span> OldChallengeAnswer : [, ] ChallengeAnswerMessage : HandlerName : manual HandlerHandleDate : 2016-05-04 오전 1:10:38 HandlerCleanUpDate : SubmitDate : 2016-05-04 오전 1:21:29 SubmitResponse : {StatusCode, Headers, Links, RawContent...} </pre> <br /> 드디어, 인증서를 받을 차례가 왔군요. ^^ 로컬에 인증서를 하나 만들고 그것을 "Let's encrypt" 측 CA 서버에 전달합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>New-ACMECertificate myblogdns2 -Generate -Alias sysnetCert1</span> Id : 2117d473-8887-4a0d-94c4-dcedb23c591b Alias : sysnetCert1 Label : Memo : IdentifierRef : b96ca243-869e-422e-8c15-e63aaca5bba5 IdentifierDns : www.sysnet.pe.kr AlternativeIdentifierDns : KeyPemFile : CsrPemFile : GenerateDetailsFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-gen.json CertificateRequest : CrtPemFile : CrtDerFile : IssuerSerialNumber : SerialNumber : Thumbprint : Signature : SignatureAlgorithm : PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Submit-ACMECertificate sysnetCert1</span> Id : 2117d473-8887-4a0d-94c4-dcedb23c591b Alias : sysnetCert1 Label : Memo : IdentifierRef : b96ca243-869e-422e-8c15-e63aaca5bba5 IdentifierDns : www.sysnet.pe.kr AlternativeIdentifierDns : KeyPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-key.pem CsrPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-csr.pem GenerateDetailsFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-gen.json CertificateRequest : ACMESharp.CertificateRequest CrtPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.pem CrtDerFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.der IssuerSerialNumber : SerialNumber : 036803E45525487CD7F7E1030337C3070F08 Thumbprint : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E Signature : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E SignatureAlgorithm : sha256RSA PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Update-ACMECertificate sysnetCert1</span> Id : 2117d473-8887-4a0d-94c4-dcedb23c591b Alias : sysnetCert1 Label : Memo : IdentifierRef : b96ca243-869e-422e-8c15-e63aaca5bba5 IdentifierDns : www.sysnet.pe.kr AlternativeIdentifierDns : KeyPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-key.pem CsrPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-csr.pem GenerateDetailsFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-gen.json CertificateRequest : ACMESharp.CertificateRequest CrtPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.pem CrtDerFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.der <span style='color: blue; font-weight: bold'>IssuerSerialNumber : 0A0141420000015385736A0B85ECA708</span> SerialNumber : 036803E45525487CD7F7E1030337C3070F08 Thumbprint : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E Signature : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E SignatureAlgorithm : sha256RSA </pre> <br /> <br /> 정상적으로 인증서가 발급되었으니, 이제 pfx 파일로 export 시킨 다음,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Get-ACMECertificate sysnetCert1 -ExportPkcs12 "c:\temp\sysnetCert1.pfx" -CertificatePassword 'mypassword'</span> Id : 2117d473-8887-4a0d-94c4-dcedb23c591b Alias : sysnetCert1 Label : Memo : IdentifierRef : b96ca243-869e-422e-8c15-e63aaca5bba5 IdentifierDns : www.sysnet.pe.kr AlternativeIdentifierDns : KeyPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-key.pem CsrPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-csr.pem GenerateDetailsFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-gen.json CertificateRequest : ACMESharp.CertificateRequest CrtPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.pem CrtDerFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.der IssuerSerialNumber : 0A0141420000015385736A0B85ECA708 SerialNumber : 036803E45525487CD7F7E1030337C3070F08 Thumbprint : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E Signature : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E SignatureAlgorithm : sha256RSA </pre> <br /> 파일로 나온 sysnetCert1.pfx 인증서를 IIS 서버에 설치해 주면 됩니다.<br /> <br /> IIS 서버는 나중에 적용해 보고, 우선 내보내기 된 .pfx파일을 탐색기에서 더블 클릭을 이용한 '가져오기'로 다음의 글에 설명한 방법으로 설치할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 5.1 인증서 관리 - 내보내기/가져오기 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/392'>http://www.sysnet.pe.kr/2/0/392</a> </pre> <br /> .pfx 파일을 가져오기 했으면 이제 '인증서 관리자'를 통해 살펴볼 수 있습니다. <br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 5.3 인증서 관리 - 인증서 MMC 관리자 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/395'>http://www.sysnet.pe.kr/2/0/395</a> </pre> <br /> 아래의 그림에서 보는 것처럼, <br /> <br /> <img alt='letsencrypt_1.png' src='/SysWebRes/bbs/letsencrypt_1.png' /><br /> <br /> <img alt='letsencrypt_2.png' src='/SysWebRes/bbs/letsencrypt_2.png' /><br /> <br /> 오직, HTTPS 관련 통신을 위한 보안 용도로만 사용할 수 있을 뿐 그 외의 '코드 사이닝'과 같은 용도로는 사용할 수 없습니다.<br /> <br /> 마지막으로 인증 경로는 다음과 같습니다.<br /> <br /> <img alt='letsencrypt_3.png' src='/SysWebRes/bbs/letsencrypt_3.png' /><br /> <br /> <ul> <li>DST Root CA X3</li> <li>Let's Encrypt Authority X3</li> <li>...[your cert]....</li> </ul> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, 오류가 발생했던 경우 하나를 공유합니다. 다음과 같이 pfx 내보내기에서 오류가 발생했는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Get-ACMECertificate sysnetCert1 -ExportPkcs12 "c:\temp\sysnetCert1.pfx" -CertificatePassword 'mypassword'</span> Get-ACMECertificate : Cannot export PKCS12; Issuer certificate hasn't been resolved At line:1 char:1 + Get-ACMECertificate sysnetCert1 -ExportPkcs12 "c:\temp\sysnetCert1.pf ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-ACMECertificate], InvalidOperationException + FullyQualifiedErrorId : System.InvalidOperationException,ACMESharp.POSH.GetCertificate </pre> <br /> Submit-ACMECertificate 명령어의 결과에 다음과 같이 IssuerSerialNumber가 비어 있는데 아마 처리가 완료되지 않은 탓으로 보입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Submit-ACMECertificate sysnetCert1</span> Id : 2117d473-8887-4a0d-94c4-dcedb23c591b Alias : sysnetCert1 Label : Memo : IdentifierRef : b96ca243-869e-422e-8c15-e63aaca5bba5 IdentifierDns : www.sysnet.pe.kr AlternativeIdentifierDns : KeyPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-key.pem CsrPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-csr.pem GenerateDetailsFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-gen.json CertificateRequest : ACMESharp.CertificateRequest CrtPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.pem CrtDerFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.der <span style='color: blue; font-weight: bold'>IssuerSerialNumber :</span> SerialNumber : 036803E45525487CD7F7E1030337C3070F08 Thumbprint : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E Signature : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E SignatureAlgorithm : sha256RSA </pre> <br /> 검색해 보니,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Cannot export PKCS12; Issuer certificate hasn't been resolved #87 ; https://github.com/ebekker/ACMESharp/issues/87 </pre> <br /> Update-ACMECertificate 명령어를 해주라는 말이 나와서 실행했는데, 이번에는 IssuerSerialNumber의 값이 채워져 있었습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Users\Tester> <span style='color: blue; font-weight: bold'>Update-ACMECertificate sysnetCert1</span> Id : 2117d473-8887-4a0d-94c4-dcedb23c591b Alias : sysnetCert1 Label : Memo : IdentifierRef : b96ca243-869e-422e-8c15-e63aaca5bba5 IdentifierDns : www.sysnet.pe.kr AlternativeIdentifierDns : KeyPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-key.pem CsrPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-csr.pem GenerateDetailsFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-gen.json CertificateRequest : ACMESharp.CertificateRequest CrtPemFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.pem CrtDerFile : 2117d473-8887-4a0d-94c4-dcedb23c591b-crt.der <span style='color: blue; font-weight: bold'>IssuerSerialNumber : 0A0141420000015385736A0B85ECA708</span> SerialNumber : 036803E45525487CD7F7E1030337C3070F08 Thumbprint : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E Signature : CC5D8A0EBA4C72BB42308A851261A3FBFCBC115E SignatureAlgorithm : sha256RSA </pre> <br /> 따라서, 저 값이 제대로 채워져 있는지 검사한 후에 인증서 내보내기를 하면 잘 될 것입니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> 좋은 참고 자료가 있는데요. 아래는 동영상으로 이 글의 내용을 소개하고 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > March 2016: How to install Let's Encrypt Free SSL certificates on Windows Server and IIS ; <a target='tab' href='https://www.youtube.com/watch?v=tohX24vUnW8'>https://www.youtube.com/watch?v=tohX24vUnW8</a> </pre> <br /> 그리고, "Let's Encrypt"를 위한 Azure 사이트 확장도 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Azure Let's Encrypt (x86) ; <a target='tab' href='https://www.siteextensions.net/packages/letsencrypt/'>https://www.siteextensions.net/packages/letsencrypt/</a> Azure Let's Encrypt (x64) ; <a target='tab' href='https://www.siteextensions.net/packages/letsencrypt64/'>https://www.siteextensions.net/packages/letsencrypt64/</a> </pre> </p><br /> <br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1758
(왼쪽의 숫자를 입력해야 합니다.)