Index: net/cert/x509_util_nss.h |
diff --git a/net/cert/x509_util_nss.h b/net/cert/x509_util_nss.h |
index b971963d4d18467e8d9a17c3ab0a798854c4573e..b3f0b4c62a9b50745e0444e871c41840cb52de3d 100644 |
--- a/net/cert/x509_util_nss.h |
+++ b/net/cert/x509_util_nss.h |
@@ -20,6 +20,7 @@ typedef struct PLArenaPool PLArenaPool; |
typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey; |
typedef struct SECItemStr SECItem; |
typedef struct SECKEYPublicKeyStr SECKEYPublicKey; |
+typedef struct PK11SlotInfoStr PK11SlotInfo; |
wtc
2013/05/22 20:58:45
Nit: list this typedef in sorted order. (The origi
|
namespace net { |
@@ -93,6 +94,15 @@ bool GetIssuersFromEncodedList( |
bool IsCertificateIssuedBy(const std::vector<CERTCertificate*>& cert_chain, |
const std::vector<CERTName*>& valid_issuers); |
+// Generates a unique nickname for |slot|, returning |nickname| if it is |
+// already unique. |
+// |
+// Note: The nickname returned will NOT include the token name, and must |
+// be prepended if calling an NSS function that expects <token>:<nickname>. |
wtc
2013/05/22 20:58:45
Nit: this should be
..., and the token name must
|
+// TODO(gspencer): Internationalize this: it's wrong to hard-code English. |
wtc
2013/05/22 20:58:45
We need to describe how we make the nickname uniqu
Ryan Sleevi
2013/05/22 23:20:19
I wanted to try to avoid describing in the header
|
+std::string GetUniqueNicknameForSlot(const std::string& nickname, |
+ SECItem* subject, |
wtc
2013/05/22 20:58:45
Nit: this should ideally be a const pointer. We wi
Ryan Sleevi
2013/05/22 23:20:19
Sure, fixed.
|
+ PK11SlotInfo* slot); |
#endif // defined(USE_NSS) || defined(OS_IOS) |
} // namespace x509_util |