163

libを使用してHTTPS接続を確立しようとしていますが、問題は、証明書が、Androidの信頼できる証明書のセットにリストされているVerisignGlobalSIgnHttpClientなどの認識された認証局(CA)によって署名されていないためです。私は取得し続けます。javax.net.ssl.SSLException: Not trusted server certificate

すべての証明書を受け入れるだけのソリューションを見てきましたが、ユーザーに質問したい場合はどうすればよいですか?

ブラウザと同様のダイアログを表示して、ユーザーが続行するかどうかを決定できるようにしたい。できれば、ブラウザと同じ証明書ストアを使用したいと思います。何か案は?

4

13 に答える 13

174

最初に行う必要があるのは、検証のレベルを設定することです。そのようなレベルはそれほど多くありません:

  • ALLOW_ALL_HOSTNAME_VERIFIER
  • BROWSER_COMPATIBLE_HOSTNAME_VERIFIER
  • STRICT_HOSTNAME_VERIFIER

メソッドsetHostnameVerifier()は、新しいライブラリapacheでは廃止されていますが、AndroidSDKのバージョンでは正常です。そして、それをALLOW_ALL_HOSTNAME_VERIFIERメソッドファクトリに設定しSSLSocketFactory.setHostnameVerifier()ます。

次に、プロトコルのファクトリをhttpsに設定する必要があります。これを行うには、SchemeRegistry.register()メソッドを呼び出すだけです。

DefaultHttpClient次に、を使用してを作成する必要がありますSingleClientConnManagerALLOW_ALL_HOSTNAME_VERIFIERまた、以下のコードでは、デフォルトでメソッドによってフラグ()も使用されることがわかります。HttpsURLConnection.setDefaultHostnameVerifier()

以下のコードは私のために働きます:

HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;

DefaultHttpClient client = new DefaultHttpClient();

SchemeRegistry registry = new SchemeRegistry();
SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();
socketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);
registry.register(new Scheme("https", socketFactory, 443));
SingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);
DefaultHttpClient httpClient = new DefaultHttpClient(mgr, client.getParams());

// Set verifier     
HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);

// Example send http request
final String url = "https://encrypted.google.com/";
HttpPost httpPost = new HttpPost(url);
HttpResponse response = httpClient.execute(httpPost);
于 2010-10-11T08:02:28.080 に答える
130

次の主な手順は、Androidプラットフォームによって信頼されていると見なされない認証局からの安全な接続を実現するために必要です。

多くのユーザーからの要望に応じて、ブログ記事の最も重要な部分をここに反映しました。

  1. 必要なすべての証明書(ルートおよび中間CA)を取得します
  2. keytoolとBouncyCastleプロバイダーを使用してキーストアを作成し、証明書をインポートします
  3. Androidアプリにキーストアをロードし、セキュリティで保護された接続に使用します(標準の代わりに、 Apache HttpClientjava.net.ssl.HttpsURLConnectionを使用することをお勧めします(理解しやすく、パフォーマンスが高い)

証明書を取得します

エンドポイント証明書からルートCAまでのチェーンを構築するすべての証明書を取得する必要があります。これは、(存在する場合は)中間CA証明書とルートCA証明書を意味します。エンドポイント証明書を取得する必要はありません。

キーストアを作成する

BouncyCastle Providerをダウンロードして、既知の場所に保存します。また、keytoolコマンド(通常はJREインストールのbinフォルダーの下にあります)を呼び出せることを確認してください。

次に、取得した証明書をBouncyCastle形式のキーストアにインポートします(エンドポイント証明書はインポートしないでください)。

テストはしていませんが、証明書をインポートする順序は重要だと思います。つまり、最初に最下位の中間CA証明書をインポートしてから、ルートCA証明書までインポートします。

次のコマンドを使用すると、パスワードmysecretを持つ新しいキーストア(まだ存在しない場合)が作成され、中間CA証明書がインポートされます。また、BouncyCastleプロバイダーを定義しました。これは、ファイルシステムとキーストア形式で見つけることができます。チェーン内の証明書ごとにこのコマンドを実行します。

keytool -importcert -v -trustcacerts -file "path_to_cert/interm_ca.cer" -alias IntermediateCA -keystore "res/raw/mykeystore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "path_to_bouncycastle/bcprov-jdk16-145.jar" -storetype BKS -storepass mysecret

証明書がキ​​ーストアに正しくインポートされたかどうかを確認します。

keytool -list -keystore "res/raw/mykeystore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "path_to_bouncycastle/bcprov-jdk16-145.jar" -storetype BKS -storepass mysecret

チェーン全体を出力する必要があります:

RootCA, 22.10.2010, trustedCertEntry, Thumbprint (MD5): 24:77:D9:A8:91:D1:3B:FA:88:2D:C2:FF:F8:CD:33:93
IntermediateCA, 22.10.2010, trustedCertEntry, Thumbprint (MD5): 98:0F:C3:F8:39:F7:D8:05:07:02:0D:E3:14:5B:29:43

これで、Androidアプリのrawリソースとしてキーストアをコピーできます。res/raw/

アプリでキーストアを使用する

まず、HTTPS接続にキーストアを使用するカスタムApacheHttpClientを作成する必要があります。

import org.apache.http.*

public class MyHttpClient extends DefaultHttpClient {

    final Context context;

    public MyHttpClient(Context context) {
        this.context = context;
    }

    @Override
    protected ClientConnectionManager createClientConnectionManager() {
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        // Register for port 443 our SSLSocketFactory with our keystore
        // to the ConnectionManager
        registry.register(new Scheme("https", newSslSocketFactory(), 443));
        return new SingleClientConnManager(getParams(), registry);
    }

    private SSLSocketFactory newSslSocketFactory() {
        try {
            // Get an instance of the Bouncy Castle KeyStore format
            KeyStore trusted = KeyStore.getInstance("BKS");
            // Get the raw resource, which contains the keystore with
            // your trusted certificates (root and any intermediate certs)
            InputStream in = context.getResources().openRawResource(R.raw.mykeystore);
            try {
                // Initialize the keystore with the provided trusted certificates
                // Also provide the password of the keystore
                trusted.load(in, "mysecret".toCharArray());
            } finally {
                in.close();
            }
            // Pass the keystore to the SSLSocketFactory. The factory is responsible
            // for the verification of the server certificate.
            SSLSocketFactory sf = new SSLSocketFactory(trusted);
            // Hostname verification from certificate
            // http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506
            sf.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);
            return sf;
        } catch (Exception e) {
            throw new AssertionError(e);
        }
    }
}

カスタムHttpClientを作成しました。これで、安全な接続に使用できます。たとえば、RESTリソースに対してGET呼び出しを行う場合:

// Instantiate the custom HttpClient
DefaultHttpClient client = new MyHttpClient(getApplicationContext());
HttpGet get = new HttpGet("https://www.mydomain.ch/rest/contacts/23");
// Execute the GET call and obtain the response
HttpResponse getResponse = client.execute(get);
HttpEntity responseEntity = getResponse.getEntity();

それでおしまい ;)

于 2010-10-22T15:16:37.283 に答える
19

デバイスにないサーバーにカスタム/自己署名証明書がある場合は、以下のクラスを使用してそれをロードし、Androidのクライアント側で使用できます。

から利用できるように証明書*.crtファイルを配置します/res/rawR.raw.*

以下のクラスを使用して、またはその証明書を使用するソケットファクトリを持つHTTPClientまたはを取得します。HttpsURLConnection

package com.example.customssl;

import android.content.Context;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.AllowAllHostnameVerifier;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;

import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;

public class CustomCAHttpsProvider {

    /**
     * Creates a {@link org.apache.http.client.HttpClient} which is configured to work with a custom authority
     * certificate.
     *
     * @param context       Application Context
     * @param certRawResId  R.raw.id of certificate file (*.crt). Should be stored in /res/raw.
     * @param allowAllHosts If true then client will not check server against host names of certificate.
     * @return Http Client.
     * @throws Exception If there is an error initializing the client.
     */
    public static HttpClient getHttpClient(Context context, int certRawResId, boolean allowAllHosts) throws Exception {


        // build key store with ca certificate
        KeyStore keyStore = buildKeyStore(context, certRawResId);

        // init ssl socket factory with key store
        SSLSocketFactory sslSocketFactory = new SSLSocketFactory(keyStore);

        // skip hostname security check if specified
        if (allowAllHosts) {
            sslSocketFactory.setHostnameVerifier(new AllowAllHostnameVerifier());
        }

        // basic http params for client
        HttpParams params = new BasicHttpParams();

        // normal scheme registry with our ssl socket factory for "https"
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        schemeRegistry.register(new Scheme("https", sslSocketFactory, 443));

        // create connection manager
        ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(params, schemeRegistry);

        // create http client
        return new DefaultHttpClient(cm, params);
    }

    /**
     * Creates a {@link javax.net.ssl.HttpsURLConnection} which is configured to work with a custom authority
     * certificate.
     *
     * @param urlString     remote url string.
     * @param context       Application Context
     * @param certRawResId  R.raw.id of certificate file (*.crt). Should be stored in /res/raw.
     * @param allowAllHosts If true then client will not check server against host names of certificate.
     * @return Http url connection.
     * @throws Exception If there is an error initializing the connection.
     */
    public static HttpsURLConnection getHttpsUrlConnection(String urlString, Context context, int certRawResId,
                                                           boolean allowAllHosts) throws Exception {

        // build key store with ca certificate
        KeyStore keyStore = buildKeyStore(context, certRawResId);

        // Create a TrustManager that trusts the CAs in our KeyStore
        String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
        TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
        tmf.init(keyStore);

        // Create an SSLContext that uses our TrustManager
        SSLContext sslContext = SSLContext.getInstance("TLS");
        sslContext.init(null, tmf.getTrustManagers(), null);

        // Create a connection from url
        URL url = new URL(urlString);
        HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();
        urlConnection.setSSLSocketFactory(sslContext.getSocketFactory());

        // skip hostname security check if specified
        if (allowAllHosts) {
            urlConnection.setHostnameVerifier(new AllowAllHostnameVerifier());
        }

        return urlConnection;
    }

    private static KeyStore buildKeyStore(Context context, int certRawResId) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {
        // init a default key store
        String keyStoreType = KeyStore.getDefaultType();
        KeyStore keyStore = KeyStore.getInstance(keyStoreType);
        keyStore.load(null, null);

        // read and add certificate authority
        Certificate cert = readCert(context, certRawResId);
        keyStore.setCertificateEntry("ca", cert);

        return keyStore;
    }

    private static Certificate readCert(Context context, int certResourceId) throws CertificateException, IOException {

        // read certificate resource
        InputStream caInput = context.getResources().openRawResource(certResourceId);

        Certificate ca;
        try {
            // generate a certificate
            CertificateFactory cf = CertificateFactory.getInstance("X.509");
            ca = cf.generateCertificate(caInput);
        } finally {
            caInput.close();
        }

        return ca;
    }

}

キーポイント:

  1. Certificateオブジェクトは.crtファイルから生成されます。
  2. デフォルトKeyStoreが作成されます。
  3. keyStore.setCertificateEntry("ca", cert)エイリアス「ca」でキーストアに証明書を追加しています。コードを変更して、証明書(中間CAなど)を追加します。
  4. 主な目的は、またはSSLSocketFactoryで使用できるを生成することです。HTTPClientHttpsURLConnection
  5. SSLSocketFactoryたとえば、ホスト名の検証などをスキップするようにさらに構成できます。

詳細については、http://developer.android.com/training/articles/security-ssl.htmlをご覧ください。

于 2014-05-16T14:23:10.603 に答える
13

httpsを使用してAndroidアプリをRESTfulサービスに接続しようとしてイライラしました。また、証明書チェックを完全に無効にすることを提案するすべての回答について少しイライラしました。もしそうなら、httpsのポイントは何ですか?

しばらくの間このトピックについてグーグルで検索した後、私はついに外部jarが不要で、AndroidAPIだけが必要なこのソリューションを見つけました。2014年7月に投稿してくれたAndrewSmithに感謝します

 /**
 * Set up a connection to myservice.domain using HTTPS. An entire function
 * is needed to do this because myservice.domain has a self-signed certificate.
 * 
 * The caller of the function would do something like:
 * HttpsURLConnection urlConnection = setUpHttpsConnection("https://littlesvr.ca");
 * InputStream in = urlConnection.getInputStream();
 * And read from that "in" as usual in Java
 * 
 * Based on code from:
 * https://developer.android.com/training/articles/security-ssl.html#SelfSigned
 */
public static HttpsURLConnection setUpHttpsConnection(String urlString)
{
    try
    {
        // Load CAs from an InputStream
        // (could be from a resource or ByteArrayInputStream or ...)
        CertificateFactory cf = CertificateFactory.getInstance("X.509");

        // My CRT file that I put in the assets folder
        // I got this file by following these steps:
        // * Go to https://littlesvr.ca using Firefox
        // * Click the padlock/More/Security/View Certificate/Details/Export
        // * Saved the file as littlesvr.crt (type X.509 Certificate (PEM))
        // The MainActivity.context is declared as:
        // public static Context context;
        // And initialized in MainActivity.onCreate() as:
        // MainActivity.context = getApplicationContext();
        InputStream caInput = new BufferedInputStream(MainActivity.context.getAssets().open("littlesvr.crt"));
        Certificate ca = cf.generateCertificate(caInput);
        System.out.println("ca=" + ((X509Certificate) ca).getSubjectDN());

        // Create a KeyStore containing our trusted CAs
        String keyStoreType = KeyStore.getDefaultType();
        KeyStore keyStore = KeyStore.getInstance(keyStoreType);
        keyStore.load(null, null);
        keyStore.setCertificateEntry("ca", ca);

        // Create a TrustManager that trusts the CAs in our KeyStore
        String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
        TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
        tmf.init(keyStore);

        // Create an SSLContext that uses our TrustManager
        SSLContext context = SSLContext.getInstance("TLS");
        context.init(null, tmf.getTrustManagers(), null);

        // Tell the URLConnection to use a SocketFactory from our SSLContext
        URL url = new URL(urlString);
        HttpsURLConnection urlConnection = (HttpsURLConnection)url.openConnection();
        urlConnection.setSSLSocketFactory(context.getSocketFactory());

        return urlConnection;
    }
    catch (Exception ex)
    {
        Log.e(TAG, "Failed to establish SSL connection to server: " + ex.toString());
        return null;
    }
}

それは私のモックアップアプリにとってはうまくいきました。

于 2016-01-28T11:14:38.433 に答える
8

HTTP / HTTPS接続にはAndroidVolleyを使用することをお勧めします。これは、HttpClient非推奨です。だから、あなたは正しい選択を知っています:)。

また、SSL証明書をNUKEしないでください(決して!!!)。

SSL証明書を削除することは、セキュリティを促進するSSLの目的に完全に反します。来るすべてのSSL証明書を爆撃することを計画している場合、SSLを使用する意味はありません。より良い解決策はTrustManager、HTTP/HTTPS接続にAndroidVolleyを使用してアプリにカスタムを作成することです。

これは、基本的なLoginAppを使用して作成した要点であり、サーバー側で自己署名証明書を使用してHTTPS接続を実行し、アプリで受け入れられます。

サーバーでセットアップするための自己署名SSL証明書を作成し、アプリで証明書を使用するために役立つ可能性のある別の要点もあります。非常に重要です。上記のスクリプトによって生成された.crtファイルを、Androidプロジェクトの「raw」ディレクトリにコピーする必要があります。

于 2016-10-18T15:42:43.140 に答える
6

一番上の答えは私にはうまくいきませんでした。調査の結果、「Androidデベロッパー」で必要な情報が見つかりました: https ://developer.android.com/training/articles/security-ssl.html#SelfSigned

X509TrustManagerの空の実装を作成すると、次のトリックが実行されました。

private static class MyTrustManager implements X509TrustManager
{

    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType)
         throws CertificateException
    {
    }

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType)
        throws CertificateException
    {
    }

    @Override
    public X509Certificate[] getAcceptedIssuers()
    {
        return null;
    }

}

...

HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
try
{
    // Create an SSLContext that uses our TrustManager
    SSLContext context = SSLContext.getInstance("TLS");
    TrustManager[] tmlist = {new MyTrustManager()};
    context.init(null, tmlist, null);
    conn.setSSLSocketFactory(context.getSocketFactory());
}
catch (NoSuchAlgorithmException e)
{
    throw new IOException(e);
} catch (KeyManagementException e)
{
    throw new IOException(e);
}
conn.setRequestMethod("GET");
int rcode = conn.getResponseCode();

TustManagerのこの空の実装は単なる例であり、生産的な環境で使用すると、深刻なセキュリティ上の脅威が発生することに注意してください。

于 2014-08-15T17:02:15.493 に答える
4

この問題を回避するためにKeyStoreに証明書を追加する方法は次のとおりです。HTTPS経由でHttpClientを使用してすべての証明書を信頼する

要求したようにユーザーにプロンプ​​トを表示することはありませんが、ユーザーが「信頼できないサーバー証明書」エラーに遭遇する可能性は低くなります。

于 2011-06-16T21:32:51.520 に答える
4

SSL証明書を作成する最も簡単な方法

Firefoxを開きます(Chromeでも可能だと思いますが、FFの方が簡単です)

自己署名SSL証明書を使用して開発サイトにアクセスします。

証明書(サイト名の横)をクリックします

「詳細情報」をクリックします

「証明書の表示」をクリックします

「詳細」をクリックします

「エクスポート...」をクリックします

「X.509証明書チェーン(PEM)」を選択し、保存するフォルダーと名前を選択して、「保存」をクリックします。

コマンドラインに移動し、pemファイルをダウンロードしたディレクトリに移動して、「openssl x509 -inform PEM -outform DM -in.pem-out.crt」を実行します。

.crtファイルをAndroidデバイス内の/sdcardフォルダーのルートにコピーします。Androidデバイス内で、[設定]>[セキュリティ]>[ストレージからインストール]を選択します。

証明書を検出し、デバイスに追加できるようにする必要があります。開発サイトを参照します。

初めてセキュリティ例外を確認するように求められるはずです。それで全部です。

証明書は、Androidにインストールされているすべてのブラウザー(ブラウザー、Chrome、Opera、Dolphin ...)で機能する必要があります。

別のドメインから静的ファイルを提供している場合(私たちはすべてページ速度の愚痴です)、そのドメインの証明書も追加する必要があることに注意してください。

于 2017-07-27T07:31:56.387 に答える
2

Androidで特定の証明書を信頼するために、小さなライブラリssl-utils-androidを作成しました。

アセットディレクトリからファイル名を指定するだけで、任意の証明書をロードできます。

使用法:

OkHttpClient client = new OkHttpClient();
SSLContext sslContext = SslUtils.getSslContextForCertificateFile(context, "BPClass2RootCA-sha2.cer");
client.setSslSocketFactory(sslContext.getSocketFactory());
于 2016-03-31T10:22:01.140 に答える
2

SDK 16、リリース4.1.2を対象とする開発プラットフォームでは、これらの修正はいずれも機能しなかったため、回避策を見つけました。

私のアプリは「 http://www.example.com/page.php?data=somedata」を使用してサーバーにデータを保存します

最近、page.phpは「https://www.secure-example.com/page.php」に移動され、「javax.net.ssl.SSLException:信頼できないサーバー証明書」を取得し続けます。

このガイドから始めて、1ページだけのすべての証明書を受け入れる代わりに、 「 http://www.example.com/page.php」で公開されている独自のpage.phpを作成する際の問題を解決しました。

<?php

caronte ("https://www.secure-example.com/page.php");

function caronte($url) {
    // build curl request
    $ch = curl_init();
    foreach ($_POST as $a => $b) {
        $post[htmlentities($a)]=htmlentities($b);
    }
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($post));

    // receive server response ...
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $server_output = curl_exec ($ch);
    curl_close ($ch);

    echo $server_output;
}

?>
于 2017-02-18T00:11:40.833 に答える
2

2020年1月19日自己署名証明書問題の修正:

ビデオ、画像を再生したり、自己署名証明書のWebサービスを呼び出したり、セキュリティで保護されていないURLに接続したりするには、アクションを実行する前にこのメソッドを呼び出すだけで、証明書の問題に関する問題が修正されます。

KOTLINコード

  private fun disableSSLCertificateChecking() {
        val hostnameVerifier = object: HostnameVerifier {
            override fun verify(s:String, sslSession: SSLSession):Boolean {
                return true
            }
        }
        val trustAllCerts = arrayOf<TrustManager>(object: X509TrustManager {
            override fun getAcceptedIssuers(): Array<X509Certificate> {
                TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
            }

            //val acceptedIssuers:Array<X509Certificate> = null
            @Throws(CertificateException::class)
            override fun checkClientTrusted(arg0:Array<X509Certificate>, arg1:String) {// Not implemented
            }
            @Throws(CertificateException::class)
            override fun checkServerTrusted(arg0:Array<X509Certificate>, arg1:String) {// Not implemented
            }
        })
        try
        {
            val sc = SSLContext.getInstance("TLS")
            sc.init(null, trustAllCerts, java.security.SecureRandom())
            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory())
            HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier)
        }
        catch (e: KeyManagementException) {
            e.printStackTrace()
        }
        catch (e: NoSuchAlgorithmException) {
            e.printStackTrace()
        }
    }
于 2020-01-19T12:29:13.517 に答える
0

たぶんこれは役立つでしょう...それは自己署名証明書を使用するJavaクライアントで動作します(証明書のチェックはありません)。それはまったく安全ではないので、注意して開発の場合にのみ使用してください!!

ApacheHttpClient4.0でSSL証明書エラーを無視する方法

HttpClientライブラリを追加するだけでAndroidで動作することを願っています...頑張ってください!!

于 2011-07-05T11:47:55.317 に答える
0

これは、A、ndroid 2.xでのSNI(サーバー名識別)サポートの欠如に起因する問題です。次の質問に出くわすまで、私はこの問題に1週間苦労していました。この質問は、問題の背景を説明するだけでなく、セキュリティホールのない実用的で効果的なソリューションを提供します。

Android 2.3では「ピア証明書なし」エラーが発生しますが、4では発生しません

于 2012-04-01T10:20:57.160 に答える