■ openssl 명령을 사용해 인증서 파일을 생성하는 방법을 보여준다.
1. CTRL + ALT + T 키를 눌러서 [터미널]을 실행한다.
2. [터미널]에서 아래 명령을 실행한다.
▶ 실행 명령
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
king@cosmos:~$ openssl req -new -x509 -key private_key.pem -out cert.pem -days 365 Enter pass phrase for private_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) [AU]:KR State or Province Name (full name) [Some-State]:GYEONGGI Locality Name (eg, city) []:SUWON Organization Name (eg, company) [Internet Widgits Pty Ltd]:DSCORE Organizational Unit Name (eg, section) []:SE Common Name (e.g. server FQDN or YOUR name) []:icodebroker Email Address []:icodebroker.naver.com |
※ private_key.pem : RSA 개인키 파일명
※ cert.pem : 생성할 인증서 파일명
▶ cert.pem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
-----BEGIN CERTIFICATE----- MIID9zCCAt+gAwIBAgIUI5odwqbjQAwR1V32CKWKgmhWiq4wDQYJKoZIhvcNAQEL BQAwgYoxCzAJBgNVBAYTAktSMREwDwYDVQQIDAhHWUVPTkdHSTEOMAwGA1UEBwwF U1VXT04xDzANBgNVBAoMBkRTQ09SRTELMAkGA1UECwwCU0UxFDASBgNVBAMMC2lj b2RlYnJva2VyMSQwIgYJKoZIhvcNAQkBFhVpY29kZWJyb2tlci5uYXZlci5jb20w HhcNMjQwNjA0MTIwNzU2WhcNMjUwNjA0MTIwNzU2WjCBijELMAkGA1UEBhMCS1Ix ETAPBgNVBAgMCEdZRU9OR0dJMQ4wDAYDVQQHDAVTVVdPTjEPMA0GA1UECgwGRFND T1JFMQswCQYDVQQLDAJTRTEUMBIGA1UEAwwLaWNvZGVicm9rZXIxJDAiBgkqhkiG 9w0BCQEWFWljb2RlYnJva2VyL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