From ab4ea34d468c889053b732fcff0b5d659cff7dfb Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Fri, 2 Aug 2019 16:49:56 -0700 Subject: [PATCH 1/3] Document Pkcs12SafeContents --- .../Pkcs12SafeContents.xml | 236 +++++++++++++----- 1 file changed, 179 insertions(+), 57 deletions(-) diff --git a/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml b/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml index 334d9dec6a9..2276dd23b0b 100644 --- a/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml +++ b/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml @@ -15,7 +15,7 @@ - To be added. + Represents a PKCS#12 SafeContents value. This class cannot be inherited. To be added. @@ -33,7 +33,7 @@ - To be added. + Initializes a new instance of the class. To be added. @@ -57,10 +57,14 @@ - To be added. - To be added. - To be added. + The certificate to add. + Adds a certificate to the SafeContents via a new and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The parameter is in an invalid state. + @@ -83,10 +87,16 @@ - To be added. - To be added. - To be added. + The asymmetric private key to add. + Adds an asymmetric private key to the SafeContents via a new and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The key export failed. + + + @@ -109,10 +119,22 @@ - To be added. - To be added. - To be added. - To be added. + The nested contents to add to the SafeContents. + Adds a nested SafeContents to the SafeContents via a new and returns the newly created bag instance. + The bag instance which was added to the SafeContents. + + + + The parameter is . + The parameter is encrypted. + This instance is read-only. @@ -135,9 +157,18 @@ - To be added. - To be added. - To be added. + The SafeBag value to add. + Adds a SafeBag to the SafeContents. + + + + The parameter is . + This instance is read-only. @@ -163,9 +194,12 @@ To be added. To be added. - To be added. - To be added. + Adds an ASN.1 BER-encoded value with a specified type identifier to the SafeContents via a new and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The parameter does not represent a single ASN.1 BER-encoded value. @@ -189,12 +223,18 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The asymmetric private key to add. + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Adds an encrypted asymmetric private key to the SafeContents via a new from a byte-based password in an array and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The key export failed. + + + @@ -218,12 +258,18 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The asymmetric private key to add. + The bytes to use as a password when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Adds an encrypted asymmetric private key to the SafeContents via a new from a byte-based password in a span and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The key export failed. + + + @@ -247,12 +293,18 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The asymmetric private key to add. + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Adds an encrypted asymmetric private key to the SafeContents via a new from a char-based password in a span and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The key export failed. + + + @@ -276,12 +328,18 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The asymmetric private key to add. + The password to use when encrypting the key material. + The password-based encryption (PBE) parameters to use when encrypting the key material. + Adds an encrypted asymmetric private key to the SafeContents via a new from a char-based password in a string and returns the newly created bag instance. + The bag instance which was added to the SafeContents. To be added. + The parameter is . + This instance is read-only. + The key export failed. + + + @@ -301,8 +359,8 @@ System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode - To be added. - To be added. + Gets a value that indicates the type of encryption applied to the contents. + One of the enumeration values that indicates the type of encryption applied to the contents. The default value is . To be added. @@ -326,9 +384,23 @@ - To be added. - To be added. - To be added. + The bytes to use as a password for decrypting the encrypted contents. + Decrypts the contents of this SafeContents value using a byte-based password from an array. + + + + The property is not . + The password is incorrect. + +-or- + +The contents were not successfully decrypted. @@ -351,9 +423,23 @@ - To be added. - To be added. - To be added. + The bytes to use as a password for decrypting the encrypted contents. + Decrypts the contents of this SafeContents value using a byte-based password from a span. + + + + The property is not . + The password is incorrect. + +-or- + +The contents were not successfully decrypted. @@ -376,9 +462,22 @@ - To be added. - To be added. - To be added. + The password to use for decrypting the encrypted contents. + Decrypts the contents of this SafeContents value using a char-based password from a span. + + + + The property is not . + The password is incorrect. + +-or- + +The contents were not successfully decrypted. @@ -401,9 +500,22 @@ - To be added. - To be added. - To be added. + The password to use for decrypting the encrypted contents. + Decrypts the contents of this SafeContents value using a char-based password from a string. + + + + The property is not . + The password is incorrect. + +-or- + +The contents were not successfully decrypted. @@ -424,9 +536,11 @@ - To be added. - To be added. + Gets an enumerable representation of the SafeBag values contained within the SafeContents. + An enumerable representation of the SafeBag values contained within the SafeContents. To be added. + The contents are encrypted. + @@ -446,10 +560,18 @@ System.Boolean - To be added. - To be added. - To be added. + Gets a value that indicates whether this instance in a read-only state. + if this value is in a read-only state; otherwise, . The default value is . + + is read-only when the value is created to represent previously encoded values, such as from or the encoding operation internal to . + + ]]> + - \ No newline at end of file + From db4ff18ef99b0ccc68709c9f717d4c7492b41848 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Fri, 2 Aug 2019 17:54:22 -0700 Subject: [PATCH 2/3] Fix bad namespace references --- .../Pkcs12SafeContents.xml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml b/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml index 2276dd23b0b..81c44652c11 100644 --- a/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml +++ b/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml @@ -33,7 +33,7 @@ - Initializes a new instance of the class. + Initializes a new instance of the class. To be added. @@ -64,7 +64,7 @@ The parameter is . This instance is read-only. The parameter is in an invalid state. - + @@ -94,8 +94,8 @@ The parameter is . This instance is read-only. The key export failed. - - + + @@ -232,8 +232,8 @@ The parameter is . This instance is read-only. The key export failed. - - + + @@ -267,8 +267,8 @@ The parameter is . This instance is read-only. The key export failed. - - + + @@ -302,8 +302,8 @@ The parameter is . This instance is read-only. The key export failed. - - + + @@ -337,8 +337,8 @@ The parameter is . This instance is read-only. The key export failed. - - + + From 5c13f9d6bcfe729245356cd0d3aca721ae72e6c9 Mon Sep 17 00:00:00 2001 From: Jeremy Barton Date: Mon, 5 Aug 2019 08:53:56 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-Authored-By: Ron Petrusha --- .../Pkcs12SafeContents.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml b/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml index 81c44652c11..e3f5e7eb7cb 100644 --- a/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml +++ b/xml/System.Security.Cryptography.Pkcs/Pkcs12SafeContents.xml @@ -192,8 +192,8 @@ - To be added. - To be added. + The Object Identifier (OID) which identifies the data type of the secret value. + The BER-encoded value representing the secret to add. Adds an ASN.1 BER-encoded value with a specified type identifier to the SafeContents via a new and returns the newly created bag instance. The bag instance which was added to the SafeContents. To be added. @@ -296,7 +296,7 @@ The asymmetric private key to add. The password to use when encrypting the key material. The password-based encryption (PBE) parameters to use when encrypting the key material. - Adds an encrypted asymmetric private key to the SafeContents via a new from a char-based password in a span and returns the newly created bag instance. + Adds an encrypted asymmetric private key to the SafeContents via a new from a character-based password in a span and returns the newly created bag instance. The bag instance which was added to the SafeContents. To be added. The parameter is . @@ -331,7 +331,7 @@ The asymmetric private key to add. The password to use when encrypting the key material. The password-based encryption (PBE) parameters to use when encrypting the key material. - Adds an encrypted asymmetric private key to the SafeContents via a new from a char-based password in a string and returns the newly created bag instance. + Adds an encrypted asymmetric private key to the SafeContents via a new from a character-based password in a string and returns the newly created bag instance. The bag instance which was added to the SafeContents. To be added. The parameter is . @@ -463,7 +463,7 @@ The contents were not successfully decrypted. The password to use for decrypting the encrypted contents. - Decrypts the contents of this SafeContents value using a char-based password from a span. + Decrypts the contents of this SafeContents value using a character-based password from a span. The password to use for decrypting the encrypted contents. - Decrypts the contents of this SafeContents value using a char-based password from a string. + Decrypts the contents of this SafeContents value using a character-based password from a string. Gets an enumerable representation of the SafeBag values contained within the SafeContents. An enumerable representation of the SafeBag values contained within the SafeContents. To be added. - The contents are encrypted. + The contents are encrypted.