Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Hwang committed Aug 12, 2021
1 parent a919367 commit 6300e70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,11 @@ internal static ICertificatePal FromDerBlob(

if (contentType == X509ContentType.Pkcs12)
{
// TODO:
// We ignore keyStorageFlags which is tracked in https://github.com/dotnet/runtime/issues/52434.
// The keys are always imported as ephemeral and never persisted. Exportability is ignored for
// the moment and it needs to be investigated how to map it to iOS keychain primitives.
if ((keyStorageFlags & X509KeyStorageFlags.Exportable) == X509KeyStorageFlags.Exportable)
{
throw new PlatformNotSupportedException(SR.Cryptography_X509_PKCS12_ExportableNotSupported);
}

if ((keyStorageFlags & X509KeyStorageFlags.PersistKeySet) == X509KeyStorageFlags.PersistKeySet)
{
throw new PlatformNotSupportedException(SR.Cryptography_X509_PKCS12_PersistKeySetNotSupported);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@
<value>PKCS#7 certificate format is not supported on this platform.</value>
</data>
<data name="Cryptography_X509_PKCS12_PersistKeySetNotSupported" xml:space="preserve">
<value>PKCS#12 persist key set flag is not supported on this platform.</value>
<value>The PKCS#12 PersistKeySet flag is not supported on this platform.</value>
</data>
<data name="Cryptography_X509_PKCS12_ExportableNotSupported" xml:space="preserve">
<value>PKCS#12 exportable flag is not supported on this platform.</value>
<value>The PKCS#12 Exportable flag is not supported on this platform.</value>
</data>
<data name="Cryptography_X509_StoreAddFailure" xml:space="preserve">
<value>The X509 certificate could not be added to the store.</value>
Expand Down

0 comments on commit 6300e70

Please sign in to comment.