Phenomenon: WeChat development , after the code is obtained through the user's default authorization, the program uses HttpClient to obtain the openId. There is no problem when testing locally. After deploying to the server, the request will report an error.
After inquiry, centos openjdk does not support https method! ! The interface links of WeChat are all https.
Solution:
Server command: yum install nss.x86_64 to download the latest nss version
Then find the ${jre_home}/lib/security/ Java .security file, ${jre_home} is /usr/lib/jvm/jre by default
Add security.provider.10=sun.security.pkcs11.SunPKCS11 to the file ${java.home}/lib/security/nss.cfg
Then it works.