Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SalesforceInterface df-2014-heroku-thermostat-k64f SalesforceInterface
Fork of HTTPClient by
Revision 33:b663a5bab72d, committed 2014-08-29
- Comitter:
- ansond
- Date:
- Fri Aug 29 04:22:38 2014 +0000
- Parent:
- 32:d9db238bb8a3
- Child:
- 34:7a7e395f8df3
- Commit message:
- added SSL error display for debugging
Changed in this revision
| HTTPClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTTPClient.cpp Thu Aug 28 00:07:09 2014 +0000
+++ b/HTTPClient.cpp Fri Aug 29 04:22:38 2014 +0000
@@ -22,7 +22,7 @@
#define MAX_URL_PATH_LENGTH 128
//Debug is disabled by default
-#if 0
+#if 1
//Enable debug
#include <cstdio>
#define DBG(x, ...) std::printf("[HTTPClient : DBG]"x"\r\n", ##__VA_ARGS__);
@@ -314,11 +314,16 @@
return HTTP_CONN;
}
}
-
+
DBG("ctx=%x, ssl=%x, ssl->ctx->CBIORecv, CBIOSend=%x, %x\n",
ctx, ssl, SocketReceive, SocketSend ) ;
- if (CyaSSL_connect(ssl) != SSL_SUCCESS) {
+ int result = CyaSSL_connect(ssl);
+ if (result != SSL_SUCCESS) {
ERR("SSL_connect failed");
+ int err = CyaSSL_get_error(ssl, result);
+ char errorString[80];
+ CyaSSL_ERR_error_string(err, errorString);
+ ERR("SSL Error: %s (err=%d,status=%d)",errorString,err,result);
cyassl_free() ;
return HTTP_CONN;
}
