pk12util은 PKCS12 형식의 인증서/키 데이터베이스 및 파일 간에 키와 인증서를 가져오고 내보내는 데 사용하는 명령줄 유틸리티입니다. PKCS12는 Personal Information Exchange Syntax Standard(개인 정보 상호 교환 구문 표준)의 PKCS(Public-Key Cryptography Standards) #12입니다. pk12util 유틸리티에 대한 자세한 내용은 http://www.mozilla.org/projects/security/pki/nss/tools/pk12util.html을 참조하십시오.
PKCS12 형식의 인증서를 NSS 인증 데이터베이스로 가져옵니다.
pk12util -i ${cert.pkcs12.file} -k ${certdb.pass.file} -w ${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config |
PKCS12 형식의 인증서를 NSS 인증 데이터베이스 토큰 모듈로 가져옵니다.
pk12util -i ${cert.pkcs12.file} -h ${token.name} -k ${certdb.pass.file} -w ${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config |
인증서를 NSS 인증서 데이터베이스에서 PKCS12 형식으로 내보냅니다.
pk12util -o -n ${cert.nickname} -k ${pass.file} -w${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config |
인증서를 NSS 인증서 데이터베이스 토큰 모듈에서 PKCS12 형식(하드웨어 가속기 구성에 유용)으로 내보냅니다.
pk12util -o -n ${cert.nickname} -h ${token.name} -k ${pass.file} -w ${cert.pass.file} -d ${admin.domain.dir}/${admin.domain}/config |
PKCS12 인증서를 Java 소스를 필요로 하는 JKS 형식으로 변환합니다.
<target name="convert-pkcs12-to-jks" depends="init-common"> <delete file="${jks.file}" failonerror="false"/> <java classname="com.sun.enterprise.security.KeyTool"> <arg line="-pkcs12"/> <arg line="-pkcsFile ${pkcs12.file}"/> <arg line="-pkcsKeyStorePass ${pkcs12.pass}"/> <arg line="-pkcsKeyPass ${pkcs12.pass}"/> <arg line="-jksFile ${jks.file}"/> <arg line="-jksKeyStorePass ${jks.pass}"/> <classpath> <pathelement path="${s1as.classpath}"/> <pathelement path="${env.JAVA_HOME}/jre/lib/jsse.jar"/> </classpath> </java> </target>