2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 7 Sep 2004 11:43:47 +0000 (11:43 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 7 Sep 2004 11:43:47 +0000 (11:43 -0000)
* X509Chain.cs: Fixed a bug when constructing a certificate chain from
a collection (endless loop). Fixed bug when Reset-ing an empty chain.

svn path=/trunk/mcs/; revision=33493

mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs

index 2fcbbaee8344114bf662ced5850840b1dbb3d6ea..efbd6db684b51cc4e5177390870fcce40fc7dbf8 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-07  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * X509Chain.cs: Fixed a bug when constructing a certificate chain from
+       a collection (endless loop). Fixed bug when Reset-ing an empty chain.
+
 2004-08-10  Sebastien Pouliot  <sebastien@ximian.com>
 
        * X509Store.cs: Now returns empty collection/list for certificates/
index 254ff1b70fa55dce2e6b05be75440ad994988535..f8035e6c661f23cf97c32ff1da0dd960658d43a5 100755 (executable)
@@ -9,9 +9,7 @@
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -134,7 +132,7 @@ namespace Mono.Security.X509 {
                                        tmp = FindCertificateParent (x);
                                        if (x != null) {
                                                _chain.Add (x);
-                                               tmp = x;        // last valid
+                                               x = tmp;        // last valid
                                        }
                                }
                                // find a trusted root
@@ -191,7 +189,8 @@ namespace Mono.Security.X509 {
                        _status = X509ChainStatusFlags.NoError;
                        roots = null; // this force a reload
                        certs.Clear ();
-                       _chain.Clear ();
+                       if (_chain != null)
+                               _chain.Clear ();
                }
 
                // private stuff