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

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: Removing use_openssl (requires WebRTC change to compile) 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
Index: net/http/des.cc
diff --git a/net/http/des.cc b/net/http/des.cc
index 4fce9ccd00d028df5f738a1eca0d1d1dd5e22705..a4a12ce71cbbf59680b9abfe043fc27509d5f939 100644
--- a/net/http/des.cc
+++ b/net/http/des.cc
@@ -6,14 +6,8 @@
#include "base/logging.h"
-#if defined(USE_OPENSSL)
#include <openssl/des.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)
Ryan Sleevi 2016/04/18 14:23:30 I'm torn on this. Semantically, your change is co
svaldez 2016/04/18 15:09:35 Acknowledged.
-
-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

Powered by Google App Engine
This is Rietveld 408576698