1
Googleアプリケーションエンジンインスタンスからaws apiゲートウェイサービスに接続しようとしています。これは、私が取得エラー:この1は私のコードであるGoogleアプリケーションエンジンがhttps証明書を拒否しています
[INFO] Caused by: javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate for URL: https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/v1?text=
[INFO] at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:175)
[INFO] at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:45)
[INFO] at com.idiommaster.webpage.search.Search.get(Search.java:199)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
:コメントであるには余りにも長いので、コメントで要求されるように
URLFetchService fetcher = URLFetchServiceFactory.getURLFetchService();
FetchOptions lFetchOptions = FetchOptions.Builder.doNotValidateCertificate();
HTTPRequest request = new HTTPRequest(new URL("https://XXXXXXXXXXXXXX.execute-api.us-east-1.amazonaws"), HTTPMethod.GET, lFetchOptions);
HTTPResponse response = fetcher.fetch(request);
カール、私はここに掲載:
* Connected to xxxxxxx.execute-api.us-east-1.amazonaws.com (52.85.142.24x) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.execute-api.us-east-1.amazonaws.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> GET /v1?text=the+straw HTTP/1.1
> Host: xxx.execute-api.us-east-1.amazonaws.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 43433
< Connection: keep-alive
< Date: Thu, 23 Mar 2017 17:56:21 GMT
< x-amzn-RequestId: 050ab71b-0ff2-11e7-b034-217b9575c6f5
< x-custom-response-header: my custom response header value
< X-Amzn-Trace-Id: Root=1-58d40c43-eaaf8845a188b027ada01e01
< X-Cache: Miss from cloudfront
< Via: 1.1 52e0e6fa81aadeace92f9bb6da8543da.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: aKaM_Lvpul1e1eHL7tAbKxY8Z9jwBc1O30xP0_garliKVFBlMR80MA==
とにかく、私は問題を一時的に修正しました。展開すると、ローカルに見えます。とにかく、それを使用することは簡単ではない
エンドポイントを '' 'cUrl -v'''でテストして結果を投稿できますか? –
私も同じ問題を抱えています。私はすでにいくつか試してみましたが(Java 7にデフォルトのTLS 1.0の代わりにTLS 1.2を使用させようとしたようなものですが)、どれも動作しません。あなたの一時的な修正は何でしたか? – ndtreviv