List existing certificates:
set PATH=%PATH%;C:\Program Files\Android\Android Studio\jbr\bin
keytool.exe -list -v -keystore linesgame.keystore
Generate the new one:
keytool.exe -genkey -v -keystore linesgame.keystore -alias linesgame-huawei -keyalg RSA -keysize 2048 -validity 100000
Deleting a certificate:
keytool.exe -delete -alias linesgame-huawei -keystore linesgame.keystore
Export:
keytool.exe -export -rfc -keystore linesgame.keystore -alias linesgame-huawei -file linesgame-huawei.pem
Build AAB and check its signature:
keytool -printcert -jarfile android-build-release.aab
https://help.gamesalad.com/windows-cookbook/publishing/android-publishing/android-app-bundle-aab-command-line-signing/
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore [path to keystore] -signedjar [name for the output signed file].aab [path to unsigned aab] [keystore alias]
Upgrade your app signing key in Google Play:
https://support.google.com/googleplay/android-developer/answer/9842756?visit_id=638150905149654896-2147605919&rd=1#upgrade
Converted:
keytool -importkeystore -srckeystore C:\dev\repos\examples\Keys\LinesGame\linesgame.keystore -destkeystore C:\dev\repos\examples\Keys\LinesGame\linesgame.keystore -deststoretype pkcs12
https://serverfault.com/questions/1010222/convert-cer-to-csr-using-openssl-or-keytool
You can create a CSR from a certificate using OpenSSL as follows:
openssl x509 -x509toreq -signkey ./server.key -in ./server.pem -out server.csr
What is a CSR? A certificate signing request (CSR) is an encoded file containing information about your website, service, organization, and domain name. This information is used by a Certificate Authority (CA) to create an SSL/TLS certificate for your website to encrypt traffic to your site.
Generate the Certificate Signing Request.
https://docs.oracle.com/cd/E19509-01/820-3503/ggezu/index.html
keytool –keystore clientkeystore –certreq –alias client –keyalg rsa
–file client.csr