댓글 검색 목록

[기타] mkcert - 로컬에서 신뢰할 수 있는 개발 인증서(SSL)를 만드는 간단한 제로 구성 도구

페이지 정보

작성자 운영자 작성일 20-10-26 23:26 조회 1,110 댓글 0

mkcert는 로컬에서 신뢰할 수 있는 개발 인증서를 만들기 위한 간단한 도구입니다. 구성이 필요하지 않습니다.


https://github.com/FiloSottile/mkcert

https://mkcert.dev/


$ mkcert -install
Created a new local CA ?
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires browser restart)! ?

$ mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1

Created a new certificate valid for the following names ?
 - "example.com"
 - "*.example.com"
 - "example.test"
 - "localhost"
 - "127.0.0.1"
 - "::1"

The certificate is at "./example.com+5.pem" and the key at "./example.com+5-key.pem" ✅

Chrome and Firefox screenshot 

개발을 위해 실제 CA (인증 기관)의 인증서를 사용하는 것은 위험하거나 불가능할 수 있지만 (example.test, localhost 또는 127.0.0.1과 같은 호스트의 경우), 자체 서명 된 인증서는 신뢰 오류를 유발합니다. 

자체 CA를 관리하는 것이 가장 좋은 솔루션이지만 일반적으로 복잡한 명령, 전문 지식 및 수동 단계가 필요합니다.


mkcert는 시스템 루트 저장소에 로컬 CA를 자동으로 생성 및 설치하고 로컬에서 신뢰할 수 있는 인증서를 생성합니다. mkcert는 인증서를 사용하도록 서버를 자동으로 구성하지 않습니다.


설치 


경고 : mkcert가 자동으로 생성하는 rootCA-key.pem 파일은 시스템의 보안 요청을 가로 챌 수 있는 완전한 기능을 제공합니다. 공유하지 마십시오.


macOS 


macOS에서는 Homebrew를 사용하십시오.


brew install mkcert
brew install nss # if you use Firefox

또는 MacPorts.


sudo port selfupdate
sudo port install mkcert
sudo port install nss # if you use Firefox

Linux 


Linux에서는 먼저 certutil을 설치합니다.


sudo apt install libnss3-tools
    -or-
sudo yum install nss-tools
    -or-
sudo pacman -S nss
    -or-
sudo zypper install mozilla-nss-tools

그런 다음 Linuxbrew를 사용하여 설치할 수 있습니다.


brew install mkcert

또는 소스에서 빌드 (Go 1.13 이상 필요)


git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"

또는 미리 빌드 된 바이너리를 사용합니다.


Arch Linux 사용자의 경우 mkcert는 공식 Arch Linux 저장소에서 사용할 수 있습니다.

sudo pacman -Syu mkcert

Windows 


Windows에서는 Chocolatey를 사용합니다.


choco install mkcert

또는 Scoop 사용


scoop bucket add extras
scoop install mkcert

또는 소스에서 빌드하거나 (Go 1.10 이상 필요) 사전 빌드 된 바이너리를 사용합니다.


권한 문제가 발생하면 관리자로 mkcert를 실행 해보십시오.


지원되는 루트 저장소 


mkcert는 다음 루트 저장소를 지원합니다.

  • macOS system store
  • Windows system store
  • Linux variants that provide either
    update-ca-trust (Fedora, RHEL, CentOS) or
    update-ca-certificates (Ubuntu, Debian, OpenSUSE, SLES) or
    trust (Arch)
  • Firefox (macOS and Linux only)
  • Chrome and Chromium
  • Java (when JAVA_HOME is set)

로컬 루트 CA를 하위 집합에만 설치하려면 TRUST_STORES 환경 변수를 쉼표로 구분 된 목록으로 설정하면 됩니다. 옵션은 "system", "java"및 "nss"(Firefox 포함)입니다.


고급 주제 


고급 옵션 


	-cert-file FILE, -key-file FILE, -p12-file FILE
	    Customize the output paths.

	-client
	    Generate a certificate for client authentication.

	-ecdsa
	    Generate a certificate with an ECDSA key.

	-pkcs12
	    Generate a ".p12" PKCS #12 file, also know as a ".pfx" file,
	    containing certificate and key for legacy applications.

	-csr CSR
	    Generate a certificate based on the supplied CSR. Conflicts with
	    all other flags and arguments except -install and -cert-file.

참고 : 이러한 옵션은 도메인 이름 목록 앞에 배치해야 합니다.


Example


mkcert -key-file key.pem -cert-file cert.pem example.com *.example.com

S/MIME 


mkcert는 제공된 이름 중 하나가 이메일 주소 인 경우 S/MIME 인증서를 자동으로 생성합니다.


mkcert filippo@example.com


댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.