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

Unified Diff: net/http/des.cc

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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/cert/x509_util_unittest.cc ('k') | net/http/transport_security_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/des.cc
diff --git a/net/http/des.cc b/net/http/des.cc
index 4fce9ccd00d028df5f738a1eca0d1d1dd5e22705..4f050225479ffb0db29b316ed106b44d9d98cd74 100644
--- a/net/http/des.cc
+++ b/net/http/des.cc
@@ -4,16 +4,10 @@
#include "net/http/des.h"
-#include "base/logging.h"
-
-#if defined(USE_OPENSSL)
#include <openssl/des.h>
+
+#include "base/logging.h"
#include "crypto/openssl_util.h"
-#elif defined(OS_IOS)
-#include <CommonCrypto/CommonCryptor.h>
-#else
-#error "Unknown platform"
-#endif
// The iOS version of DESEncrypt is our own code.
// DESSetKeyParity and DESMakeKey are based on
@@ -80,8 +74,6 @@ void DESMakeKey(const uint8_t* raw, uint8_t* key) {
key[7] = DESSetKeyParity((raw[6] << 1));
}
-#if defined(USE_OPENSSL)
-
void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) {
crypto::EnsureOpenSSLInit();
@@ -93,17 +85,4 @@ void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) {
reinterpret_cast<DES_cblock*>(hash), &ks, DES_ENCRYPT);
}
-#elif defined(OS_IOS)
-
-void DESEncrypt(const uint8_t* key, const uint8_t* src, uint8_t* hash) {
- CCCryptorStatus status;
- size_t data_out_moved = 0;
- status = CCCrypt(kCCEncrypt, kCCAlgorithmDES, kCCOptionECBMode,
- key, 8, NULL, src, 8, hash, 8, &data_out_moved);
- DCHECK(status == kCCSuccess);
- DCHECK(data_out_moved == 8);
-}
-
-#endif
-
} // namespace net
« no previous file with comments | « net/cert/x509_util_unittest.cc ('k') | net/http/transport_security_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698