【Defold】OpenSSL で証明書と鍵の作り方

2020/09/15Defold, DEVELOP

certificate.pem と key.pk8 の作り方です。

目次

certificate.pem と key.pk8を作る

$ openssl genrsa -out key.pem 2048
$ openssl req -new -key key.pem -out request.pem
$ openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
$ openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt

certificate.pem と key.pk8 から .keystore と key.pk12を作る

openssl pkcs8 -in key.pk8 -inform DER -outform PEM -out key.pem -nocrypt	
openssl pkcs12 -export -in certificate.pem -inkey key.pem -out platform.pk12 -name hoge
keytool -importkeystore -srckeystore platform.pk12 -srcstoretype pkcs12 -destkeystore hoge.keystore -deststoretype pkcs12 -alias hoge

Posted by kazupon