Hi Georgi,
On 6/20/11 1:07 PM, Georgi Kodinov wrote:
> #At file:///Users/kgeorge/mysql/work/B11753167-trunk/ based on
> revid:dmitry.lenev@stripped
>
> 3224 Georgi Kodinov 2011-06-20
> Bug #11753167: 44559: SSL KEYS WITH PASSPHRASES
>
> Implemented a default password reading callback for yaSSL
> using mysql client's get_tty_password().
> It uses the C preprocessor to re-define my_strdup() and
> to rename get_tty_password() function to a name prefixed
> with yassl and internal to the library.
> Since the password can't be read from a file, only a manual
> test performed and no automatic test case added.
>
> modified:
> extra/yassl/CMakeLists.txt
> extra/yassl/src/yassl_int.cpp
> === modified file 'extra/yassl/CMakeLists.txt'
> --- a/extra/yassl/CMakeLists.txt 2011-04-04 08:47:25 +0000
> +++ b/extra/yassl/CMakeLists.txt 2011-06-20 16:07:28 +0000
> @@ -21,9 +21,15 @@ INCLUDE_DIRECTORIES(
>
> ADD_DEFINITIONS(${SSL_DEFINES})
>
> +# Substitute my_strdup so that we can re-use get_password.c
> +ADD_DEFINITIONS(-Dmy_strdup=yassl_mysql_strdup)
> +# rename get_tty_password to avoid collisions with the main binary
> +ADD_DEFINITIONS(-Dget_tty_password=yassl_mysql_get_tty_password)
> +
Better augment get_tty_password() interface to take a allocation
function. Also, no need to pull in mysql.h, just declare the prototype
in the same source file.
Davi