aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

Failed to disable SSL certificate verification

Open rupal-bq opened this issue 5 years ago • 0 comments

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug Setting verifySSL option to false in ClientConfiguration does not disable SSL certificate verification on windows. Request returns response code REQUEST_NOT_MADE.

SDK version number 1.8.34

Platform/OS/Hardware/Device Windows 10

To Reproduce (observed behavior) Steps to reproduce the behavior:

  1. Run Open Distro for Elasticsearch
  2. Use this code to send requests to the server.

Expected behavior The test should return the response code as OK.

Request curl -XGET https://localhost:9200/_cat/plugins?format=json -u admin:admin --insecure returns response code as OK

Logs/output aws_sdk_2020-08-25-22.log

[INFO] 2020-08-25 22:07:16.837 Aws_Init_Cleanup [14136] Initiate AWS SDK for C++ with Version:1.8.34
[TRACE] 2020-08-25 22:07:16.837 FileSystem [14136] Checking USERPROFILE for the home directory.
[DEBUG] 2020-08-25 22:07:16.837 FileSystem [14136] Environment value for variable USERPROFILE is C:\Users\Rupal
[INFO] 2020-08-25 22:07:16.837 Aws::Config::AWSConfigFileProfileConfigLoader [14136] Initializing config loader against fileName C:\Users\Rupal\.aws\credentials and using profilePrefix = 0
[TRACE] 2020-08-25 22:07:16.837 FileSystem [14136] Checking USERPROFILE for the home directory.
[DEBUG] 2020-08-25 22:07:16.837 FileSystem [14136] Environment value for variable USERPROFILE is C:\Users\Rupal
[INFO] 2020-08-25 22:07:16.837 Aws::Config::AWSConfigFileProfileConfigLoader [14136] Initializing config loader against fileName C:\Users\Rupal\.aws\config and using profilePrefix = 1
[TRACE] 2020-08-25 22:07:16.837 FileSystem [14136] Checking USERPROFILE for the home directory.
[DEBUG] 2020-08-25 22:07:16.837 FileSystem [14136] Environment value for variable USERPROFILE is C:\Users\Rupal
[INFO] 2020-08-25 22:07:16.837 Aws::Config::AWSConfigFileProfileConfigLoader [14136] Unable to open config file C:\Users\Rupal\.aws\credentials for reading.
[INFO] 2020-08-25 22:07:16.837 Aws::Config::AWSProfileConfigLoader [14136] Failed to reload configuration.
[TRACE] 2020-08-25 22:07:16.837 FileSystem [14136] Checking USERPROFILE for the home directory.
[DEBUG] 2020-08-25 22:07:16.837 FileSystem [14136] Environment value for variable USERPROFILE is C:\Users\Rupal
[DEBUG] 2020-08-25 22:07:16.837 Aws::Config::ConfigFileProfileFSM [14136] found profile default
[DEBUG] 2020-08-25 22:07:16.837 Aws::Config::ConfigFileProfileFSM [14136] found region us-west-2
[INFO] 2020-08-25 22:07:16.837 Aws::Config::AWSProfileConfigLoader [14136] Successfully reloaded configuration.
[TRACE] 2020-08-25 22:07:16.837 Aws::Config::AWSProfileConfigLoader [14136] reloaded config at 2020-08-25T22:07:16Z
[DEBUG] 2020-08-25 22:07:16.843 ClientConfiguration [14136] ClientConfiguration will use SDK Auto Resolved profile: [default] if not specified by users.
[WARN] 2020-08-25 22:07:16.843 ClientConfiguration [14136] Retry Strategy will use the default max attempts.
[INFO] 2020-08-25 22:07:16.843 EC2MetadataClient [14136] Creating AWSHttpResourceClient with max connections 2 and scheme http
[INFO] 2020-08-25 22:07:16.843 WinHttpSyncHttpClient [14136] Creating http client with user agent  with max connections 2 request timeout 1000,and connect timeout 1000
[DEBUG] 2020-08-25 22:07:16.861 WinHttpHttp2 [14136] HTTP/2 enabled on WinHttp handle: 000001A9F8364C80.
[DEBUG] 2020-08-25 22:07:16.861 WinHttpSyncHttpClient [14136] API handle 000001A9F8364C80
[INFO] 2020-08-25 22:07:16.861 ConnectionPoolMgr [14136] Creating connection pool mgr with handle 000001A9F8364C80, and max connections per host 2, request timeout 1000 ms, and connect timeout in 1000 ms, enabling TCP keep-alive.
[DEBUG] 2020-08-25 22:07:16.871 ClientConfiguration [14136] ClientConfiguration will use SDK Auto Resolved profile: [default] if not specified by users.
[WARN] 2020-08-25 22:07:16.871 ClientConfiguration [14136] Retry Strategy will use the default max attempts.
[INFO] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] Creating http client with user agent  with max connections 25 request timeout 3000,and connect timeout 1000
[DEBUG] 2020-08-25 22:07:16.871 WinHttpHttp2 [14136] HTTP/2 enabled on WinHttp handle: 000001A9F835A2E0.
[DEBUG] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] API handle 000001A9F835A2E0
[INFO] 2020-08-25 22:07:16.871 ConnectionPoolMgr [14136] Creating connection pool mgr with handle 000001A9F835A2E0, and max connections per host 25, request timeout 3000 ms, and connect timeout in 1000 ms, enabling TCP keep-alive.
[TRACE] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] Making GET request to uri https://localhost:9200/_cat/plugins?format=json
[INFO] 2020-08-25 22:07:16.871 WinHttpConnectionPoolMgr [14136] Attempting to acquire connection for localhost:9200
[DEBUG] 2020-08-25 22:07:16.871 WinHttpConnectionPoolMgr [14136] Pool doesn't exist for endpoint, creating...
[DEBUG] 2020-08-25 22:07:16.871 WinHttpConnectionPoolMgr [14136] Pool has no available existing connections for endpoint, attempting to grow pool.
[INFO] 2020-08-25 22:07:16.871 WinConnectionContainer [14136] Pool grown by 2
[INFO] 2020-08-25 22:07:16.871 WinHttpConnectionPoolMgr [14136] Connection now available, continuing.
[DEBUG] 2020-08-25 22:07:16.871 WinHttpConnectionPoolMgr [14136] Returning connection handle 000001A9F835B790
[DEBUG] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] Acquired connection 000001A9F835B790
[WARN] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] Failed setting TCP keep-alive interval with error code: 12018
[DEBUG] 2020-08-25 22:07:16.871 WinHttpHttp2 [14136] HTTP/2 enabled on WinHttp handle: 000001A9F836D230.
[DEBUG] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] AllocateWindowsHttpRequest returned handle 000001A9F836D230
[DEBUG] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] with headers:
[DEBUG] 2020-08-25 22:07:16.871 WinHttpSyncHttpClient [14136] authorization: Basic YWRtaW46YWRtaW4=

host: localhost:9200


[WARN] 2020-08-25 22:07:17.028 WinHttpSyncHttpClient [14136] Send request failed: A certificate is required to complete client authentication


[DEBUG] 2020-08-25 22:07:17.028 WinHttpSyncHttpClient [14136] Closing http request handle 000001A9F836D230
[DEBUG] 2020-08-25 22:07:17.029 WinHttpSyncHttpClient [14136] Releasing connection handle 000001A9F835B790
[DEBUG] 2020-08-25 22:07:17.029 WinHttpConnectionPoolMgr [14136] Releasing connection to endpoint localhost:9200

Additional context To build the SDK from source, this script is used.

rupal-bq avatar Aug 25 '20 22:08 rupal-bq