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

Unified Diff: pkcs11.h

Issue 2833006: Eliminate stale pkcs11 certificate handler implementations. (Closed) Base URL: ssh://git@chromiumos-git/entd.git
Patch Set: Changed default pkcs11 mode and updated tests. Created 10 years, 6 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 | « main.cc ('k') | pkcs11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkcs11.h
diff --git a/pkcs11.h b/pkcs11.h
index cb5cf3888c4042dec37a540097949cdfaf748865..9349359347ffdce88dbbab87a474f9e874a8bc30 100644
--- a/pkcs11.h
+++ b/pkcs11.h
@@ -84,28 +84,25 @@ class Pkcs11 : public JSObjectWrapper<Pkcs11> {
public:
// The constructor takes two handlers:
// * cert_handler builds CSRs and certificates.
+ // - builds CSRs
+ // - may generate a public/private key pair
+ // - parses Certificates and extracts the subject
// * slot_handler handles the interface with a pkcs11 device:
- // - generates public/private key pairs
- // - adds certificates
- // - retrieves a list of slot labels and the contents of a named slot.
+ // - may generate public/private key pairs
+ // - stores key pairs and certificates
+ // - retrieves a list of existing token objects in a slot
//
- // If cert_handler is NULL, a Pkcs11CertificateHandlerLocalFile is built,
- // with empty filenames (see below).
- // If slot_handler is NULL, a Pkcs11SlotHandlerInMemory is built
- // (see code).
+ // If cert_handler or slot_handler NULL,
+ // the class is initialized with the default handler (see code).
Pkcs11(Pkcs11CertificateHandler* cert_handler,
Pkcs11SlotHandler* slot_handler);
virtual ~Pkcs11();
virtual bool Initialize();
- // Call this *instead of* Initialize() to use opencryptoki with openssl
- bool InitializeOpenCryptoki(const std::string& engine);
- // Call this *instead of* Initialize() to use openssl to generate keys
- // and to store the private key in the tpm (like glaptop does)
- bool InitializeGLaptop();
- // Call this *instead of* Initialize() to use openssl without opencryptoki
- bool InitializeOpenSSL();
- // Call this *instead of* Initialize() to use local files
- bool InitializeLocalFiles(const std::string& csr, const std::string& cert);
+ // Set the Certificate handler to use openssl to generate CSRs
+ bool SetOpenSSLHandlers();
+ // Set the Slot handler to use opencryptoki,
+ // and the Certificate handler to use openssl
+ bool SetOpenCryptokiHandlers();
// Adds slot_object to "pkcs11.slots"
bool AddJSSlotObject(const SlotObject* slot_object);
« no previous file with comments | « main.cc ('k') | pkcs11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698