Skip to content

Commit

Permalink
SSL fixes:
Browse files Browse the repository at this point in the history
- wrong incude directory for OpenSSL
- added errormessage for SEC_E_ILLEGAL_MESSAGE
  • Loading branch information
9EOR9 committed Mar 14, 2016
1 parent 5eaeb24 commit bb365dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ IF(NOT WITH_SSL STREQUAL "OFF")
ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_SSL)
SET(SSL_SOURCES "${CMAKE_SOURCE_DIR}/libmariadb/secure/openssl.c")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
INCLUDE_DIRECTORIES(BEFORE ${OPENSSL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(BEFORE ${OPENSSL_INCLUDE_DIR})
MESSAGE(STATUS "OpenSSL version: ${OPENSSL_VERSION}")
ELSE()
MESSAGE(WARNING "OpenSSL not found")
Expand Down
3 changes: 3 additions & 0 deletions libmariadb/secure/ma_schannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void ma_schannel_set_sec_error(MARIADB_PVIO *pvio, DWORD ErrorNo)
{
MYSQL *mysql= pvio->mysql;
switch(ErrorNo) {
case SEC_E_ILLEGAL_MESSAGE:
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "The message received was unexpected or badly formatted");
break;
case SEC_E_UNTRUSTED_ROOT:
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Untrusted root certificate");
break;
Expand Down

0 comments on commit bb365dd

Please sign in to comment.