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

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

Issue 197223007: [webcrypto] Remove support for null import algorithms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_STATUS_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_
6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_
7 7
8 #include <string> 8 #include <string>
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 static Status ErrorJwkExtInconsistent(); 70 static Status ErrorJwkExtInconsistent();
71 71
72 // The "alg" parameter could not be converted to an equivalent 72 // The "alg" parameter could not be converted to an equivalent
73 // WebCryptoAlgorithm. Either it was malformed or unrecognized. 73 // WebCryptoAlgorithm. Either it was malformed or unrecognized.
74 static Status ErrorJwkUnrecognizedAlgorithm(); 74 static Status ErrorJwkUnrecognizedAlgorithm();
75 75
76 // The "alg" parameter is incompatible with the (optional) Algorithm 76 // The "alg" parameter is incompatible with the (optional) Algorithm
77 // specified by the Web Crypto import operation. 77 // specified by the Web Crypto import operation.
78 static Status ErrorJwkAlgorithmInconsistent(); 78 static Status ErrorJwkAlgorithmInconsistent();
79 79
80 // The "alg" parameter was not provided, however neither was an algorithm
81 // provided by the Web Crypto import operation.
82 static Status ErrorJwkAlgorithmMissing();
83
84 // The "use" parameter was specified, however it couldn't be converted to an 80 // The "use" parameter was specified, however it couldn't be converted to an
85 // equivalent Web Crypto usage. 81 // equivalent Web Crypto usage.
86 static Status ErrorJwkUnrecognizedUse(); 82 static Status ErrorJwkUnrecognizedUse();
87 83
88 // The "key_ops" parameter was specified, however one of the values in the 84 // The "key_ops" parameter was specified, however one of the values in the
89 // array couldn't be converted to an equivalent Web Crypto usage. 85 // array couldn't be converted to an equivalent Web Crypto usage.
90 static Status ErrorJwkUnrecognizedKeyop(); 86 static Status ErrorJwkUnrecognizedKeyop();
91 87
92 // The "use" parameter was specified, however it is incompatible with that 88 // The "use" parameter was specified, however it is incompatible with that
93 // specified by the Web Crypto import operation. 89 // specified by the Web Crypto import operation.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 156
161 // The input data given to an AES-KW encrypt/decrypt operation was not a 157 // The input data given to an AES-KW encrypt/decrypt operation was not a
162 // multiple of 8 bytes, as required by RFC 3394. 158 // multiple of 8 bytes, as required by RFC 3394.
163 static Status ErrorInvalidAesKwDataLength(); 159 static Status ErrorInvalidAesKwDataLength();
164 160
165 // The "publicExponent" used to generate a key was invalid: either no bytes 161 // The "publicExponent" used to generate a key was invalid: either no bytes
166 // were specified, or the number was too large to fit into an "unsigned long" 162 // were specified, or the number was too large to fit into an "unsigned long"
167 // (implemention limitation), or the exponent was zero. 163 // (implemention limitation), or the exponent was zero.
168 static Status ErrorGenerateKeyPublicExponent(); 164 static Status ErrorGenerateKeyPublicExponent();
169 165
170 // The algorithm was null when importing a raw-formatted key. In this case it
171 // is required.
172 static Status ErrorMissingAlgorithmImportRawKey();
173
174 // The algorithm was null when unwrapping a raw-formatted key. In this case it
175 // is required.
176 static Status ErrorMissingAlgorithmUnwrapRawKey();
177
178 // The modulus bytes were empty when importing an RSA public key. 166 // The modulus bytes were empty when importing an RSA public key.
179 static Status ErrorImportRsaEmptyModulus(); 167 static Status ErrorImportRsaEmptyModulus();
180 168
181 // The the modulus length was zero bits when generating an RSA public key. 169 // The the modulus length was zero bits when generating an RSA public key.
182 static Status ErrorGenerateRsaZeroModulus(); 170 static Status ErrorGenerateRsaZeroModulus();
183 171
184 // The exponent bytes were empty when importing an RSA public key. 172 // The exponent bytes were empty when importing an RSA public key.
185 static Status ErrorImportRsaEmptyExponent(); 173 static Status ErrorImportRsaEmptyExponent();
186 174
187 // An unextractable key was used by an operation which exports the key data. 175 // An unextractable key was used by an operation which exports the key data.
(...skipping 14 matching lines...) Expand all
202 190
203 Type type_; 191 Type type_;
204 std::string error_details_; 192 std::string error_details_;
205 }; 193 };
206 194
207 } // namespace webcrypto 195 } // namespace webcrypto
208 196
209 } // namespace content 197 } // namespace content
210 198
211 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 199 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698