[Mono-bugs] [Bug 79616][Wis] New - X509Certificate.Import requires write access

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Oct 7 12:03:58 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ck at carlo-kok.com.


--- shadow/79616	2006-10-07 12:03:58.000000000 -0400
+++ shadow/79616.tmp.9482	2006-10-07 12:03:58.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 79616
+Product: Mono: Class Libraries
+Version: 1.0
+OS: Debian Woody
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: ck at carlo-kok.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: X509Certificate.Import requires write access
+Description of Problem:
+x509certificate.import requires write access to the file while it shouldn't.
+Steps to reproduce the problem:
+1. Create a new PFX cert, make sure it's owned by someone else though still
+2. X509Certificate r = new X509Certificate('filename', '');
+Actual Results:
+Unhandled Exception: System.UnauthorizedAccessException: Access to the path
+"/home/library/knowitall.pfx" is denied.
+  at System.IO.FileStream..ctor (System.String name, FileMode mode,
+FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous,
+FileOptions options) [0x00000]
+  at System.IO.FileStream..ctor (System.String name, FileMode mode) [0x00000]
+  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor
+  at System.Security.Cryptography.X509Certificates.X509Certificate.Load
+(System.String fileName) [0x00000]
+  at System.Security.Cryptography.X509Certificates.X509Certificate.Import
+(System.String fileName, System.String password, X509KeyStorageFlags
+keyStorageFlags) [0x00000]
+  at System.Security.Cryptography.X509Certificates.X509Certificate..ctor
+(System.String fileName, System.String password) [0x00000]
+Expected Results:

More information about the mono-bugs mailing list