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

Unified Diff: net/cert/sha256_legacy_support_win.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/sha256_legacy_support_win.h ('k') | net/cert/sha256_legacy_support_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/sha256_legacy_support_win.cc
diff --git a/net/cert/sha256_legacy_support_win.cc b/net/cert/sha256_legacy_support_win.cc
deleted file mode 100644
index 3fe700e4e1136f8a581be6fe5ad90c9569b55c85..0000000000000000000000000000000000000000
--- a/net/cert/sha256_legacy_support_win.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/cert/sha256_legacy_support_win.h"
-
-namespace net {
-
-namespace sha256_interception {
-
-bool IsSupportedSubjectType(DWORD subject_type) {
- switch (subject_type) {
- case CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB:
- case CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT:
- case CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL:
- return true;
- }
- return false;
-}
-
-bool IsSupportedIssuerType(DWORD issuer_type) {
- switch (issuer_type) {
- case CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY:
- case CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT:
- case CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN:
- return true;
- }
- return false;
-}
-
-base::StringPiece GetSubjectSignature(DWORD subject_type,
- void* subject_data) {
- switch (subject_type) {
- case CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB: {
- CRYPT_DATA_BLOB* data_blob =
- reinterpret_cast<CRYPT_DATA_BLOB*>(subject_data);
- return base::StringPiece(reinterpret_cast<char*>(data_blob->pbData),
- data_blob->cbData);
- }
- case CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT: {
- PCCERT_CONTEXT subject_cert =
- reinterpret_cast<PCCERT_CONTEXT>(subject_data);
- return base::StringPiece(
- reinterpret_cast<char*>(subject_cert->pbCertEncoded),
- subject_cert->cbCertEncoded);
- }
- case CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL: {
- PCCRL_CONTEXT subject_crl =
- reinterpret_cast<PCCRL_CONTEXT>(subject_data);
- return base::StringPiece(
- reinterpret_cast<char*>(subject_crl->pbCrlEncoded),
- subject_crl->cbCrlEncoded);
- }
- }
- return base::StringPiece();
-}
-
-PCERT_PUBLIC_KEY_INFO GetIssuerPublicKey(DWORD issuer_type,
- void* issuer_data) {
- switch (issuer_type) {
- case CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY:
- return reinterpret_cast<PCERT_PUBLIC_KEY_INFO>(issuer_data);
- case CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT: {
- PCCERT_CONTEXT cert = reinterpret_cast<PCCERT_CONTEXT>(issuer_data);
- return &cert->pCertInfo->SubjectPublicKeyInfo;
- }
- case CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN: {
- PCCERT_CHAIN_CONTEXT chain =
- reinterpret_cast<PCCERT_CHAIN_CONTEXT>(issuer_data);
- PCCERT_CONTEXT cert = chain->rgpChain[0]->rgpElement[0]->pCertContext;
- return &cert->pCertInfo->SubjectPublicKeyInfo;
- }
- }
- return NULL;
-}
-
-} // namespace sha256_interception
-
-} // namespace net
« no previous file with comments | « net/cert/sha256_legacy_support_win.h ('k') | net/cert/sha256_legacy_support_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698