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

Side by Side Diff: net/cert/internal/verify_signed_data.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/internal/verify_signed_data.h" 5 #include "net/cert/internal/verify_signed_data.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/der/parse_values.h" 8 #include "net/der/parse_values.h"
9 9
10 // TODO(eroman): There is no intention to implement this for non-OpenSSL. Remove
11 // this branch once the migration is complete. This could have been done as a
12 // conditional file (_openssl.cc) in the build file instead, but that is likely
13 // not worth the effort at this point.
14
15 #if !defined(USE_OPENSSL)
16
17 namespace net {
18
19 bool VerifySignedData(const SignatureAlgorithm& signature_algorithm,
20 const der::Input& signed_data,
21 const der::BitString& signature_value,
22 const der::Input& public_key,
23 const SignaturePolicy* policy) {
24 NOTIMPLEMENTED();
25 return false;
26 }
27
28 } // namespace net
29
30 #else
31
32 #include <openssl/bytestring.h> 10 #include <openssl/bytestring.h>
33 #include <openssl/digest.h> 11 #include <openssl/digest.h>
34 #include <openssl/ec.h> 12 #include <openssl/ec.h>
35 #include <openssl/ec_key.h> 13 #include <openssl/ec_key.h>
36 #include <openssl/evp.h> 14 #include <openssl/evp.h>
37 #include <openssl/rsa.h> 15 #include <openssl/rsa.h>
38 16
39 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
40 #include "crypto/openssl_util.h" 18 #include "crypto/openssl_util.h"
41 #include "crypto/scoped_openssl_types.h" 19 #include "crypto/scoped_openssl_types.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (!ParseEcKeyFromSpki(public_key_spki, &public_key, policy)) 283 if (!ParseEcKeyFromSpki(public_key_spki, &public_key, policy))
306 return false; 284 return false;
307 break; 285 break;
308 } 286 }
309 287
310 return DoVerify(signature_algorithm, signed_data, signature_value, 288 return DoVerify(signature_algorithm, signed_data, signature_value,
311 public_key.get()); 289 public_key.get());
312 } 290 }
313 291
314 } // namespace net 292 } // namespace net
315
316 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698