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

Unified Diff: net/base/origin_bound_cert_store.h

Issue 7585037: Add functionality to OriginBoundCertStore interface and implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « net/base/default_origin_bound_cert_store_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/origin_bound_cert_store.h
===================================================================
--- net/base/origin_bound_cert_store.h (revision 96316)
+++ net/base/origin_bound_cert_store.h (working copy)
@@ -7,6 +7,7 @@
#pragma once
#include <string>
+#include <vector>
#include "net/base/net_api.h"
@@ -21,6 +22,12 @@
class NET_API OriginBoundCertStore {
public:
+ struct OriginBoundCertInfo {
wtc 2011/08/16 23:28:57 Should we mention this is used by GetAllOriginBoun
+ std::string origin; // Origin, for instance "https://www.versign.com:8443".
wtc 2011/08/16 23:28:57 Nit: "versign" is misspelled. Use a typical HTTPS
+ std::string private_key; // DER-encoded PrivateKeyInfo struct.
+ std::string cert; // DER-encoded certificate.
+ };
+
virtual ~OriginBoundCertStore() {}
// TODO(rkn): Specify certificate type (RSA or DSA).
@@ -34,11 +41,23 @@
std::string* private_key_result,
std::string* cert_result) = 0;
- // Adds an origin bound cert to the store.
- virtual bool SetOriginBoundCert(const std::string& origin,
+ // Adds an origin bound cert and the corresponding private key to the store.
+ virtual void SetOriginBoundCert(const std::string& origin,
const std::string& private_key,
const std::string& cert) = 0;
+ // Removes an origin bound cert and the corresponding private key from the
+ // store.
+ virtual void DeleteOriginBoundCert(const std::string& origin) = 0;
+
+ // Removes all origin bound certs and the corresponding private keys from
+ // the store.
+ virtual void DeleteAll() = 0;
+
+ // Returns all origin bound certs and the corresponding private keys.
+ virtual void GetAllOriginBoundCerts(
+ std::vector<OriginBoundCertInfo>* origin_bound_certs) = 0;
+
// Returns the number of certs in the store.
// Public only for unit testing.
virtual int GetCertCount() = 0;
« no previous file with comments | « net/base/default_origin_bound_cert_store_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698