bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

P12Store Load .p12 file Error : attempt to add existing attribute with different value

Open John0King opened this issue 5 years ago • 5 comments
trafficstars

code :

var certificateStore = new Pkcs12Store(certificateStream, password.ToCharArray());
  名称 类型
$exception {"attempt to add existing attribute with different value"} System.IO.IOException

the .p12 file , I can successful read this file when I use System.Security.Cryptography.X509Certificates.X509Certificate2,

could anyone helpe me ?

John0King avatar Jul 21 '20 07:07 John0King

You'd see this if there were multiple attributes associate with an entity in the store that had the different values. It's not really clear how you'd process this though, would need to see an example.

dghgit avatar May 24 '21 04:05 dghgit

@dghgit it's the apple's signing certification

John0King avatar Jul 13 '21 01:07 John0King

I got the same exception trying open my p12 certificate file, my pk12 file is good and was used by OpenSsl and other libraries without problem.

kaitbellahs avatar Jul 24 '21 21:07 kaitbellahs

Are you able to provide a file that shows the problem?

dghgit avatar Jul 25 '21 03:07 dghgit

Sample file from https://github.com/dotnet/runtime/issues/26750

exported-in-linux.pfx.zip

dghgit avatar Aug 30 '21 05:08 dghgit