programming/jsp

[jsp] 윈도우 openssl 톰캣 사설인증서 설치

labj 2015. 4. 23. 14:45

[jsp] 윈도우 openssl 톰캣 사설인증서 설치


먼저 openssl을 설치해 줍니다. 압축파일로 받아서 bin 디렉토리를 path 잡아주고

openssl.cnf 파일이 있는 곳에서 명령을 실행하는게 좋습니다.


https://code.google.com/p/openssl-for-windows/downloads/list



D:\webtools\openssl-0.9.8k_WIN32>genrsa -out mykey.key 2048
'genrsa'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.

D:\webtools\openssl-0.9.8k_WIN32>openssl genrsa -out mykey.key 2048
Loading 'screen' into random state - done
Generating RSA private key, 2048 bit long modulus
...........................................................+++
.................................+++
e is 65537 (0x10001)

D:\webtools\openssl-0.9.8k_WIN32>openssl req -new -x509 -key mykey.key -out myke
y.csr
Loading 'screen' into random state - done
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]:seoul
Locality Name (eg, city) []:seoul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:test.cdlist.co.kr
Organizational Unit Name (eg, section) []:test.cdlist.co.kr
Common Name (eg, YOUR name) []:Swick
Email Address []:test@gmail.com

D:\webtools\openssl-0.9.8k_WIN32>openssl pkcs12 -export -in mykey.csr -inkey myk
ey.key -out mykey.p12 -name mykey_alias
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:

D:\webtools\openssl-0.9.8k_WIN32>dir
 D 드라이브의 볼륨: DATA
 볼륨 일련 번호: 0084-E065

 D:\webtools\openssl-0.9.8k_WIN32 디렉터리

2015-04-23  오후 02:32    <DIR>          .
2015-04-23  오후 02:32    <DIR>          ..
2015-04-23  오후 01:47    <DIR>          bin
2015-04-23  오후 01:39    <DIR>          include
2015-04-23  오후 01:39    <DIR>          lib
2015-04-23  오후 02:31             1,688 mykey.csr
2015-04-23  오후 02:30             1,675 mykey.key
2015-04-23  오후 02:32             2,884 mykey.p12
2009-07-23  오후 05:32             9,374 openssl.cnf
               4개 파일              15,621 바이트
               5개 디렉터리  187,021,828,096 바이트 남음

D:\webtools\openssl-0.9.8k_WIN32>