|
@@ -76,6 +76,8 @@
|
|
|
* options (andrei)
|
|
* options (andrei)
|
|
|
* 2006-10-13 added STUN_ALLOW_STUN, STUN_ALLOW_FP, STUN_REFRESH_INTERVAL
|
|
* 2006-10-13 added STUN_ALLOW_STUN, STUN_ALLOW_FP, STUN_REFRESH_INTERVAL
|
|
|
* (vlada)
|
|
* (vlada)
|
|
|
|
|
+ * 2007-02-09 separated command needed for tls-in-core and for tls in general
|
|
|
|
|
+ * (andrei)
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
%{
|
|
%{
|
|
@@ -104,7 +106,7 @@
|
|
|
#include "flags.h"
|
|
#include "flags.h"
|
|
|
|
|
|
|
|
#include "config.h"
|
|
#include "config.h"
|
|
|
-#ifdef USE_TLS
|
|
|
|
|
|
|
+#ifdef CORE_TLS
|
|
|
#include "tls/tls_config.h"
|
|
#include "tls/tls_config.h"
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
@@ -305,6 +307,7 @@ static struct socket_id* mk_listen_id(char*, int, int);
|
|
|
%token TCP_POLL_METHOD
|
|
%token TCP_POLL_METHOD
|
|
|
%token TCP_MAX_CONNECTIONS
|
|
%token TCP_MAX_CONNECTIONS
|
|
|
%token DISABLE_TLS
|
|
%token DISABLE_TLS
|
|
|
|
|
+%token ENABLE_TLS
|
|
|
%token TLSLOG
|
|
%token TLSLOG
|
|
|
%token TLS_PORT_NO
|
|
%token TLS_PORT_NO
|
|
|
%token TLS_METHOD
|
|
%token TLS_METHOD
|
|
@@ -713,13 +716,21 @@ assign_stm:
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| DISABLE_TLS EQUAL error { yyerror("boolean value expected"); }
|
|
| DISABLE_TLS EQUAL error { yyerror("boolean value expected"); }
|
|
|
- | TLSLOG EQUAL NUMBER {
|
|
|
|
|
|
|
+ | ENABLE_TLS EQUAL NUMBER {
|
|
|
#ifdef USE_TLS
|
|
#ifdef USE_TLS
|
|
|
- tls_log=$3;
|
|
|
|
|
|
|
+ tls_disable=!($3);
|
|
|
#else
|
|
#else
|
|
|
warn("tls support not compiled in");
|
|
warn("tls support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
+ | ENABLE_TLS EQUAL error { yyerror("boolean value expected"); }
|
|
|
|
|
+ | TLSLOG EQUAL NUMBER {
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
|
|
+ tls_log=$3;
|
|
|
|
|
+ #else
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
|
|
+ #endif
|
|
|
|
|
+ }
|
|
|
| TLSLOG EQUAL error { yyerror("int value expected"); }
|
|
| TLSLOG EQUAL error { yyerror("int value expected"); }
|
|
|
| TLS_PORT_NO EQUAL NUMBER {
|
|
| TLS_PORT_NO EQUAL NUMBER {
|
|
|
#ifdef USE_TLS
|
|
#ifdef USE_TLS
|
|
@@ -730,93 +741,93 @@ assign_stm:
|
|
|
}
|
|
}
|
|
|
| TLS_PORT_NO EQUAL error { yyerror("number expected"); }
|
|
| TLS_PORT_NO EQUAL error { yyerror("number expected"); }
|
|
|
| TLS_METHOD EQUAL SSLv23 {
|
|
| TLS_METHOD EQUAL SSLv23 {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_method=TLS_USE_SSLv23;
|
|
tls_method=TLS_USE_SSLv23;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_METHOD EQUAL SSLv2 {
|
|
| TLS_METHOD EQUAL SSLv2 {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_method=TLS_USE_SSLv2;
|
|
tls_method=TLS_USE_SSLv2;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_METHOD EQUAL SSLv3 {
|
|
| TLS_METHOD EQUAL SSLv3 {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_method=TLS_USE_SSLv3;
|
|
tls_method=TLS_USE_SSLv3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_METHOD EQUAL TLSv1 {
|
|
| TLS_METHOD EQUAL TLSv1 {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_method=TLS_USE_TLSv1;
|
|
tls_method=TLS_USE_TLSv1;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_METHOD EQUAL error {
|
|
| TLS_METHOD EQUAL error {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
yyerror("SSLv23, SSLv2, SSLv3 or TLSv1 expected");
|
|
yyerror("SSLv23, SSLv2, SSLv3 or TLSv1 expected");
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_VERIFY EQUAL NUMBER {
|
|
| TLS_VERIFY EQUAL NUMBER {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_verify_cert=$3;
|
|
tls_verify_cert=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_VERIFY EQUAL error { yyerror("boolean value expected"); }
|
|
| TLS_VERIFY EQUAL error { yyerror("boolean value expected"); }
|
|
|
| TLS_REQUIRE_CERTIFICATE EQUAL NUMBER {
|
|
| TLS_REQUIRE_CERTIFICATE EQUAL NUMBER {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_require_cert=$3;
|
|
tls_require_cert=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn( "tls support not compiled in");
|
|
|
|
|
|
|
+ warn( "tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_REQUIRE_CERTIFICATE EQUAL error { yyerror("boolean value expected"); }
|
|
| TLS_REQUIRE_CERTIFICATE EQUAL error { yyerror("boolean value expected"); }
|
|
|
| TLS_CERTIFICATE EQUAL STRING {
|
|
| TLS_CERTIFICATE EQUAL STRING {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_cert_file=$3;
|
|
tls_cert_file=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_CERTIFICATE EQUAL error { yyerror("string value expected"); }
|
|
| TLS_CERTIFICATE EQUAL error { yyerror("string value expected"); }
|
|
|
| TLS_PRIVATE_KEY EQUAL STRING {
|
|
| TLS_PRIVATE_KEY EQUAL STRING {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_pkey_file=$3;
|
|
tls_pkey_file=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_PRIVATE_KEY EQUAL error { yyerror("string value expected"); }
|
|
| TLS_PRIVATE_KEY EQUAL error { yyerror("string value expected"); }
|
|
|
| TLS_CA_LIST EQUAL STRING {
|
|
| TLS_CA_LIST EQUAL STRING {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_ca_file=$3;
|
|
tls_ca_file=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_CA_LIST EQUAL error { yyerror("string value expected"); }
|
|
| TLS_CA_LIST EQUAL error { yyerror("string value expected"); }
|
|
|
| TLS_HANDSHAKE_TIMEOUT EQUAL NUMBER {
|
|
| TLS_HANDSHAKE_TIMEOUT EQUAL NUMBER {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_handshake_timeout=$3;
|
|
tls_handshake_timeout=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_HANDSHAKE_TIMEOUT EQUAL error { yyerror("number expected"); }
|
|
| TLS_HANDSHAKE_TIMEOUT EQUAL error { yyerror("number expected"); }
|
|
|
| TLS_SEND_TIMEOUT EQUAL NUMBER {
|
|
| TLS_SEND_TIMEOUT EQUAL NUMBER {
|
|
|
- #ifdef USE_TLS
|
|
|
|
|
|
|
+ #ifdef CORE_TLS
|
|
|
tls_send_timeout=$3;
|
|
tls_send_timeout=$3;
|
|
|
#else
|
|
#else
|
|
|
- warn("tls support not compiled in");
|
|
|
|
|
|
|
+ warn("tls-in-core support not compiled in");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
| TLS_SEND_TIMEOUT EQUAL error { yyerror("number expected"); }
|
|
| TLS_SEND_TIMEOUT EQUAL error { yyerror("number expected"); }
|