Skip to content

Error while running PubSub sample #85

@ritsnrazz

Description

@ritsnrazz

Hi,

I have to use C++ SDK for my project. So to start I am trying to start with sample code. When I executed PubSub sample code looks like I am getting some connection issue. VS2017 output console displaying as follows and then exiting from all the threads:
[INFO] Sun Jan 4 05:13:47 1970
:222 [OpenSSL Wrapper] [22208] [awsiotsdk::network::OpenSSLConnection::ConnectTCPSocket:L218] : resolved a1c2xuxbv413do.iot.us-west-2.amazonaws.com to 34.217.159.139
Press any key to continue!!!!

The time in the output console doesn't seems to be correct in this output console, but I checked the time and date in separate cmd window and it displayed the time correctly. So looks like when I am executing the test in VS2017, the output console is not displaying the time correctly. If this could be the issue then how to fix this for this output console?

It doesn't seems to be openssl issue, I verified with:
openssl s_client -connect xxxxxxxxxxx.iot.us-west-2.amazonaws.com:8883 -showcerts -tls1_2 -CAfile "C:\Work\aws-iot-device-sdk-cpp-master\build\samples\PubSub\certs\rootCA.pem" -cert "C:\Work\aws-iot-device-sdk-cpp-master\build\samples\PubSub\certs\dev-dl-gehc-bch-sdk-mgp-n5.cert.pem" -key "C:\Work\aws-iot-device-sdk-cpp-master\build\samples\PubSub\certs\dev-dl-gehc-bch-sdk-mgp-n5.private.key"

The output:
**CONNECTED(000001C8)
depth=2 C = US, O = "xxxxxxxxx, Inc.", OU = xxxxxxxxx Trust Network, OU = "(c) 2006 xxxxxxxxx, Inc. - For authorized use only", CN = xxxxxxxxx Class 3 Public Primary Certification Authority - G5
verify return:1
depth=1 C = US, O = xxxxx Corporation, OU = xxxxx Trust Network, CN = xxxxx Class 3 Secure Server CA - G4
verify return:1
depth=0 C = US, ST = xxxxxxx, L = yyyyyyyy, O = "Amazon.com, Inc.", CN = *.iot.us-west-2.amazonaws.com
verify return:1

Certificate chain
0 s:/C=US/ST=xxxxxxx/L=yyyyyyyy/O=Amazon.com, Inc./CN=*.iot.us-west-2.amazonaws.com
i:/C=US/O=xxxxx Corporation/OU=xxxxx Trust Network/CN=xxxxx Class 3 Secure Server CA - G4
-----BEGIN CERTIFICATE-----
*Removed for security
-----END CERTIFICATE-----
1 s:/C=US/O=xxxxx Corporation/OU=xxxxx Trust Network/CN=xxxxx Class 3 Secure Server CA - G4
i:/C=US/O=xxxxxxxxx, Inc./OU=xxxxxxxxx Trust Network/OU=(c) 2006 xxxxxxxxx, Inc. - For authorized use only/CN=xxxxxxxxx Class 3 Public Primary Certification Authority - G5
-----BEGIN CERTIFICATE-----
*Removed for security
-----END CERTIFICATE-----

Server certificate
subject=/C=US/ST=xxxxxxx/L=yyyyyyyy/O=Amazon.com, Inc./CN=*.iot.us-west-2.amazonaws.com
issuer=/C=US/O=xxxxx Corporation/OU=xxxxx Trust Network/CN=xxxx Class 3 Secure Server CA - G4

No client certificate CA names sent
Client Certificate Types: RSA sign, DSA sign, ECDSA sign
Requested Signature Algorithms: ECDSA+SHA512:RSA+SHA512:ECDSA+SHA384:RSA+SHA384:ECDSA+SHA256:RSA+SHA256:DSA+SHA256:ECDSA+SHA224:RSA+SHA224:DSA+SHA224:ECDSA+SHA1:RSA+SHA1:DSA+SHA1
Shared Requested Signature Algorithms: ECDSA+SHA512:RSA+SHA512:ECDSA+SHA384:RSA+SHA384:ECDSA+SHA256:RSA+SHA256:DSA+SHA256:ECDSA+SHA224:RSA+SHA224:DSA+SHA224:ECDSA+SHA1:RSA+SHA1:DSA+SHA1
Peer signing digest: SHA512
Server Temp Key: ECDH, P-256, 256 bits

SSL handshake has read 3429 bytes and written 1579 bytes

New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is xxxx bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: 5AD42753A3D77BD4B56F16C4E5F09222A2209AC30E32BA062F490D6AC39C491F
Session-ID-ctx:
Master-Key: FE5317963EFF7B68B11697BCE3678CE217A98396EDB40D7319E6CC1359860D946AC79AE4A5BD55DDBB8E4C03F2F3F78D
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1523853140
Timeout : 7200 (sec)
Verify return code: 0 (ok)
---**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions