Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49587 - /trunk/ldap-server/src/tree_structure.ycp
  • From: rhafer@xxxxxxxxxxxxxxxx
  • Date: Fri, 01 Aug 2008 14:29:17 -0000
  • Message-id: <20080801142917.9C48C27336@xxxxxxxxxxxxxxxx>
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<string, any> 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<string,string> importPaths = LdapServer::ReadImportCertificates();
-// boolean use_common_ca =
LdapServer::ReadConfigureCommonServerCertificate();
-// map<string,string> tlsSettings =
(map<string,string>)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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages