Author: rhafer
Date: Fri Aug 1 16:29:17 2008
New Revision: 49587
URL: http://svn.opensuse.org/viewcvs/yast?rev=49587&view=rev
Log:
- removed unneeded function
- check TLS settings when enabling ldaps
Modified:
trunk/ldap-server/src/tree_structure.ycp
Modified: trunk/ldap-server/src/tree_structure.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/tree_structure.ycp?rev=49587&r1=49586&r2=49587&view=diff
==============================================================================
--- trunk/ldap-server/src/tree_structure.ycp (original)
+++ trunk/ldap-server/src/tree_structure.ycp Fri Aug 1 16:29:17 2008
@@ -157,32 +157,34 @@
LdapServer::SetServiceEnabled( false );
}
- if ( (boolean) UI::QueryWidget( `id( `cb_interface_ldap ), `Value ) )
- {
- LdapServer::SetProtocolListenerEnabled( "ldap", true );
- }
- else
- {
- LdapServer::SetProtocolListenerEnabled( "ldap", false );
- }
-
+ LdapServer::SetProtocolListenerEnabled( "ldap", (boolean) UI::QueryWidget( `id( `cb_interface_ldap ), `Value ) );
+ LdapServer::SetProtocolListenerEnabled( "ldapi", (boolean) UI::QueryWidget( `id( `cb_interface_ldapi ), `Value ) );
if ( (boolean) UI::QueryWidget( `id( `cb_interface_ldaps ), `Value ) )
{
- LdapServer::SetProtocolListenerEnabled( "ldaps", true );
+ map tls = LdapServer::GetTlsConfig();
+ if ( (string)tls["caCertFile"]:"" != "" &&
+ (string)tls["certFile"]:"" != "" &&
+ (string)tls["certKeyFile"]:"" != "" )
+ {
+ LdapServer::SetProtocolListenerEnabled( "ldaps", true );
+ }
+ else
+ {
+ if ( Popup::YesNoHeadline( _("Your TLS/SSL Configuration seems to be incomplete."),
+ _("Do you really want to enable the \"ldaps\" protocol listener?") ) )
+ {
+ LdapServer::SetProtocolListenerEnabled( "ldaps", true );
+ }
+ else
+ {
+ LdapServer::SetProtocolListenerEnabled( "ldaps", false );
+ }
+ }
}
else
{
LdapServer::SetProtocolListenerEnabled( "ldaps", false );
}
-
- if ( (boolean) UI::QueryWidget( `id( `cb_interface_ldapi ), `Value ) )
- {
- LdapServer::SetProtocolListenerEnabled( "ldapi", true );
- }
- else
- {
- LdapServer::SetProtocolListenerEnabled( "ldapi", false );
- }
return true;
}
@@ -311,28 +313,6 @@
** tls handlers
*****************************/
-define boolean cb_check_tls()
-``{
- y2milestone( "calling tls check handler" );
-
-// map importPaths = LdapServer::ReadImportCertificates();
-// boolean use_common_ca = LdapServer::ReadConfigureCommonServerCertificate();
-// map tlsSettings = (map)LdapServer::ReadTlsSettings();
-//
-// if( (boolean)UI::QueryWidget( `rb_yes, `Value ) && !(
-// haskey( importPaths, "ServerCertificateFile" ) ||
-// use_common_ca ||
-// ( tlsSettings["TLSCertificateFile"]:nil != nil && tlsSettings["TLSCertificateKeyFile"]:nil != nil ) )
-// )
-// {
-// /*error popup*/
-// callback_error = _("Choose a certificate if you want to activate TLS.");
-// return false;
-// }
-
- return true;
-}
-
define boolean cb_read_tls()
``{
y2milestone( "calling tls read handler" );
@@ -1021,7 +1001,6 @@
/* Tree item */
"name" : _("TLS Settings"),
"widget" : tlsWidget,
- "cb_check" : ``( cb_check_tls() ),
"cb_read" : ``( cb_read_tls() ),
"cb_write" : ``( cb_write_tls() ),
"cb_input" : ``( cb_input_tls() )
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org