SSL [secure sockets layer]

인터넷 상거래시 필요한 개인 정보를 보호하기 위한, 개인 정보 유지 프로토콜
인터넷 프로토콜(Internet protocol)이 보안면에서 기밀성을 유지하지 못한다는 문제를 극복하기 위해 개발되었다. 현재 전세계에서 사용되는 인터넷 상거래시 요구되는 개인 정보와 크레디트카드 정보의 보안 유지에 가장 많이 사용되고 있는 프로토콜이다. 최종 사용자와 가맹점간의 지불 정보 보안에 관한 프로토콜이라고 할 수 있다.


- SSL 인증서 만들기.
[root@www ~]# cd /etc/pki/tls/certs 
[root@www certs]# make server.key 
umask 77 ; \
/usr/bin/openssl genrsa -aes128 2048 > server.key
Generating RSA private key, 2048 bit long modulus
..+++
...+++
e is 65537 (0x10001)
Enter pass phrase:                              # 암호 설정
Verifying - Enter pass phrase:               # 암호확인

# remove passphrase from private key - private key 에서 암호제거
[root@www certs]# openssl rsa -in server.key -out server.key 
Enter pass phrase for server.key:            # 암호입력
writing RSA key

[root@www certs]#
make server.csr 
umask 77 ; \
/usr/bin/openssl req -utf8 -new -key server.key -out 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) [XX]:KR                                  # 나라
State or Province Name (full name) []:Seoul                         #이름
Locality Name (eg, city) [Default City]:Seoul                        # city
Organization Name (eg, company) [Default Company Ltd]:GTS  # 회사
Organizational Unit Name (eg, section) []:Jabcholove          # 부서
Common Name (eg, your name or your server's hostname) []:www.jabcholove.hi     # server's FQDN
Email Address []:xxx@jabcholove.hi                          # email address

Please enter the following 'extra' attributes  
#추가속성입력
to be sent with your certificate request
A challenge password []:                 # Enter
An optional company name []:           # Enter

[root@www certs]#
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650
Signature ok
subject=/C=JP/ST=Hiroshima/L=Hiroshima/O=GTS/OU=Server World/CN=www.server.world/emailAddress=xxx@server.world
Getting Private key
[root@www certs]# chmod 400 server.*

- SSL 설정

[root@www ~]# yum -y install mod_ssl

[root@www ~]# vi /etc/httpd/conf.d/ssl.conf

# line 78: uncomment
DocumentRoot "/var/www/html"
 
# line 79: uncomment and specify server name
ServerName www.server.world:443

# line 112: specify certificate
SSLCertificateFile /etc/pki/tls/certs/server.crt

# line 119: specify certification key
SSLCertificateKeyFile /etc/pki/tls/certs/server.key

[root@www ~]# /etc/rc.d/init.d/httpd restart 
Restarting httpd (via systemctl): Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[ OK ]
 

처음 테스트할때는 인증서로인해 오류납니다.걍 넘어가도 됩니다.
 

+ Recent posts