diff options
author | unknown <tonu@volk.internalnet> | 2001-09-30 10:46:20 +0800 |
---|---|---|
committer | unknown <tonu@volk.internalnet> | 2001-09-30 10:46:20 +0800 |
commit | d13f2dfdeb2b23c6abfb608885e8717878122a7b (patch) | |
tree | c8e33b443fde74ad722536829cd56fa9403617cd /include | |
parent | 5e0851e1b37debb59dbe184fcc3485470872ac64 (diff) | |
download | mariadb-git-d13f2dfdeb2b23c6abfb608885e8717878122a7b.tar.gz |
SSL compiles and works as far as can see. Continue testing..
Docs/manual.ja.texi:
e-mail address fixed
include/mysqld_error.h:
Added 3 new errormessages related to SSL
mysql-test/install_test_db.sh:
SSL fix
scripts/mysql_install_db.sh:
mysql.user table changes to conform SSL ACL
sql/lex.h:
Fixed GRANT+SSL clause
sql/share/czech/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/danish/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/dutch/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/english/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/estonian/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/french/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/german/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/greek/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/hungarian/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/italian/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/japanese/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/korean/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/norwegian-ny/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/norwegian/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/polish/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/portuguese/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/romanian/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/russian/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/slovak/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/spanish/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/swedish/errmsg.txt:
Added 3 new errormessages related to SSL
sql/share/ukrainian/errmsg.txt:
Added 3 new errormessages related to SSL
Docs/manual.texi:
SSL fixes
BUILD/compile-pentium-max:
SSL was missing here
acinclude.m4:
typo fix
alignment fix
client/mysql.cc:
SSL fixes
client/mysqladmin.c:
SSL fixes
client/mysqlcheck.c:
SSL fixes
client/mysqldump.c:
SSL fixes
client/mysqlimport.c:
SSL fixes
client/mysqlshow.c:
SSL fixes
include/mysql.h:
SSL fixes
include/sslopt-case.h:
SSL fixes
include/sslopt-longopts.h:
SSL fixes
include/sslopt-usage.h:
SSL fixes
include/sslopt-vars.h:
SSL fixes
include/violite.h:
SSL fixes
cleanups
libmysql/libmysql.c:
SSL fixes
libmysqld/lib_sql.cc:
SSL fixes
sql/mini_client.cc:
SSL fixes
sql/mysqld.cc:
SSL fixes
cleanup
new variables to SHOW STATUS
sql/sql_acl.cc:
SSL fixes
sql/sql_acl.h:
SSL fixes
sql/sql_lex.h:
SSL fixes
sql/sql_parse.cc:
SSL fixes
sql/sql_show.cc:
New functions added
sql/structs.h:
New functions added
vio/test-ssl.c:
SSL fixes
vio/test-sslclient.c:
SSL fixes
vio/test-sslserver.c:
SSL fixes
vio/viosocket.c:
SSL fixes
vio/viossl.c:
SSL fixes
cleanup
vio/viosslfactories.c:
SSL fixes
sql/sql_yacc.yy:
SSL fixes
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql.h | 3 | ||||
-rw-r--r-- | include/mysqld_error.h | 5 | ||||
-rw-r--r-- | include/sslopt-case.h | 6 | ||||
-rw-r--r-- | include/sslopt-longopts.h | 2 | ||||
-rw-r--r-- | include/sslopt-usage.h | 3 | ||||
-rw-r--r-- | include/sslopt-vars.h | 1 | ||||
-rw-r--r-- | include/violite.h | 18 |
7 files changed, 26 insertions, 12 deletions
diff --git a/include/mysql.h b/include/mysql.h index a1bd96540e8..7867dea2c31 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -135,6 +135,7 @@ struct st_mysql_options { char *ssl_cert; /* PEM cert file */ char *ssl_ca; /* PEM CA file */ char *ssl_capath; /* PEM directory of CA-s? */ + char *ssl_cipher; /* cipher to use */ my_bool use_ssl; /* if to use SSL or not */ my_bool compress,named_pipe; /* @@ -262,7 +263,7 @@ const char * STDCALL mysql_character_set_name(MYSQL *mysql); MYSQL * STDCALL mysql_init(MYSQL *mysql); int STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca, - const char *capath); + const char *capath, const char *cipher); int STDCALL mysql_ssl_clear(MYSQL *mysql); my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db); diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 8f78d6190b1..cb555eb8066 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -221,4 +221,7 @@ #define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1218 #define ER_CANT_UPDATE_WITH_READLOCK 1219 #define ER_MIXING_NOT_ALLOWED 1220 -#define ER_ERROR_MESSAGES 221 +#define ER_GRANT_DUPL_SUBJECT 1221 +#define ER_GRANT_DUPL_ISSUER 1222 +#define ER_GRANT_DUPL_CIPHER 1223 +#define ER_ERROR_MESSAGES 224 diff --git a/include/sslopt-case.h b/include/sslopt-case.h index d995e31044e..b5720286778 100644 --- a/include/sslopt-case.h +++ b/include/sslopt-case.h @@ -39,4 +39,10 @@ my_free(opt_ssl_ca, MYF(MY_ALLOW_ZERO_PTR)); opt_ssl_ca = my_strdup(optarg, MYF(0)); break; + case OPT_SSL_CIPHER: + opt_use_ssl = 1; /* true */ + my_free(opt_ssl_cipher, MYF(MY_ALLOW_ZERO_PTR)); + opt_ssl_cipher = my_strdup(optarg, MYF(0)); + break; + #endif diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h index 2f58f0e9265..697c2f647bf 100644 --- a/include/sslopt-longopts.h +++ b/include/sslopt-longopts.h @@ -22,10 +22,12 @@ #define OPT_SSL_CERT 202 #define OPT_SSL_CA 203 #define OPT_SSL_CAPATH 204 +#define OPT_SSL_CIPHER 205 {"ssl", no_argument, 0, OPT_SSL_SSL}, {"ssl-key", required_argument, 0, OPT_SSL_KEY}, {"ssl-cert", required_argument, 0, OPT_SSL_CERT}, {"ssl-ca", required_argument, 0, OPT_SSL_CA}, {"ssl-capath", required_argument, 0, OPT_SSL_CAPATH}, + {"ssl-cipher", required_argument, 0, OPT_SSL_CIPHER}, #endif /* HAVE_OPENSSL */ diff --git a/include/sslopt-usage.h b/include/sslopt-usage.h index 5b2b4a88709..cd6a06fb459 100644 --- a/include/sslopt-usage.h +++ b/include/sslopt-usage.h @@ -21,5 +21,6 @@ --ssl-key X509 key in PEM format (implies --ssl)\n\ --ssl-cert X509 cert in PEM format (implies --ssl)\n\ --ssl-ca CA file in PEM format (check OpenSSL docs, implies --ssl)\n\ - --ssl-capath CA directory (check OpenSSL docs, implies --ssl)"); + --ssl-capath CA directory (check OpenSSL docs, implies --ssl)\n\ + --ssl-cipher SSL cipher to use (implies --ssl)"); #endif diff --git a/include/sslopt-vars.h b/include/sslopt-vars.h index 597ab4d9fa6..756a35589aa 100644 --- a/include/sslopt-vars.h +++ b/include/sslopt-vars.h @@ -21,4 +21,5 @@ static char *opt_ssl_key = 0; static char *opt_ssl_cert = 0; static char *opt_ssl_ca = 0; static char *opt_ssl_capath = 0; +static char *opt_ssl_cipher = 0; #endif diff --git a/include/violite.h b/include/violite.h index 947b874c46a..c59f6124838 100644 --- a/include/violite.h +++ b/include/violite.h @@ -169,9 +169,6 @@ struct st_VioSSLAcceptorFd state_connect = 1, state_accept = 2 }; -// BIO* bio_; -// char desc_[100]; -// Vio* sd_; /* function pointers which are only once for SSL server Vio*(*sslaccept)(struct st_VioSSLAcceptorFd*,Vio*); */ @@ -184,15 +181,17 @@ struct st_VioSSLConnectorFd SSL_METHOD* ssl_method_; /* function pointers which are only once for SSL client */ }; -void sslaccept(struct st_VioSSLAcceptorFd*, Vio*); -void sslconnect(struct st_VioSSLConnectorFd*, Vio*); +void sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout); +void sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout); struct st_VioSSLConnectorFd *new_VioSSLConnectorFd(const char* key_file, const char* cert_file, - const char* ca_file, const char* ca_path); + const char* ca_file, const char* ca_path, + const char* cipher); struct st_VioSSLAcceptorFd *new_VioSSLAcceptorFd(const char* key_file, const char* cert_file, - const char* ca_file,const char* ca_path); + const char* ca_file,const char* ca_path, + const char* cipher); Vio* new_VioSSL(struct st_VioSSLAcceptorFd* fd, Vio* sd,int state); #ifdef __cplusplus @@ -200,6 +199,9 @@ Vio* new_VioSSL(struct st_VioSSLAcceptorFd* fd, Vio* sd,int state); #endif #endif /* HAVE_OPENSSL */ +/* This enumerator is used in parser - should be always visible */ +enum SSL_type {SSL_TYPE_NONE, SSL_TYPE_ANY, SSL_TYPE_X509, SSL_TYPE_SPECIFIED}; + #ifndef EMBEDDED_LIBRARY /* This structure is for every connection on both sides */ struct st_vio @@ -229,10 +231,8 @@ struct st_vio my_bool (*poll_read)(Vio*,uint); #ifdef HAVE_OPENSSL - BIO* bio_; SSL* ssl_; my_bool open_; - char *ssl_cip_; #endif /* HAVE_OPENSSL */ #endif /* HAVE_VIO */ }; |