diff --git a/mozilla/security/nss/lib/cryptohi/keyhi.h b/mozilla/security/nss/lib/cryptohi/keyhi.h index be7f88ca89e..331eb67d11a 100644 --- a/mozilla/security/nss/lib/cryptohi/keyhi.h +++ b/mozilla/security/nss/lib/cryptohi/keyhi.h @@ -33,7 +33,7 @@ * * key.h - public data structures and prototypes for the private key library * - * $Id: keyhi.h,v 1.2 2001-04-11 00:29:07 nelsonb%netscape.com Exp $ + * $Id: keyhi.h,v 1.3 2001-04-24 20:04:13 relyea%netscape.com Exp $ */ #ifndef _KEYHI_H_ @@ -148,12 +148,20 @@ SECKEY_DecodeDERSubjectPublicKeyInfo(SECItem *spkider); extern CERTSubjectPublicKeyInfo * SECKEY_ConvertAndDecodeSubjectPublicKeyInfo(char *spkistr); +/* + * extract the public key from a subject Public Key info structure. + * (used by JSS). + */ +extern SECKEYPublicKey * +SECKEY_ExtractPublicKey(CERTSubjectPublicKeyInfo *); + /* ** Destroy a private key object. ** "key" the object */ extern void SECKEY_DestroyPrivateKey(SECKEYPrivateKey *key); + /* ** Destroy a public key object. ** "key" the object diff --git a/mozilla/security/nss/lib/cryptohi/seckey.c b/mozilla/security/nss/lib/cryptohi/seckey.c index 4ffa67fd615..d26770f3bce 100644 --- a/mozilla/security/nss/lib/cryptohi/seckey.c +++ b/mozilla/security/nss/lib/cryptohi/seckey.c @@ -935,6 +935,14 @@ seckey_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki) return NULL; } + +/* required for JSS */ +SECKEYPublicKey * +SECKEY_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki) +{ + return seckey_ExtractPublicKey(spki); +} + SECKEYPublicKey * CERT_ExtractPublicKey(CERTCertificate *cert) {