Dave Townsend wrote:
DER encoded Subject Public Keys Infos. The same format X509 certs encode public keys (or just about any standard tool that store public keys in DER).Robert Relyea wrote:Dave Townsend wrote:Anyway basic issue is that I need a SECKEYPublicKey and SECKEYPrivateKey. I can see how to create them in NSS for use, I've also found a technical note which suggests how to bring a public key into NSS, however I don't see anything about serializing/restoring a private key or how to get a created public key out of NSS. Can anyone point me in the right direction?Hi david,You have 2 options when extracting the public key.The first option is the preferred option : SECKEY_EncodeDERSubjectPublicKeyInfo() It takes a public key and returns a SECitem which is a DER encoded blob that represents that public key, including the public key type. You an reimport such a blob withSECKEY_DecodeDERSubjectPublicKeyInfo() and SECKEY_ExtractPublicKey();Excellent I think this is just what I needed. Tell me is the form that this comes out in standardised in any way or is it something that is NSS specific?
bob
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto