"Fossies" - the Fresh Open Source Software Archive

Member "mariadb-connector-c-3.0.8-src/plugins/auth/CMakeLists.txt" (18 Dec 2018, 3312 Bytes) of package /linux/misc/mariadb-connector-c-3.0.8-src.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 3.0.7_vs_3.0.8.

    1 SET(AUTH_DIR ${CC_SOURCE_DIR}/plugins/auth)
    2 
    3 INCLUDE_DIRECTORIES(${AUTH_DIR})
    4 INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include)
    5 
    6 #native password
    7 REGISTER_PLUGIN(TARGET mysql_native_password
    8                 TYPE MARIADB_CLIENT_PLUGIN_AUTH
    9                 CONFIGURATIONS STATIC
   10                 DEFAULT STATIC
   11                 SOURCES ${CC_SOURCE_DIR}/plugins/auth/my_auth.c)
   12 
   13 #Dialog client authentication plugin
   14 REGISTER_PLUGIN(TARGET dialog
   15                 TYPE MARIADB_CLIENT_PLUGIN_AUTH
   16                 CONFIGURATIONS DYNAMIC STATIC OFF
   17                 DEFAULT DYNAMIC
   18                 SOURCES ${CC_SOURCE_DIR}/plugins/auth/dialog.c
   19                         ${CC_SOURCE_DIR}/libmariadb/get_password.c)
   20 
   21 # SHA256 caching plugin for MySQL 8.0 connection
   22 IF(WITH_SSL)
   23   IF(${WITH_SSL} STREQUAL "OPENSSL")
   24     SET(CRYPT_SOURCE ${CC_SOURCE_DIR}/libmariadb/secure/openssl_crypt.c)
   25     SET(CACHING_SHA2_LIBS ${SSL_LIBRARIES})
   26   ELSEIF(${WITH_SSL} STREQUAL "SCHANNEL")
   27     SET(CRYPT_SOURCE ${CC_SOURCE_DIR}/libmariadb/secure/win_crypt.c)
   28     SET(CACHING_SHA2_LIBS crypt32 bcrypt)
   29   ELSEIF(${WITH_SSL} STREQUAL "GNUTLS")
   30     SET(CRYPT_SOURCE ${CC_SOURCE_DIR}/libmariadb/secure/gnutls_crypt.c)
   31     SET(CACHING_SHA2_LIBS ${SSL_LIBRARIES} ${LIBZ})
   32   ENDIF()
   33   REGISTER_PLUGIN(TARGET caching_sha2_password
   34                 TYPE MARIADB_CLIENT_PLUGIN_AUTH
   35                 CONFIGURATIONS DYNAMIC STATIC OFF
   36                 DEFAULT DYNAMIC
   37                 SOURCES ${CC_SOURCE_DIR}/plugins/auth/caching_sha2_pw.c 
   38                         ${CRYPT_SOURCE}
   39                 LIBRARIES ${CACHING_SHA2_LIBS})
   40 ENDIF()
   41 
   42 #GSSAPI client authentication plugin
   43 IF(NOT WIN32)
   44   INCLUDE(${CC_SOURCE_DIR}/cmake/FindGSSAPI.cmake)
   45   IF(GSSAPI_FOUND)
   46     SET(GSSAPI_SOURCES ${AUTH_DIR}/auth_gssapi_client.c ${AUTH_DIR}/gssapi_client.c ${AUTH_DIR}/gssapi_errmsg.c)
   47   ENDIF()
   48 ELSE()
   49   SET(GSSAPI_LIBS secur32)
   50   SET(GSSAPI_SOURCES ${AUTH_DIR}/auth_gssapi_client.c ${AUTH_DIR}/sspi_client.c ${AUTH_DIR}/sspi_errmsg.c)
   51 ENDIF()
   52 IF(GSSAPI_SOURCES)
   53   REGISTER_PLUGIN(TARGET auth_gssapi_client
   54                   TYPE MARIADB_CLIENT_PLUGIN_AUTH
   55                   CONFIGURATIONS DYNAMIC STATIC OFF
   56                   DEFAULT DYNAMIC
   57                   SOURCES ${GSSAPI_SOURCES}
   58                   INCLUDES ${CC_SOURCE_DIR}/plugins/auth ${GSSAPI_INCS}
   59                   LIBRARIES ${GSSAPI_LIBS})
   60 ENDIF()
   61 
   62 IF(${WITH_SSL} STREQUAL "OPENSSL" OR ${WITH_SSL} STREQUAL "SCHANNEL")
   63   IF(WITH_SSL STREQUAL "SCHANNEL")
   64     SET(SHA256_LIBS crypt32)
   65   ELSE()
   66     SET(SHA256_LIBS ${SSL_LIBRARIES})
   67   ENDIF()
   68   REGISTER_PLUGIN(TARGET sha256_password
   69                   TYPE MARIADB_CLIENT_PLUGIN_AUTH
   70                   CONFIGURATIONS DYNAMIC STATIC OFF
   71                   DEFAULT DYNAMIC
   72                   SOURCES ${AUTH_DIR}/sha256_pw.c
   73                   LIBRARIES ${SHA256_LIBS})
   74 ENDIF()
   75 
   76 # old_password plugin
   77 REGISTER_PLUGIN(TARGET mysql_old_password
   78                 TYPE MARIADB_CLIENT_PLUGIN_AUTH
   79                 CONFIGURATIONS STATIC DYNAMIC OFF
   80                 DEFAULT STATIC
   81                 SOURCES ${AUTH_DIR}/old_password.c)
   82 
   83 
   84 # Cleartext
   85 REGISTER_PLUGIN(TARGET mysql_clear_password
   86                 TYPE MARIADB_CLIENT_PLUGIN_AUTH
   87                 CONFIGURATIONS DYNAMIC STATIC OFF
   88                 DEFAULT DYNAMIC
   89                 SOURCES ${AUTH_DIR}/mariadb_cleartext.c)
   90