2006-07-15 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mcs / class / corlib / System.Security.Cryptography / DSA.cs
old mode 100755 (executable)
new mode 100644 (file)
index 0f10dc8..b15603f
@@ -28,8 +28,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.Globalization;
+using System.Runtime.InteropServices;
 using System.Text;
 
 using Mono.Xml;
@@ -41,6 +41,9 @@ using Mono.Security;
 
 namespace System.Security.Cryptography {
 
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public abstract class DSA : AsymmetricAlgorithm {
 
 #if NET_2_0
@@ -145,9 +148,13 @@ namespace System.Security.Cryptography {
                                sb.Append (Convert.ToBase64String (dsaParams.Y));
                                sb.Append( "</Y>");
 
-                               sb.Append ("<J>");
-                               sb.Append (Convert.ToBase64String (dsaParams.J));
-                               sb.Append ("</J>");
+                               if (dsaParams.J != null) {
+                                       // if J wasn't imported then it's not exported and neither 
+                                       // is part of the XML output
+                                       sb.Append ("<J>");
+                                       sb.Append (Convert.ToBase64String (dsaParams.J));
+                                       sb.Append ("</J>");
+                               }
 
                                if (dsaParams.Seed != null) {
                                        sb.Append ("<Seed>");