wap2app tips generate its own certificate (Andrews articles)

 Troubles will resolve their problem   data flow

1. Install the JRE , configure the environment variables, java environment installed skip this step (Purpose: a, JRE own certificate creation and management tools keyTool).

 JRE installation steps:

(1) Oracle JRE from the official download the installation package:

         https://www.oracle.com/technetwork/java/javase/downloads/index.html

(2) Select the JRE click DOWNLOAD, and then choose to download the version according to their own system, I was windows64 bit, so I chose the following

(3) Oracle login account to download, no register a.

(4) the download is complete, Fool installed on the line, pay attention to remember the installation path.

Second, configure the system environment variables (with installation directory is "C: \ Program Files \ Java \ jre1.8.0_201" for example):

   Open a command line (cmd), enter the following command:

//切换工作目录到D:路径
d:   

//将jre命令添加到临时环境变量中
set PATH=%PATH%;"C:\Program Files\Java\jre1.8.0_201\bin"

2. Generate Signed Certificate

    Open a command line (cmd), enter the following command:

keytool -genkey -alias testalias -keyalg RSA -keysize 2048 -validity 36500 -keystore test.keystore
  • testalias certificate is an alias, you can modify the character they want to set, we recommend using English letters and numbers.

  • test.keystore is the certificate file name, you can modify the file name for themselves want to set.

After the carriage return will prompt:

Enter keystore password:  //输入证书文件密码,输入完成回车  
Re-enter new password:   //再次输入证书文件密码,输入完成回车  
What is your first and last name?  
  [Unknown]:  //输入名字和姓氏,输入完成回车  
What is the name of your organizational unit?  
  [Unknown]:  //输入组织单位名称,输入完成回车  
What is the name of your organization?  
  [Unknown]:  //输入组织名称,输入完成回车  
What is the name of your City or Locality?  
  [Unknown]:  //输入城市或区域名称,输入完成回车  
What is the name of your State or Province?  
  [Unknown]:  //输入省/市/自治区名称,输入完成回车  
What is the two-letter country code for this unit?  
  [Unknown]:  //输入国家/地区代号(两个字母),中国为CN,输入完成回车  
Is CN=XX, OU=XX, O=XX, L=XX, ST=XX, C=XX correct?  
  [no]:  //确认上面输入的内容是否正确,输入y,回车

Enter key password for <testalias>  
        (RETURN if same as keystore password):  //确认证书密码与证书文件密码一样(HBuilder|HBuilderX要求这两个密码一致),直接回车就可以

The above command will generate a certificate after the run is completed, the path is "D: \ test.keystore".

View Certificate Information

    You can use the following command to see:

keytool -list -v -keystore test.keystore  
Enter keystore password: //生成证书设置的密码

Information will output the following format:

Keystore type: PKCS12    
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: test    
Creation date: 2019-10-28    
Entry type: PrivateKeyEntry    
Certificate chain length: 1    
Certificate[1]:    
Owner: CN=Tester, OU=Test, O=Test, L=HD, ST=BJ, C=CN    
Issuer: CN=Tester, OU=Test, O=Test, L=HD, ST=BJ, C=CN    
Serial number: 7dd12840    
Valid from: Fri Jul 26 20:52:56 CST 2019 until: Sun Jul 02 20:52:56 CST 2119    
Certificate fingerprints:    
         MD5:  F9:F6:C8:1F:DB:AB:50:14:7D:6F:2C:4F:CE:E6:0A:A5    
         SHA1: BB:AC:E2:2F:97:3B:18:02:E7:D6:69:A3:7A:28:EF:D2:3F:A3:68:E7    
         SHA256: 24:11:7D:E7:36:12:BC:FE:AF:2A:6A:24:BD:04:4F:2E:33:E5:2D:41:96:5F:50:4D:74:17:7F:4F:E2:55:EB:26    
Signature algorithm name: SHA256withRSA    
Subject Public Key Algorithm: 2048-bit RSA key    
Version: 3

The information will be used when packaging:

  • MD5
    MD5 fingerprint information of the certificate (security code MD5)

  • SHA1
    SHA1 fingerprint information certificate (security code SHA1)

  • SHA256
    SHA256 fingerprint information certificate (security code SHA245)

The successful completion of the above steps to generate a certificate. You can use the certificate and related information packed apk files.

More problems encountered wap2app please pay attention to my public number: data flow

发布了14 篇原创文章 · 获赞 13 · 访问量 3303

Guess you like

Origin blog.csdn.net/Raleway/article/details/104079526