1. 먼저 CRT 파일 생성을 위한 KEY(RSA 형식) 파일을 먼저 생성해야 한다.
$ openssl genrsa -des3 -out [key filename] [RSA 암호화 bit]
예) $ openssl genrsa -des3 -out KEY.key 2048
2. KEY 파일을 이용하여 CSR 파일을 생성 한다.
$ openssl req -new -key [key filename] -out [csr filename]
예) $ openssl req -new -key KEY.key -out crtfile.csr
-- 하단의 각 항목에 값을 입력해야 한다.
Country Name (2 letter code) [GB]:
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:admin@test.com
-- 아래 부분은 입력하지 않아도 상관 없음. 엔터로 넘어감
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:admin@test.com
-- 아래 부분은 입력하지 않아도 상관 없음. 엔터로 넘어감
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
to be sent with your certificate request
A challenge password []:
An optional company name []:
-- 기존 RSA 파일의 비밀번호 변경하기. 기존 RSA 파일의 암호를 입력해야 한다.
openssl rsa -in key.pem.backup -out key.pem
[출처] http://egloos.zum.com/laydios/v/3069708