'self-signed'에 해당되는 글 1건

  1. 2017.09.28 openssl s_server example
Information2017. 9. 28. 11:50

서버로 동작시켜야되므로 인증서부터 만들어야 함.


[self-signed 인증서 만들기]

ec2-user@aws:~/certs>openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes

Generating a 2048 bit RSA private key

..........+++

.............................+++

writing new private key to 'key.pem'

-----

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) [XX]:KR

State or Province Name (full name) []:도시 이름

Locality Name (eg, city) [Default City]:행정구

Organization Name (eg, company) [Default Company Ltd]:회사 이름 혹은 단체 이름

Organizational Unit Name (eg, section) []: 담당부서 이름

Common Name (eg, your name or your server's hostname) []: 도메인 입력(테스트 용도일시 localhost가 무난)

Email Address []:이메일 주소 아무거나


[SSL 서버 실행]

ec2-user@aws:~/certs>openssl s_server -key key.pem -cert cert.pem -accept 1470



[클라이언트에서 접속하기]

이제 외부 ssl 클라이언트에서 openssl 실행한 PC의 IP주소(포트번호는 1470)로 접속하면 됨.



[웹브라우저로 테스트 방법]

1. 웹용으로 서버 실행

ec2-user@aws:~/certs>openssl s_server -key key.pem -cert cert.pem -accept 1470 -www


2. 웹브라우저에 다음과 같은 포맷으로 주소 입력 후 접속하기, x.x.x.x는 IP주소

https://x.x.x.x:1470




'Information' 카테고리의 다른 글

윈도우즈 10 DHCPv6 버그 수정(?)  (1) 2017.11.16
Reverse DNS 조회 및 AWS EIP 등록 방법  (0) 2017.11.08
AWS Amazon Linux timezone 변경  (0) 2017.09.28
한글이름  (0) 2017.09.08
windows vim(7.4)에서 diff 사용  (0) 2014.07.17
Posted by OTOTO