Author: jdsn
Date: Fri Oct 17 17:19:12 2008
New Revision: 52340
URL: http://svn.opensuse.org/viewcvs/yast?rev=52340&view=rev
Log:
- display correct text during manual interaction (bnc#435869)
- fix repeated initializations of suseRegister
- ask to trust CA certificate of registration server (port from SP2)
- spec file clean up
- 2.17.5
Modified:
trunk/registration/VERSION
trunk/registration/package/yast2-registration.changes
trunk/registration/src/clients/inst_suse_register.ycp
trunk/registration/src/modules/Register.ycp
trunk/registration/src/modules/YSR.pm
trunk/registration/yast2-registration.spec.in
Modified: trunk/registration/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/VERSION?rev=52340&r1=52339&r2=52340&view=diff
==============================================================================
--- trunk/registration/VERSION (original)
+++ trunk/registration/VERSION Fri Oct 17 17:19:12 2008
@@ -1 +1 @@
-2.17.4
+2.17.5
Modified: trunk/registration/package/yast2-registration.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/package/yast2-registration.changes?rev=52340&r1=52339&r2=52340&view=diff
==============================================================================
--- trunk/registration/package/yast2-registration.changes (original)
+++ trunk/registration/package/yast2-registration.changes Fri Oct 17 17:19:12 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Fri Oct 17 17:17:50 CEST 2008 - jdsn@suse.de
+
+- display correct text during manual interaction (bnc#435869)
+- fix repeated initializations of suseRegister
+- ask to trust CA certificate of registration server (port from SP2)
+- spec file clean up
+- 2.17.5
+
+-------------------------------------------------------------------
Thu Oct 16 13:12:43 CEST 2008 - jdsn@suse.de
- call to saveLastZmdConfig added (bnc#435696)
Modified: trunk/registration/src/clients/inst_suse_register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/clients/inst_suse_register.ycp?rev=52340&r1=52339&r2=52340&view=diff
==============================================================================
--- trunk/registration/src/clients/inst_suse_register.ycp (original)
+++ trunk/registration/src/clients/inst_suse_register.ycp Fri Oct 17 17:19:12 2008
@@ -770,7 +770,9 @@
if ( SRstatus == 1 )
{
// get the details overview
- manual_interaction_overview = Register::suseRegisterListParams();
+ manual_interaction_overview = YSR::get_registerReadableText(); // (bnc#435869)
+ if ( manual_interaction_overview == nil ) manual_interaction_overview = "";
+
UI::OpenDialog( manual_interaction );
UI::SetFocus (`id (`start_browser ));
UI::ChangeWidget( `id(`needinfo), `Value, manual_interaction_overview );
Modified: trunk/registration/src/modules/Register.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/registration/src/modules/Register.ycp?rev=52340&r1=52339&r2=52340&view=diff
==============================================================================
--- trunk/registration/src/modules/Register.ycp (original)
+++ trunk/registration/src/modules/Register.ycp Fri Oct 17 17:19:12 2008
@@ -25,6 +25,7 @@
import "ProductFeatures";
import "SourceManager";
import "Installation";
+import "RegisterCert";
// --------------------------------------------------------------
// START: Locally defined data
@@ -313,9 +314,9 @@
string certTmpFile = sformat("%1/__tmpSMTcert.crt", SCR::Read(.target.tmpdir));
// check for existing certificate (bnc#376000)
- integer certExists = nil;
- certExists = (integer) SCR::Execute(.target.bash, sformat("[ -f %1 ]", smtpemFile));
- if (certmode != `url && certExists == 0)
+ boolean certExists = false;
+ certExists = ( (integer) SCR::Execute(.target.bash, sformat("[ -f %1 ]", smtpemFile)) == 0 ) ? true:false;
+ if (certmode != `url && certExists )
{
// do nothing to refetch the certificate if manual interaction is necessary
y2milestone("Existing SMT certificate found and keeping it. To renew the SMT certificate please assign a URL as value to the key 'regcert' in /var/lib/YaST2/install.inf");
@@ -343,7 +344,7 @@
string curlcmd = sformat("curl -f --connect-timeout 60 --max-time 120 '%1' -o %2", smt_server_cert, certTmpFile);
if ( SCR::Execute(.target.bash, curlcmd) != 0)
{
- if (certExists == 0)
+ if ( certExists )
{
// do nothing to refetch the certificate if manual interaction is necessary
y2milestone("Could not download the current SMT certificate but existing certificate found and keeping it. To renew the SMT certificate please make sure it is available on the registration server.");
@@ -525,17 +526,19 @@
}
+ // log certificate details
+ map cP = RegisterCert::parseCertificate(certTmpFile);
+ y2milestone("SMT certificate file information: %1", cP);
+ // now ask user if he trusts the certificate
// in autoYaST mode we automatically trust
if ( !ay ) // (bnc#377929)
{
- // ask user if he trusts the certificate
-
// compare with existing certificate (bnc#376000)
- if (certExists == 0)
+ if ( certExists )
{
- // we can only test if the files match - no parsing possible
- if ( ((integer)SCR::Execute(.target.bash, sformat("diff %1 %2", certTmpFile, smtpemFile)) == 0 ))
+ map orig_cP = RegisterCert::parseCertificate(smtpemFile);
+ if (orig_cP["FINGERPRINT"]:"foo" == cP["FINGERPRINT"]:"bar" )
{
// return `ok if fingerprints match - no need to ask again
y2milestone("Current SMT certificate is up to date and will be kept.");
@@ -547,7 +550,46 @@
string trustMessage = _("This certificate will be used to connect to the SMT server.\nYou have to trust this certificate in order to continue with the Registration.");
string certInfo = "";
- certInfo = (string) SCR::Read(.target.string, certTmpFile );
+
+ list issueList = (list) cP["ISSUER"]:[];
+ //translators: this is certificate context
+ certInfo = certInfo + _("<p><b>Issued For:</b></p>");
+ if (size (issueList) > 0)
+ {
+ certInfo = certInfo + "<pre>";
+ foreach (map