[Mono-dev] PKCS12: adding multiple keys of the same size

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Nov 2 17:33:55 EST 2005


Hello Jim,

On Wed, 2005-11-02 at 14:22 -0800, Jay Miller wrote:
> Hello.  I'm not very well versed in PKCS12, so this is probably just a
> misunderstanding on my part, but I'm trying to add multiple (RSA) keys
> to a PKCS12 object via AddPkcs8ShroudedKeyBag.  As it turns out, I
> cannot add two different keys of the same size and algorithm.
> 
> It appears that this behavior is purposeful, as the function used to
> tell whether a candidate key is already found in _safeBags - called
> CompareAsymmetricAlgorithm - only seems to test the similarity of the
> keys' sizes and algorithms.
> 
> Can anyone comment on this?

AFAIK there is no restriction to add keys into a PKCS12 structure (but
it's uncommon ;-). Anyway this seems to be an incomplete check to avoid
adding duplicates keys.

Please fill a bug on bugzilla.ximian.com with a small sample and I'll
fix this ASAP.

Thanks
-- 
Sebastien Pouliot
email: sebastien at ximian.com
blog: http://pages.infinit.net/ctech/




More information about the Mono-devel-list mailing list