1

尝试使用 Facebook 登录编写我的第一个 Android 原生应用程序。

我得到一个 SSLHandshakeException 并且我不知道如何解决它。

我的主要活动继承自 FacebookActivity 并执行 openSession() 我得到了 Facebook 日志,但我无法登录(那是我得到异常的时候)

Facebook 应用程序中的“密钥哈希”是我从已签名应用程序的密钥库中获得的。

public class MainActivity extends FacebookActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  this.openSession();
  setContentView(R.layout.activity_main);

}

堆栈跟踪:

12-02 21:37:29.711: E/HttpOperation.run(2088): class javax.net.ssl.SSLHandshakeException org.bouncycastle.jce.exception.ExtCertPathValidatorException: IssuerName(OU=Class 3 Public Primary Certification Authority, O="VeriSign, Inc.", C=US) does not match SubjectName(OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign, OU=VeriSign International Server CA - Class 3, OU="VeriSign, Inc.", O=VeriSign Trust Network) of signing certificate. [https://api.facebook.com/restserver.php?api_key=882a8490361da98xxxxxxxxxxx1ddc14d&email=nicoxxxx.xxxxxxxx%40gmail.com&format=JSON&method=auth.login&migrations_override=%7B%27empty_json%27%3A+true%7D&password=M*****4&sig=76b8a7f5xxxxxxxx052875b7b831f&v=1.0]
12-02 21:37:29.711: E/HttpOperation(2088): Encountered exception: javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: IssuerName(OU=Class 3 Public Primary Certification Authority, O="VeriSign, Inc.", C=US) does not match SubjectName(OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign, OU=VeriSign International Server CA - Class 3, OU="VeriSign, Inc.", O=VeriSign Trust Network) of signing certificate.
12-02 21:37:29.711: W/System.err(2088): javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: IssuerName(OU=Class 3 Public Primary Certification Authority, O="VeriSign, Inc.", C=US) does not match SubjectName(OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign, OU=VeriSign International Server CA - Class 3, OU="VeriSign, Inc.", O=VeriSign Trust Network) of signing certificate.
12-02 21:37:29.711: W/System.err(2088):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:477)
4

0 回答 0