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

Side by Side Diff: content/child/webcrypto/shared_crypto.h

Issue 282133002: [webcryto] Validate key usages during key creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on master Created 6 years, 7 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 | Annotate | Revision Log
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_SHARED_CRYPTO_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_
6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 Status ToPlatformSymKey(const blink::WebCryptoKey& key, platform::SymKey** out); 169 Status ToPlatformSymKey(const blink::WebCryptoKey& key, platform::SymKey** out);
170 170
171 Status ToPlatformPublicKey(const blink::WebCryptoKey& key, 171 Status ToPlatformPublicKey(const blink::WebCryptoKey& key,
172 platform::PublicKey** out); 172 platform::PublicKey** out);
173 173
174 Status ToPlatformPrivateKey(const blink::WebCryptoKey& key, 174 Status ToPlatformPrivateKey(const blink::WebCryptoKey& key,
175 platform::PrivateKey** out); 175 platform::PrivateKey** out);
176 176
177 // Returns Staus::Success() if |usages| is valid for |key_type| and |algorithm|.
178 // Otherwise returns a failure
179 Status CheckKeyUsages(blink::WebCryptoAlgorithmId algorithm,
180 blink::WebCryptoKeyType key_type,
181 blink::WebCryptoKeyUsageMask usages);
182
177 } // namespace webcrypto 183 } // namespace webcrypto
178 184
179 } // namespace content 185 } // namespace content
180 186
181 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ 187 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/platform_crypto_openssl.cc ('k') | content/child/webcrypto/shared_crypto.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698