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

Unified Diff: chrome/common/net/x509_certificate_model_nss.cc

Issue 182313004: Remove GetPkcs11Id from x509_certificate_model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: .. 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 | « chrome/common/net/x509_certificate_model.h ('k') | chrome/common/net/x509_certificate_model_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/x509_certificate_model_nss.cc
diff --git a/chrome/common/net/x509_certificate_model_nss.cc b/chrome/common/net/x509_certificate_model_nss.cc
index bc0785c7ac6c3856f312d0149e31e8cffcf465f9..3fccdc092e0d82aba8dfc1eeea0d7be1f0a23ce8 100644
--- a/chrome/common/net/x509_certificate_model_nss.cc
+++ b/chrome/common/net/x509_certificate_model_nss.cc
@@ -258,29 +258,6 @@ void GetNicknameStringsFromCertList(
CERT_DestroyCertList(cert_list);
}
-// For background see this discussion on dev-tech-crypto.lists.mozilla.org:
-// http://web.archiveorange.com/archive/v/6JJW7E40sypfZGtbkzxX
-//
-// NOTE: This function relies on the convention that the same PKCS#11 ID
-// is shared between a certificate and its associated private and public
-// keys. I tried to implement this with PK11_GetLowLevelKeyIDForCert(),
-// but that always returns NULL on Chrome OS for me.
-std::string GetPkcs11Id(net::X509Certificate::OSCertHandle cert_handle) {
- std::string pkcs11_id;
- SECKEYPrivateKey *priv_key = PK11_FindKeyByAnyCert(cert_handle,
- NULL /* wincx */);
- if (priv_key) {
- // Get the CKA_ID attribute for a key.
- SECItem* sec_item = PK11_GetLowLevelKeyIDForPrivateKey(priv_key);
- if (sec_item) {
- pkcs11_id = base::HexEncode(sec_item->data, sec_item->len);
- SECITEM_FreeItem(sec_item, PR_TRUE);
- }
- SECKEY_DestroyPrivateKey(priv_key);
- }
- return pkcs11_id;
-}
-
void GetExtensions(
const string& critical_label,
const string& non_critical_label,
« no previous file with comments | « chrome/common/net/x509_certificate_model.h ('k') | chrome/common/net/x509_certificate_model_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698