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

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

Issue 329673002: [webcrypto] Restrict public exponent for RSA key generation to 3 or 65537. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_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 #include "third_party/WebKit/public/platform/WebCrypto.h" 10 #include "third_party/WebKit/public/platform/WebCrypto.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 static Status ErrorUnexpected(); 154 static Status ErrorUnexpected();
155 155
156 // The authentication tag length specified for AES-GCM encrypt/decrypt was 156 // The authentication tag length specified for AES-GCM encrypt/decrypt was
157 // not 32, 64, 96, 104, 112, 120, or 128. 157 // not 32, 64, 96, 104, 112, 120, or 128.
158 static Status ErrorInvalidAesGcmTagLength(); 158 static Status ErrorInvalidAesGcmTagLength();
159 159
160 // The input data given to an AES-KW encrypt/decrypt operation was not a 160 // The input data given to an AES-KW encrypt/decrypt operation was not a
161 // multiple of 8 bytes, as required by RFC 3394. 161 // multiple of 8 bytes, as required by RFC 3394.
162 static Status ErrorInvalidAesKwDataLength(); 162 static Status ErrorInvalidAesKwDataLength();
163 163
164 // The "publicExponent" used to generate a key was invalid: either no bytes 164 // The "publicExponent" used to generate a key was invalid or unsupported.
165 // were specified, or the number was too large to fit into an "unsigned long" 165 // Only values of 3 and 65537 are allowed.
166 // (implemention limitation), or the exponent was zero.
167 static Status ErrorGenerateKeyPublicExponent(); 166 static Status ErrorGenerateKeyPublicExponent();
168 167
169 // The modulus bytes were empty when importing an RSA public key. 168 // The modulus bytes were empty when importing an RSA public key.
170 static Status ErrorImportRsaEmptyModulus(); 169 static Status ErrorImportRsaEmptyModulus();
171 170
172 // The the modulus length was zero bits when generating an RSA public key. 171 // The the modulus length was zero bits when generating an RSA public key.
173 static Status ErrorGenerateRsaZeroModulus(); 172 static Status ErrorGenerateRsaZeroModulus();
174 173
175 // The exponent bytes were empty when importing an RSA public key. 174 // The exponent bytes were empty when importing an RSA public key.
176 static Status ErrorImportRsaEmptyExponent(); 175 static Status ErrorImportRsaEmptyExponent();
(...skipping 23 matching lines...) Expand all
200 Type type_; 199 Type type_;
201 blink::WebCryptoErrorType error_type_; 200 blink::WebCryptoErrorType error_type_;
202 std::string error_details_; 201 std::string error_details_;
203 }; 202 };
204 203
205 } // namespace webcrypto 204 } // namespace webcrypto
206 205
207 } // namespace content 206 } // namespace content
208 207
209 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 208 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698