From 6167c930632f3e61f0ac70bbe59fc84011d140e0 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Tue, 22 Nov 2005 19:05:17 +0000 Subject: [PATCH] 2005-11-22 Sebastien Pouliot * DSAManaged.cs: Don't output J in the XML if it's not exported (i.e. if it wasn't imported too but instead calculated from the other parameters ;-). svn path=/trunk/mcs/; revision=53356 --- .../corlib/System.Security.Cryptography/ChangeLog | 6 ++++++ mcs/class/corlib/System.Security.Cryptography/DSA.cs | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mcs/class/corlib/System.Security.Cryptography/ChangeLog b/mcs/class/corlib/System.Security.Cryptography/ChangeLog index 9cae7027651..2f321636c60 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ChangeLog +++ b/mcs/class/corlib/System.Security.Cryptography/ChangeLog @@ -1,3 +1,9 @@ +2005-11-22 Sebastien Pouliot + + * DSAManaged.cs: Don't output J in the XML if it's not exported (i.e. + if it wasn't imported too but instead calculated from the other + parameters ;-). + 2005-11-09 Sebastien Pouliot * KeyNumber.cs: Added missing [Serializable] present in 2.0. diff --git a/mcs/class/corlib/System.Security.Cryptography/DSA.cs b/mcs/class/corlib/System.Security.Cryptography/DSA.cs index 37f24f93160..b15603f278b 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DSA.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DSA.cs @@ -148,9 +148,13 @@ namespace System.Security.Cryptography { sb.Append (Convert.ToBase64String (dsaParams.Y)); sb.Append( ""); - sb.Append (""); - sb.Append (Convert.ToBase64String (dsaParams.J)); - sb.Append (""); + if (dsaParams.J != null) { + // if J wasn't imported then it's not exported and neither + // is part of the XML output + sb.Append (""); + sb.Append (Convert.ToBase64String (dsaParams.J)); + sb.Append (""); + } if (dsaParams.Seed != null) { sb.Append (""); -- 2.25.1