openssl certificate chain CN is corrupted

六眼飞鱼酱① 提交于 2019-12-14 03:10:38

问题


I'm working on Android application that call some web services from my server. I have created a Self-Signed Certificate from IIS to test calling APIs over https but failed with SSLPeerUnverifiedException exception.

I already ask a question on stackoverflow regarding this Call API on server that is signed using Self-Signed Certificate

After some digging and searching how to solve issue, I try the solution from following stackoverflow answer

When I try to read server certificate information using openssl I get following Certificate chain:

Certificate chain
 0 s:/CN=\x00S\x00S\x00_\x00C\x00E\x00M\x00_\x005\x00_\x004
   i:/CN=\x00S\x00S\x00_\x00C\x00E\x00M\x00_\x005\x00_\x004

My server name is SS_CEM_5_4, and above exception indicate that verifying host name failed.

Are these \x00 characters before each CN character is the problem, which lead to mismatch between certificate host name and server name?

I'm not sure what I'm doing wrong? Where should I start looking for the solution, generating certificate or my application?

Note: I create a new thread for this question to focus on certificate rather than my Android application.

来源:https://stackoverflow.com/questions/57767266/openssl-certificate-chain-cn-is-corrupted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!