본문 바로가기

TroubleShooting/Tomcat

tomcat keygen 간단 명령어

728x90

키스토어(keystore) 생성

# keytool -genkey -alias KeystoreAlias -keysize 2048 -keyalg RSA -keystore mykeystore

- keysize : 키 길이를 2048 로. 만약 이 옵션을 설정안하면 1024 설정됨.


생성된 키스토어 내용 확인

# keytool -list -v -keystore mykeystore


Tomcat server.xml 에서 인증서 설정

        <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"  URIEncoding="UTF-8" useBodyEncodingForURI="true"

                maxThreads="150" scheme="https" secure="true"

                clientAuth="false" sslProtocol="TLS"

                keystoreFile="${catalina.home}/conf/mykeystore" keyAlias="KeystoreAlias"

                keystoreType="JKS" keystorePass="키스토어패스워드입력" />



참고 :

http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html

http://docs.oracle.com/cd/E19798-01/821-1841/gjrgy/index.html

'TroubleShooting > Tomcat' 카테고리의 다른 글

SSL cipher suite ordering - Linux  (2) 2014.09.17
인증서의 fingerprint(sha1, sha256) 확인  (0) 2014.09.03