Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: nss/lib/pk11wrap/pk11akey.c

Issue 205343004: Add PK11_ExportDERPrivateKeyInfo and PK11_ExportPrivKeyInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Fix placement of * Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nss/exports_win.def ('k') | nss/lib/pk11wrap/pk11obj.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/pk11wrap/pk11akey.c
===================================================================
--- nss/lib/pk11wrap/pk11akey.c (revision 259431)
+++ nss/lib/pk11wrap/pk11akey.c (working copy)
@@ -1703,7 +1703,13 @@
SECKEYPrivateKeyInfo *
PK11_ExportPrivateKeyInfo(CERTCertificate *cert, void *wincx)
{
- return NULL;
+ SECKEYPrivateKeyInfo *pki = NULL;
+ SECKEYPrivateKey *pk = PK11_FindKeyByAnyCert(cert, wincx);
+ if (pk != NULL) {
+ pki = PK11_ExportPrivKeyInfo(pk, wincx);
+ SECKEY_DestroyPrivateKey(pk);
+ }
+ return pki;
}
SECKEYEncryptedPrivateKeyInfo *
« no previous file with comments | « nss/exports_win.def ('k') | nss/lib/pk11wrap/pk11obj.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698