| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CRYPTO_SIGNATURE_VERIFIER_H_ | 5 #ifndef CRYPTO_SIGNATURE_VERIFIER_H_ |
| 6 #define CRYPTO_SIGNATURE_VERIFIER_H_ | 6 #define CRYPTO_SIGNATURE_VERIFIER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| 11 #if defined(USE_NSS) | 11 #if defined(USE_NSS) |
| 12 #include <cryptoht.h> | 12 #include <cryptoht.h> |
| 13 #elif defined(OS_MACOSX) | 13 #elif defined(OS_MACOSX) |
| 14 #include <Security/cssm.h> | 14 #include <Security/cssm.h> |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
| 20 #include "crypto/crypto_api.h" |
| 20 | 21 |
| 21 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
| 22 #include "crypto/scoped_capi_types.h" | 23 #include "crypto/scoped_capi_types.h" |
| 23 #endif | 24 #endif |
| 24 | 25 |
| 25 namespace crypto { | 26 namespace crypto { |
| 26 | 27 |
| 27 // The SignatureVerifier class verifies a signature using a bare public key | 28 // The SignatureVerifier class verifies a signature using a bare public key |
| 28 // (as opposed to a certificate). | 29 // (as opposed to a certificate). |
| 29 class SignatureVerifier { | 30 class CRYPTO_API SignatureVerifier { |
| 30 public: | 31 public: |
| 31 SignatureVerifier(); | 32 SignatureVerifier(); |
| 32 ~SignatureVerifier(); | 33 ~SignatureVerifier(); |
| 33 | 34 |
| 34 // Streaming interface: | 35 // Streaming interface: |
| 35 | 36 |
| 36 // Initiates a signature verification operation. This should be followed | 37 // Initiates a signature verification operation. This should be followed |
| 37 // by one or more VerifyUpdate calls and a VerifyFinal call. | 38 // by one or more VerifyUpdate calls and a VerifyFinal call. |
| 38 // | 39 // |
| 39 // The signature algorithm is specified as a DER encoded ASN.1 | 40 // The signature algorithm is specified as a DER encoded ASN.1 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 100 |
| 100 ScopedHCRYPTHASH hash_object_; | 101 ScopedHCRYPTHASH hash_object_; |
| 101 | 102 |
| 102 ScopedHCRYPTKEY public_key_; | 103 ScopedHCRYPTKEY public_key_; |
| 103 #endif | 104 #endif |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 } // namespace crypto | 107 } // namespace crypto |
| 107 | 108 |
| 108 #endif // CRYPTO_SIGNATURE_VERIFIER_H_ | 109 #endif // CRYPTO_SIGNATURE_VERIFIER_H_ |
| OLD | NEW |