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

Side by Side Diff: content/child/webcrypto/openssl/rsa_key_openssl.h

Issue 671663002: Standardize usage of virtual/override/final in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_KEY_OPENSSL_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_KEY_OPENSSL_H_
6 #define CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_KEY_OPENSSL_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_KEY_OPENSSL_H_
7 7
8 #include "content/child/webcrypto/algorithm_implementation.h" 8 #include "content/child/webcrypto/algorithm_implementation.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 20 matching lines...) Expand all
31 // that valid key usages are allowed. 31 // that valid key usages are allowed.
32 RsaHashedAlgorithm(blink::WebCryptoKeyUsageMask all_public_key_usages, 32 RsaHashedAlgorithm(blink::WebCryptoKeyUsageMask all_public_key_usages,
33 blink::WebCryptoKeyUsageMask all_private_key_usages) 33 blink::WebCryptoKeyUsageMask all_private_key_usages)
34 : all_public_key_usages_(all_public_key_usages), 34 : all_public_key_usages_(all_public_key_usages),
35 all_private_key_usages_(all_private_key_usages) {} 35 all_private_key_usages_(all_private_key_usages) {}
36 36
37 // For instance "RSA-OAEP-256". 37 // For instance "RSA-OAEP-256".
38 virtual const char* GetJwkAlgorithm( 38 virtual const char* GetJwkAlgorithm(
39 const blink::WebCryptoAlgorithmId hash) const = 0; 39 const blink::WebCryptoAlgorithmId hash) const = 0;
40 40
41 virtual Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm, 41 Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
42 bool extractable, 42 bool extractable,
43 blink::WebCryptoKeyUsageMask usage_mask, 43 blink::WebCryptoKeyUsageMask usage_mask,
44 GenerateKeyResult* result) const override; 44 GenerateKeyResult* result) const override;
45 45
46 virtual Status VerifyKeyUsagesBeforeImportKey( 46 Status VerifyKeyUsagesBeforeImportKey(
47 blink::WebCryptoKeyFormat format, 47 blink::WebCryptoKeyFormat format,
48 blink::WebCryptoKeyUsageMask usage_mask) const override; 48 blink::WebCryptoKeyUsageMask usage_mask) const override;
49 49
50 virtual Status ImportKeyPkcs8(const CryptoData& key_data, 50 Status ImportKeyPkcs8(const CryptoData& key_data,
51 const blink::WebCryptoAlgorithm& algorithm, 51 const blink::WebCryptoAlgorithm& algorithm,
52 bool extractable, 52 bool extractable,
53 blink::WebCryptoKeyUsageMask usage_mask, 53 blink::WebCryptoKeyUsageMask usage_mask,
54 blink::WebCryptoKey* key) const override; 54 blink::WebCryptoKey* key) const override;
55 55
56 virtual Status ImportKeySpki(const CryptoData& key_data, 56 Status ImportKeySpki(const CryptoData& key_data,
57 const blink::WebCryptoAlgorithm& algorithm, 57 const blink::WebCryptoAlgorithm& algorithm,
58 bool extractable, 58 bool extractable,
59 blink::WebCryptoKeyUsageMask usage_mask, 59 blink::WebCryptoKeyUsageMask usage_mask,
60 blink::WebCryptoKey* key) const override; 60 blink::WebCryptoKey* key) const override;
61 61
62 virtual Status ImportKeyJwk(const CryptoData& key_data, 62 Status ImportKeyJwk(const CryptoData& key_data,
63 const blink::WebCryptoAlgorithm& algorithm, 63 const blink::WebCryptoAlgorithm& algorithm,
64 bool extractable, 64 bool extractable,
65 blink::WebCryptoKeyUsageMask usage_mask, 65 blink::WebCryptoKeyUsageMask usage_mask,
66 blink::WebCryptoKey* key) const override; 66 blink::WebCryptoKey* key) const override;
67 67
68 virtual Status ExportKeyPkcs8(const blink::WebCryptoKey& key, 68 Status ExportKeyPkcs8(const blink::WebCryptoKey& key,
69 std::vector<uint8_t>* buffer) const override; 69 std::vector<uint8_t>* buffer) const override;
70 70
71 virtual Status ExportKeySpki(const blink::WebCryptoKey& key, 71 Status ExportKeySpki(const blink::WebCryptoKey& key,
72 std::vector<uint8_t>* buffer) const override; 72 std::vector<uint8_t>* buffer) const override;
73 73
74 virtual Status ExportKeyJwk(const blink::WebCryptoKey& key, 74 Status ExportKeyJwk(const blink::WebCryptoKey& key,
75 std::vector<uint8_t>* buffer) const override; 75 std::vector<uint8_t>* buffer) const override;
76 76
77 private: 77 private:
78 blink::WebCryptoKeyUsageMask all_public_key_usages_; 78 blink::WebCryptoKeyUsageMask all_public_key_usages_;
79 blink::WebCryptoKeyUsageMask all_private_key_usages_; 79 blink::WebCryptoKeyUsageMask all_private_key_usages_;
80 }; 80 };
81 81
82 } // namespace webcrypto 82 } // namespace webcrypto
83 83
84 } // namespace content 84 } // namespace content
85 85
86 #endif // CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_KEY_OPENSSL_H_ 86 #endif // CONTENT_CHILD_WEBCRYPTO_OPENSSL_RSA_KEY_OPENSSL_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/key_openssl.h ('k') | content/child/webcrypto/openssl/rsa_oaep_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698