Generating a certificate for Huawei App Gallery

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

6 Responses to Generating a certificate for Huawei App Gallery

  1. dmitriano says:

    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]

  2. dmitriano says:

    Converted:
    keytool -importkeystore -srckeystore C:\dev\repos\examples\Keys\LinesGame\linesgame.keystore -destkeystore C:\dev\repos\examples\Keys\LinesGame\linesgame.keystore -deststoretype pkcs12

  3. dmitriano says:

    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

  4. dmitriano says:

    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.

  5. dmitriano says:

    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

Leave a Reply

Your email address will not be published. Required fields are marked *