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

Side by Side Diff: net/third_party/mozilla_security_manager/nsPKCS12Blob.h

Issue 8566056: This applies GUIDs to certificate and key nicknames when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor fixes Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* ***** BEGIN LICENSE BLOCK ***** 1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 * 3 *
4 * The contents of this file are subject to the Mozilla Public License Version 4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with 5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at 6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/ 7 * http://www.mozilla.org/MPL/
8 * 8 *
9 * Software distributed under the License is distributed on an "AS IS" basis, 9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 class X509Certificate; 50 class X509Certificate;
51 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; 51 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
52 } // namespace net 52 } // namespace net
53 53
54 namespace mozilla_security_manager { 54 namespace mozilla_security_manager {
55 55
56 // Initialize NSS PKCS#12 libs. 56 // Initialize NSS PKCS#12 libs.
57 void EnsurePKCS12Init(); 57 void EnsurePKCS12Init();
58 58
59 // Import the private key and certificate from a PKCS#12 blob into the slot. 59 // Import the private key and certificate from a PKCS#12 blob into the slot.
60 // If |is_extractable| is false, mark the private key as unextractable. 60 // If |is_extractable| is false, mark the private key as non-extractable.
61 // Returns a net error code. 61 // Returns a net error code. |imported_certs|, if non-NULL, returns a list of
62 // certs that were imported.
62 int nsPKCS12Blob_Import(PK11SlotInfo* slot, 63 int nsPKCS12Blob_Import(PK11SlotInfo* slot,
63 const char* pkcs12_data, 64 const char* pkcs12_data,
64 size_t pkcs12_len, 65 size_t pkcs12_len,
65 const string16& password, 66 const string16& password,
66 bool is_extractable); 67 bool is_extractable,
68 net::CertificateList* imported_certs);
67 69
68 // Export the given certificates into a PKCS#12 blob, storing into output. 70 // Export the given certificates into a PKCS#12 blob, storing into output.
69 // Returns the number of certificates exported. 71 // Returns the number of certificates exported.
70 // TODO(mattm): provide better error return status? 72 // TODO(mattm): provide better error return status?
71 int nsPKCS12Blob_Export(std::string* output, 73 int nsPKCS12Blob_Export(std::string* output,
72 const net::CertificateList& certs, 74 const net::CertificateList& certs,
73 const string16& password); 75 const string16& password);
74 76
75 } // namespace mozilla_security_manager 77 } // namespace mozilla_security_manager
76 78
77 #endif // NET_THIRD_PARTY_MOZILLA_SECURITY_MANAGER_NSPKCS12BLOB_H_ 79 #endif // NET_THIRD_PARTY_MOZILLA_SECURITY_MANAGER_NSPKCS12BLOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698