Re: Incorrect encoding of PKCS12 bag attributes

2021-08-03 Thread Osipov, Michael (LDA IT PLM)
Max, indeed! I was looking too low-level while analyzing how stuff works. friendlyName is handled as expected. Thank you for the clarification and apoligies for the noise. Regards, Michael Am 2021-08-01 um 03:54 schrieb Wei-Jun Wang: Hi Michael, I’m not sure what exact problem you ran int

Re: Incorrect encoding of PKCS12 bag attributes

2021-07-31 Thread Wei-Jun Wang
Hi Michael, I’m not sure what exact problem you ran into, but looking at the implementation of PKCS12KeyStore at [1] the friendly name is hardcoded to be encoded in BMPString: bagAttr1.putOID(PKCS9FriendlyName_OID); DerOutputStream bagAttrContent1 = new DerOutputStream()

Re: Incorrect encoding of PKCS12 bag attributes

2021-07-30 Thread Osipov, Michael (LDA IT PLM)
Am 2021-07-29 um 16:05 schrieb Sean Mullan: Are you calling the PKCS12Attribute(String, String) constructor from your code? That API currently specifies that String values are encoded as UTF-8, so we could not change the behavior without a specification change. Can you use the PKCS12Attribute(b

Re: Incorrect encoding of PKCS12 bag attributes

2021-07-29 Thread Sean Mullan
Are you calling the PKCS12Attribute(String, String) constructor from your code? That API currently specifies that String values are encoded as UTF-8, so we could not change the behavior without a specification change. Can you use the PKCS12Attribute(byte[]) constructor instead which takes a DER