Re: How to export private key in RSA format from NSS

2014-07-20 Thread Chuck Lee
於 2014/7/18 下午 11:35, Richard Barnes 提到: On Jul 15, 2014, at 11:05 PM, Chuck Lee wrote: Yes, but it doesn't work because it also calls PK11_ExportPrivKeyInfo() to get the RSA private key info. Why is this a problem? PK11_ExportDERPrivateKeyInfo() works fine for WebCrypto. Ar

Re: How to export private key in RSA format from NSS

2014-07-16 Thread Chuck Lee
於 2014/7/17 上午 06:41, Robert Relyea 提到: On 07/15/2014 08:05 PM, Chuck Lee wrote: Yes, but it doesn't work because it also calls PK11_ExportPrivKeyInfo() to get the RSA private key info. Now I am trying to decrypt key exported by PK11_ExportEncryptedPrivKeyInfo() with m

Re: How to export private key in RSA format from NSS

2014-07-15 Thread Chuck Lee
imple method to decrypt. 於 2014/7/16 上午 01:59, Richard Barnes 提到: Have you tried exporting with PK11_ExportDERPrivateKeyInfo? That's what WebCrypto uses to export keys in PKCSD#8 format: <http://dxr.mozilla.org/mozilla-central/source/dom/crypto/CryptoKey.cpp?#333> On Jul 13, 2014, at

How to export private key in RSA format from NSS

2014-07-13 Thread Chuck Lee
Hi all, I am now working on supporting PKCS#12 format key on Firefox OS's Wifi module [1]. Because current PSM/NSS API doesn't fit the requirement of UX(assigning nickname of imported certificates) and gonk(wpa_supplicant needs to read private key in RSA format), I have to do some hack