summaryrefslogtreecommitdiffstats
path: root/crypto/nss_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Reland: Simplify PRTimeToBaseTime implementation, add BaseTimeToPRTime.mattm@chromium.org2011-12-151-16/+6
| | | | | | | | | | BUG=107047 TEST=crypto_unittests TBR=wtc@chromium.org Review URL: http://codereview.chromium.org/8956003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114693 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 114499 - Simplify PRTimeToBaseTime implementation, add BaseTimeToPRTime.sail@chromium.org2011-12-141-6/+16
| | | | | | | | | | | | | BUG=107047 TEST=crypto_unittests Review URL: http://codereview.chromium.org/8894023 TBR=mattm@chromium.org Review URL: http://codereview.chromium.org/8913018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114524 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify PRTimeToBaseTime implementation, add BaseTimeToPRTime.mattm@chromium.org2011-12-141-16/+6
| | | | | | | | | | BUG=107047 TEST=crypto_unittests Review URL: http://codereview.chromium.org/8894023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114499 0039d316-1c4b-4281-b951-d872f2087c98
* Change the Chrome OS PKCS #11 module from libopencryptoki.so to libchaps.so.dkrahn@chromium.org2011-11-171-19/+19
| | | | | | | | | | | | | | | This CL is part of a larger effort to replace opencryptoki as the PKCS #11 layer in Chrome OS. In this first phase, libchaps.so forwards requests to a daemon (chapsd) which loads opencryptoki to service the requests. You can find the Chaps design doc here: https://docs.google.com/a/google.com/document/d/1TQFc6GABKa1JgwUx2hIcxAHQ329fkd03yYlGxhfHQlQ/edit Change-Id: I42962c4703413039641b6ede40caaf0c97ab900e BUG=chromium-os:21005 TEST=* Ensure previously existing certs still exist. * Import new cert and private key from PKCS12 file. Review URL: http://codereview.chromium.org/8527006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110435 0039d316-1c4b-4281-b951-d872f2087c98
* Allow linker initialization of lazy instancejoth@chromium.org2011-11-151-2/+2
| | | | | | | | | | | | | | Using the initializer list construct = {0} allows the object to be linker initialized. Modify the LazyInstance class design to make it a pod aggregate type that can be linker initialized this way. Also combines the instance and state members, in line with the Singleton<> class design. Introduces a new LAZY_INSTANCE_INITIALIZER macro specifically for using to init all lazy instances + modify all existing callsites to use it. (Old code would no longer compile) BUG=94925 TEST=existing tests pass. http://build.chromium.org/f/chromium/perf/linux-release/sizes/report.html?history=150&header=chrome-si&graph=chrome-si&rev=-1 should step downward. TBR=jam@chromium.org,rvargas@chromium.org,darin@chromium.org,ben@chromium.org,apatrick@chromium.org,akalin@chromium.org Review URL: http://codereview.chromium.org/8491043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110076 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements certificate import from ONC file.gspencer@chromium.org2011-11-031-1/+1
| | | | | | | | | | | | | | | | | | It will import any certificates in an ONC file into the certificate database. It does not yet associate the given GUID for the certificate with the certificate added to the database. That will happen in an upcoming CL. This also adds test cases for importing each type of certificate. BUG=chromium-os:19404,chromium-os:19406 TEST=Ran new unit test cases. Imported ONC file with a certificate and saw that it appeared in the certificate manager. Review URL: http://codereview.chromium.org/8403007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108551 0039d316-1c4b-4281-b951-d872f2087c98
* Implement UseLocalCacheOfNSSDatabaseIfNFS() for OpenBSD.robert.nagy@gmail.com2011-10-251-3/+11
| | | | | | | | | | R=wtc@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/8396003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107173 0039d316-1c4b-4281-b951-d872f2087c98
* This reinstates a change of gauravsh's that I revertedgspencer@chromium.org2011-10-191-3/+0
| | | | | | | | | | | | | | | | | | because we thought it might be the cause of crashes when getting SPDY certs. http://crosbug.com/21693 We've tested that, and it doesn't appear to be the cause. So, I'm resubmitting the code from review 8212003 TBR=gauravsh@chromium.org BUG=chromium-os:21693, chromium-os:20933 TEST=Built with and without change, and tested SPDY proxy setup on an alex. Review URL: http://codereview.chromium.org/8349020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106225 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 105136 - [chromiumos] Start TPM token initialization re-tries on logingspencer@chromium.org2011-10-141-0/+3
| | | | | | | | | | | | | ** Because of crash bug http://crosbug.com/21693, I'm going to revert this until gaurav or I can take a look ** Original Review URL: http://codereview.chromium.org/8212003 BUG=chromium-os:20933,chromium-os:21693 TBR=gauravsh@chromium.org Review URL: http://codereview.chromium.org/8289019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105599 0039d316-1c4b-4281-b951-d872f2087c98
* [chromiumos] Start TPM token initialization re-tries on logingauravsh@chromium.org2011-10-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current TPM token setup logic attempts initialization once after the user logs in. Asynchronous attempts for TPM token setup are not triggered unless the user opens the VPN or WiFi config panel (attempt retries are triggered via a call to CertLibraryImpl::RequestCertificates()). This means that if the first attempt fails and the user never opens up the WiFi config or VPN config panel, the TPM token will stay uninitialized. This breaks the certificate manager (list of certs is empty), the SPDY proxy extension, amongst other things. Essentially, any part of the network subsystem that depends on the private hardware NSS slot (via crypto::GetPrivateNSSKeySlot) stays broken if the first attempt fails. (So, this is not just an issue with the list of certs not being displayed correctly). This CL changes that so that retry logic for TPM token init is triggered right after the user logs in. BUG=chromium-os:20933 TEST=Log in, verify from logs that TPM initialization attempts start immediately after. Verify that the missing certificates issue no longer happens. Change-Id: I9c609bdb198a88db8ceb2019cc92c19d1983bc05 Review URL: http://codereview.chromium.org/8212003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105136 0039d316-1c4b-4281-b951-d872f2087c98
* Fix library paths for preloading NSS on Ubuntu 11.10.lambroslambrou@chromium.org2011-10-071-2/+12
| | | | | | | | | | BUG=99053,91962 TEST=Manual Review URL: http://codereview.chromium.org/8143012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104421 0039d316-1c4b-4281-b951-d872f2087c98
* Changed OAuth token+secret encryption to use supplemental user key from NSS DB.zelidrag@chromium.org2011-09-071-0/+50
| | | | | | | | BUG=chromium-os:18633 TEST=none Review URL: http://codereview.chromium.org/7756025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99912 0039d316-1c4b-4281-b951-d872f2087c98
* Protect against NULL delegate in NSSInit.stevenjb@google.com2011-07-081-5/+12
| | | | | | | | | | | This is a fix for http://codereview.chromium.org/7244012 when running from the command line when the tpm delegate is not initialized. BUG=chromium-os:15829 TEST=Run chrome for ChromeOS from the command line and open Network Menu > Other Wi-Fi network > Advanced. Chrome should not crash. Review URL: http://codereview.chromium.org/7330007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91901 0039d316-1c4b-4281-b951-d872f2087c98
* Replace WifiConfigModel with async CertLibrarystevenjb@google.com2011-06-281-39/+50
| | | | | | | | | | | | Update WifiConfigView and VpnConfigView to use CertLibrary. Includes changes to crypto:nss_util.cc BUG=chromium-os:15829 TEST=Test wifi/other + certificates and VPN + certificates. UI should not block. Review URL: http://codereview.chromium.org/7244012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90833 0039d316-1c4b-4281-b951-d872f2087c98
* Search all slots when looking for a key in NSSgspencer@google.com2011-06-081-18/+10
| | | | | | | | | | | This should make it possible to run on a VM, and still find the private key created for the owner in the software slot. BUG=chromium-os:15817 TEST=Built an image and tried it on a VM and a device. Both showed restricted users list. Review URL: http://codereview.chromium.org/7066070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88380 0039d316-1c4b-4281-b951-d872f2087c98
* Include the actual NSS database directory pathname in thewtc@chromium.org2011-06-071-1/+1
| | | | | | | | | | | | error message to help track down bug 75197. R=rvargas@chromium.org BUG=75197 TEST=none Review URL: http://codereview.chromium.org/7041002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88223 0039d316-1c4b-4281-b951-d872f2087c98
* This adds calls to new API for cryptohomed that gives statusgspencer@chromium.org2011-04-191-73/+91
| | | | | | | | | | | | | | of the PKCS#11 initialization of the TPM. Also, add cros_library wrapper calls for new libcros API. BUG=chromium-os:12303 TEST=Ran on device, checked to make sure TPM certs showed up, indicating that status and user PIN were successfully retrieved. Review URL: http://codereview.chromium.org/6838032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82134 0039d316-1c4b-4281-b951-d872f2087c98
* linux: don't always print dlopen errors from LoadNativeLibraryevan@chromium.org2011-04-181-1/+1
| | | | | | | | | | | Instead, return them to the caller and let the caller decide whether the error is worth notifying the user about. BUG=79068 Review URL: http://codereview.chromium.org/6864020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82008 0039d316-1c4b-4281-b951-d872f2087c98
* Move crypto files out of base, to a top level directory.rvargas@google.com2011-04-141-0/+706
src/crypto is now an independent project that contains our cryptographic primitives (except md5 and sha1). This removes the base dependency from nss, openssl and sqlite. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6805019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81611 0039d316-1c4b-4281-b951-d872f2087c98