summaryrefslogtreecommitdiffstats
path: root/crypto
Commit message (Collapse)AuthorAgeFilesLines
* Remove a static initializer from ScopedCAPIHandlersleevi@chromium.org2011-08-311-6/+3
| | | | | | | | | | BUG=87171 TEST=none Review URL: http://codereview.chromium.org/7776025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98923 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 4)thestig@chromium.org2011-08-182-3/+3
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7670016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97286 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Purify and Quantify.Doing so will reduce substantially the size of ↵jeanluc@chromium.org2011-08-171-9/+0
| | | | | | | | | the project files. BUG=92102 Review URL: http://codereview.chromium.org/7528010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97156 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CRYPTO_API to CRYPTO_EXPORT.darin@chromium.org2011-08-0516-63/+64
| | | | | | | R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7491061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95652 0039d316-1c4b-4281-b951-d872f2087c98
* Add WARN_UNUSED_RESULT to crypto/hmac.hrsleevi@chromium.org2011-07-302-6/+14
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7522014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94826 0039d316-1c4b-4281-b951-d872f2087c98
* Add a routine for truncated HMAC verificationrsleevi@chromium.org2011-07-293-5/+25
| | | | | | | | | | BUG=none TEST=crypto_unittests --gtest_filter=HMACTest.* Review URL: http://codereview.chromium.org/7532020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94794 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Components build for cryptothakis@chromium.org2011-07-292-6/+9
| | | | | | | | | BUG=90078 TEST=none Review URL: http://codereview.chromium.org/7532023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94621 0039d316-1c4b-4281-b951-d872f2087c98
* Define FOO_IMPLEMENTATION unconditionally. Even though they only matter whendarin@chromium.org2011-07-201-5/+3
| | | | | | | | | | building component DLLs, it doesn't hurt to always define them, and it makes the GYP files a bit simpler. R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7457016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93226 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux redux buildjoth@chromium.org2011-07-201-5/+5
| | | | | | | | | | | | Follow up to http://codereview.chromium.org/7342047/ stl_util.h seems out of favor, so calling stl method directly as required. BUG=None TEST=Greeness on http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Linux%20Redux/ Review URL: http://codereview.chromium.org/7457021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93181 0039d316-1c4b-4281-b951-d872f2087c98
* some cleanup for base/stl_utildilmah@chromium.org2011-07-195-6/+6
| | | | | | | | | | | | | removed unused/irrelevant functions removed irrelevant comments Moved stl_util-inl.h => stl_util.h BUG=None TEST=None Review URL: http://codereview.chromium.org/7342047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93110 0039d316-1c4b-4281-b951-d872f2087c98
* Add a Verify routine for HMACrsleevi@chromium.org2011-07-183-27/+101
| | | | | | | | | | BUG=none TEST=crypto_unittests Review URL: http://codereview.chromium.org/7277024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92824 0039d316-1c4b-4281-b951-d872f2087c98
* Add COMPONENT_BUILD global define. darin@chromium.org2011-07-132-8/+2
| | | | | | | | | | | | | | | | | | | | | This avoids the need to define FOO_DLL macros for each project that we wish to optionally build as a DLL (when component=="shared_library"). This in turn means that we do not need direct_dependent_settings to define FOO_DLL, and that means that we don't need to update projects to convert transitive dependencies into explicit dependencies. This makes the component build more consistent with the static build. An alternative would be to use all_dependent_settings, but I feel that the global approach is simpler as it creates less repetition in each target definition for components. A side-effect of this change is that I needed to make base_nacl_win64 be a shared_library in the component build. R=rvargas,bradnelson,evan Review URL: http://codereview.chromium.org/7344022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92409 0039d316-1c4b-4281-b951-d872f2087c98
* Export some functions to fix component build for chromeos.sadrul@chromium.org2011-07-131-7/+7
| | | | | | | | | BUG=none TEST=component build works for chromeos Review URL: http://codereview.chromium.org/7342033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92408 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add COMPONENT_BUILD global define. "yurys@chromium.org2011-07-132-2/+8
| | | | | | | | | | | | | The change broke compilation on Linux Builder (dbg)(shared): http://build.chromium.org/p/chromium/builders/Linux%20Builder%20%28dbg%29%28shared%29/builds/3365/steps/compile/logs/stdio TBR=darin BUG=None TEST=None Review URL: http://codereview.chromium.org/7352014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92329 0039d316-1c4b-4281-b951-d872f2087c98
* Add COMPONENT_BUILD global define. darin@chromium.org2011-07-132-8/+2
| | | | | | | | | | | | | | | | | | | | | | This avoids the need to define FOO_DLL macros for each project that we wish to optionally build as a DLL (when component=="shared_library"). This in turn means that we do not need direct_dependent_settings to define FOO_DLL, and that means that we don't need to update projects to convert transitive dependencies into explicit dependencies. This makes the component build more consistent with the static build. An alternative would be to use all_dependent_settings, but I feel that the global approach is simpler as it creates less repetition in each target definition for components. A side-effect of this change is that I needed to make base_nacl_win64 be a shared_library in the component build. R=rvargas,bradnelson Review URL: http://codereview.chromium.org/7344022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92325 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: enable components build for Linuxevan@chromium.org2011-07-123-14/+13
| | | | | | | | | | Expose some more API via CRYPTO_API and refactor gyp file. (Reland of r92188.) Review URL: http://codereview.chromium.org/7336009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92212 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "crypto: enable components build for Linux"evan@chromium.org2011-07-123-13/+14
| | | | | | This reverts commit r92188, link failures in skia (!). git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92206 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: enable components build for Linuxevan@chromium.org2011-07-123-14/+13
| | | | | | | | Expose some more API via CRYPTO_API and refactor gyp file. Review URL: http://codereview.chromium.org/7336009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92188 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
* Eliminate an extra allocation in encryptor_win when en/decrypting.rsleevi@chromium.org2011-07-081-16/+23
| | | | | | | | | | | R=wtc BUG=none TEST=crypto_unittests Review URL: http://codereview.chromium.org/7272022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91803 0039d316-1c4b-4281-b951-d872f2087c98
* Use base::StringPiece for input parameters in Encryptor, rather than std::stringrsleevi@chromium.org2011-07-086-29/+48
| | | | | | | | | | | R=wtc BUG=none TEST=crypto_unittests Review URL: http://codereview.chromium.org/7230037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91800 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: convert OpenPGP code to NSSagl@chromium.org2011-07-073-112/+200
| | | | | | | | | | | | (This is a reland of r91350 which was reverted in r91355 (GYP issue), landed again in r91559 and reverted again in r91561 (Windows shared build issue).) BUG=none TEST=crypto_unittests http://codereview.chromium.org/7273080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91699 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "crypto: convert OpenPGP code to NSS"agl@chromium.org2011-07-063-191/+111
| | | | | | This reverts commit r91559. Broke the Windows shared build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91561 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: convert OpenPGP code to NSSagl@chromium.org2011-07-063-111/+191
| | | | | | | | | | | (This is a reland of r91350 which was reverted in r91355.) BUG=none TEST=crypto_unittests Review URL: http://codereview.chromium.org/7273080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91559 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes for OpenSSLbulach@chromium.org2011-07-051-2/+2
| | | | | | | | | | | | | | | | | A couple of nit fixes following: + http://codereview.chromium.org/7247005 + http://codereview.chromium.org/6990036 + Fixes a typo (ctx / context) + Adds new abstract methods from stream_socket.h BUG= TEST= Review URL: http://codereview.chromium.org/7253038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91498 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "crypto: convert OpenPGP code to NSS"agl@chromium.org2011-07-013-191/+111
| | | | | | This reverts commit r91350. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91355 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: convert OpenPGP code to NSSagl@chromium.org2011-07-013-111/+191
| | | | | | | | | BUG=none TEST=crypto_unittests Review URL: http://codereview.chromium.org/7273080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91350 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to more code to enable buildingrvargas@google.com2011-06-301-3/+6
| | | | | | | | | | | a shared net library on Linux, and update base and crypto API definitions. BUG=76997 TEST=none Review URL: http://codereview.chromium.org/7240021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91234 0039d316-1c4b-4281-b951-d872f2087c98
* Crypto: Build crypto.dll on Windows.rvargas@google.com2011-06-291-11/+24
| | | | | | | | BUG=85776 TEST=none Review URL: http://codereview.chromium.org/7272045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91008 0039d316-1c4b-4281-b951-d872f2087c98
* Use crnss.dll and crnspr.dll with the component build.rvargas@google.com2011-06-281-0/+1
| | | | | | | | BUG=85776 TEST=none Review URL: http://codereview.chromium.org/7273015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90853 0039d316-1c4b-4281-b951-d872f2087c98
* Replace WifiConfigModel with async CertLibrarystevenjb@google.com2011-06-282-39/+67
| | | | | | | | | | | | 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
* crypto: add OpenPGP symmetric encryption for ChromeOSagl@chromium.org2011-06-274-3/+877
| | | | | | | | | | | | | This contains a basic implementation of OpenPGP (RFC 4880) symmetric encryption and decryption. It's written specifically on top of OpenSSL, which should suffice for the intended use case. BUG=none TEST=crypto_unittest Review URL: http://codereview.chromium.org/7247005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90633 0039d316-1c4b-4281-b951-d872f2087c98
* Implement AES-CTR for NSS.hclam@chromium.org2011-06-245-49/+375
| | | | | | | | | | | Implement AES-128-CTR. BUG=87152 TEST=None Review URL: http://codereview.chromium.org/7056026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90425 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize member variables.jhawkins@chromium.org2011-06-222-1/+2
| | | | | | | | | | | | CID=13721,14709,16392,17192,17585 BUG=none TEST=none R=kmadhusu@chromium.org Review URL: http://codereview.chromium.org/7206066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90086 0039d316-1c4b-4281-b951-d872f2087c98
* Crypto: Add crypto_api to code needed outside of cryptorvargas@google.com2011-06-203-9/+14
| | | | | | | | | | that is not covered by crypto_unittests BUG=85776 TEST=none Review URL: http://codereview.chromium.org/7209001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89756 0039d316-1c4b-4281-b951-d872f2087c98
* net: Don't access SECOID_AlgorithmIDTemplate directly.rvargas@google.com2011-06-201-1/+2
| | | | | | | | | | This is required when building nss as a dynamic library. BUG=85776 TEST=none Review URL: http://codereview.chromium.org/7189044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89732 0039d316-1c4b-4281-b951-d872f2087c98
* crypto: Add crytpto_api.h and annotate the current exports needed to runrvargas@google.com2011-06-1710-10/+44
| | | | | | | | | | crypto_unittests. BUG=85776 TEST=none Review URL: http://codereview.chromium.org/7168004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89551 0039d316-1c4b-4281-b951-d872f2087c98
* Search all slots when looking for a key in NSSgspencer@google.com2011-06-083-40/+36
| | | | | | | | | | | 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
* Change HMAC::Sign() to take base::StringPiece instead of string.hclam@chromium.org2011-06-065-9/+7
| | | | | | | | | | | | Do this to avoid memory copying when signning data in char*. base::StringPiece nicely handles both cases. BUG=None TEST=crypto_unittests Review URL: http://codereview.chromium.org/7033035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88049 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to have chrome building with net.dllrvargas@google.com2011-06-031-0/+2
| | | | | | | | BUG=76997 TEST=none Review URL: http://codereview.chromium.org/7056049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87873 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87315 - Revert 87309 - Second attempt to fix linux redux buildermirandac@chromium.org2011-05-311-14/+7
| | | | | | | | | | | | | | | | | Numerous targets were depending on linux/system.gyp:nss even on the openssl build and the gyp update means it shows up as a link error. BUG=None TEST=Builds with and without use_openssl=1 Review URL: http://codereview.chromium.org/7050040 TBR=joth@chromium.org Review URL: http://codereview.chromium.org/7054041 TBR=mirandac@chromium.org Review URL: http://codereview.chromium.org/6962044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87316 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 87309 - Second attempt to fix linux redux buildermirandac@chromium.org2011-05-311-7/+14
| | | | | | | | | | | | | | Numerous targets were depending on linux/system.gyp:nss even on the openssl build and the gyp update means it shows up as a link error. BUG=None TEST=Builds with and without use_openssl=1 Review URL: http://codereview.chromium.org/7050040 TBR=joth@chromium.org Review URL: http://codereview.chromium.org/7054041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87315 0039d316-1c4b-4281-b951-d872f2087c98
* Second attempt to fix linux redux builderjoth@chromium.org2011-05-311-14/+7
| | | | | | | | | | | Numerous targets were depending on linux/system.gyp:nss even on the openssl build and the gyp update means it shows up as a link error. BUG=None TEST=Builds with and without use_openssl=1 Review URL: http://codereview.chromium.org/7050040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87309 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing FindFromPublicKeyInfo so that it searches the "Public" NSS databasegspencer@google.com2011-05-252-30/+36
| | | | | | | | | | | | | | | | | | if it doesn't find the requested key in the "Private" NSS database. This fixes the ownership process because the ownership key is created in the public database because that needs to happen before the TPM is owned and available (and it's not really all that sensitive to begin with). BUG=chromium-os:15645 TEST=Built a new recovery image, wiped a device with it and verified that I was able to sign in as a new user and add users and forget networks. It also showed me as the owner of the device. Review URL: http://codereview.chromium.org/7066032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86654 0039d316-1c4b-4281-b951-d872f2087c98
* Final gyp patch to make use of the new cross-platform POSIX defines ↵tony@chromium.org2011-05-231-4/+4
| | | | | | | | toolkit_uses_gtk, os_posix, and use_x11. For lists of source files that use a mix of POSIX and Gtk APIs, toolkit_uses_gtk was given precedence. Solaris was made to use ALSA also, as libasound has been ported to FreeBSD and Solaris as a wrapper around the native OSS. Review URL: http://codereview.chromium.org/7055003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86352 0039d316-1c4b-4281-b951-d872f2087c98
* Globally replace <(library) with static_libraryevan@chromium.org2011-05-191-1/+1
| | | | | | | | | | | We provided <(library) as a variable to support a peculiar build configuration on Linux. We no longer support that build configuration, so we can simplify this code to no longer use a variable. Review URL: http://codereview.chromium.org/7051014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86004 0039d316-1c4b-4281-b951-d872f2087c98
* Private API for extensions like ssh-client that need access to ↵dilmah@chromium.org2011-05-186-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | websocket-to-tcp proxy. Access to TCP is obtained in following way: (1) extension requests authentication token via call to private API like: chrome.webSocketProxyPrivate.getPassportForTCP('netbsd.org', 25, callback); if API validates this request then extension obtains some string token (in callback). (2) open websocket connection to local websocket-to-tcp proxy ws://127.0.0.1:10101/tcpproxy (3) pass header containing hostname, port and token obtained at step (1) (4) communicate (in base64 encoding at this moment). Proxy (running in chrome process) verifies those tokens by calls to InternalAuthVerification::VerifyPassport Passports are one-time; no passport can be reused. Passports expire in short period of time (20 seconds). BUG=chromium-os:9667 TEST=unit_test,apitest Review URL: http://codereview.chromium.org/6683060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85757 0039d316-1c4b-4281-b951-d872f2087c98
* Add requested documentation.abarth@chromium.org2011-05-061-0/+1
| | | | | | Review URL: http://codereview.chromium.org/6927074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84493 0039d316-1c4b-4281-b951-d872f2087c98
* Add a method to HMAC to indicate how large a digest it produces.abarth@chromium.org2011-04-304-2/+34
| | | | | | Review URL: http://codereview.chromium.org/6904148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83681 0039d316-1c4b-4281-b951-d872f2087c98