Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f3da18f6
Commit
f3da18f6
authored
Jan 08, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake-time detection for EVP_aes_128_ctr()
because old openssl versions (e.g. on labrador) don't have it
parent
faad7e0c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
cmake/ssl.cmake
cmake/ssl.cmake
+5
-0
config.h.cmake
config.h.cmake
+1
-0
include/my_crypt.h
include/my_crypt.h
+0
-2
mysys_ssl/my_crypt.cc
mysys_ssl/my_crypt.cc
+2
-1
No files found.
cmake/ssl.cmake
View file @
f3da18f6
...
@@ -55,6 +55,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
...
@@ -55,6 +55,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
SET
(
SSL_INCLUDE_DIRS
${
INC_DIRS
}
)
SET
(
SSL_INCLUDE_DIRS
${
INC_DIRS
}
)
SET
(
SSL_INTERNAL_INCLUDE_DIRS
${
CMAKE_SOURCE_DIR
}
/extra/yassl/taocrypt/mySTL
)
SET
(
SSL_INTERNAL_INCLUDE_DIRS
${
CMAKE_SOURCE_DIR
}
/extra/yassl/taocrypt/mySTL
)
SET
(
SSL_DEFINES
"-DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED"
)
SET
(
SSL_DEFINES
"-DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED"
)
SET
(
HAVE_EncryptAes128Ctr OFF CACHE INTERNAL
"yassl doesn't have EncryptAes128Ctr"
)
CHANGE_SSL_SETTINGS
(
"bundled"
)
CHANGE_SSL_SETTINGS
(
"bundled"
)
ADD_SUBDIRECTORY
(
extra/yassl
)
ADD_SUBDIRECTORY
(
extra/yassl
)
ADD_SUBDIRECTORY
(
extra/yassl/taocrypt
)
ADD_SUBDIRECTORY
(
extra/yassl/taocrypt
)
...
@@ -193,6 +194,10 @@ MACRO (MYSQL_CHECK_SSL)
...
@@ -193,6 +194,10 @@ MACRO (MYSQL_CHECK_SSL)
SET
(
SSL_INCLUDE_DIRS
${
OPENSSL_INCLUDE_DIR
}
)
SET
(
SSL_INCLUDE_DIRS
${
OPENSSL_INCLUDE_DIR
}
)
SET
(
SSL_INTERNAL_INCLUDE_DIRS
""
)
SET
(
SSL_INTERNAL_INCLUDE_DIRS
""
)
SET
(
SSL_DEFINES
"-DHAVE_OPENSSL"
)
SET
(
SSL_DEFINES
"-DHAVE_OPENSSL"
)
SET
(
CMAKE_REQUIRED_LIBRARIES
${
SSL_LIBRARIES
}
)
CHECK_SYMBOL_EXISTS
(
EVP_aes_128_ctr
"openssl/evp.h"
HAVE_EncryptAes128Ctr
)
ELSE
()
ELSE
()
IF
(
WITH_SSL STREQUAL
"system"
)
IF
(
WITH_SSL STREQUAL
"system"
)
MESSAGE
(
SEND_ERROR
"Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support"
)
MESSAGE
(
SEND_ERROR
"Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support"
)
...
...
config.h.cmake
View file @
f3da18f6
...
@@ -589,6 +589,7 @@
...
@@ -589,6 +589,7 @@
#cmakedefine HAVE_CHARSET_utf32 1
#cmakedefine HAVE_CHARSET_utf32 1
#cmakedefine HAVE_UCA_COLLATIONS 1
#cmakedefine HAVE_UCA_COLLATIONS 1
#cmakedefine HAVE_COMPRESS 1
#cmakedefine HAVE_COMPRESS 1
#cmakedefine HAVE_EncryptAes128Ctr 1
/*
/*
...
...
include/my_crypt.h
View file @
f3da18f6
...
@@ -7,8 +7,6 @@
...
@@ -7,8 +7,6 @@
#if !defined(HAVE_YASSL) && defined(HAVE_OPENSSL)
#if !defined(HAVE_YASSL) && defined(HAVE_OPENSSL)
#define HAVE_EncryptAes128Ctr
C_MODE_START
C_MODE_START
Crypt_result
my_aes_encrypt_ctr
(
const
uchar
*
source
,
uint32
source_length
,
Crypt_result
my_aes_encrypt_ctr
(
const
uchar
*
source
,
uint32
source_length
,
uchar
*
dest
,
uint32
*
dest_length
,
uchar
*
dest
,
uint32
*
dest_length
,
...
...
mysys_ssl/my_crypt.cc
View file @
f3da18f6
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include "mysql.h"
#include "mysql.h"
#include <openssl/evp.h>
#include <openssl/evp.h>
#include <openssl/aes.h>
#include <openssl/aes.h>
#include <openssl/rand.h>
static
const
int
CRYPT_ENCRYPT
=
1
;
static
const
int
CRYPT_ENCRYPT
=
1
;
static
const
int
CRYPT_DECRYPT
=
0
;
static
const
int
CRYPT_DECRYPT
=
0
;
...
@@ -350,6 +349,8 @@ C_MODE_END
...
@@ -350,6 +349,8 @@ C_MODE_END
#else
/* OpenSSL */
#else
/* OpenSSL */
#include <openssl/rand.h>
C_MODE_START
C_MODE_START
Crypt_result
my_random_bytes
(
uchar
*
buf
,
int
num
)
Crypt_result
my_random_bytes
(
uchar
*
buf
,
int
num
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment