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

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

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 #include "content/child/webcrypto/status.h" 5 #include "content/child/webcrypto/status.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 namespace webcrypto { 9 namespace webcrypto {
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 Status Status::ErrorInvalidAesKwDataLength() { 165 Status Status::ErrorInvalidAesKwDataLength() {
166 return Status(blink::WebCryptoErrorTypeData, 166 return Status(blink::WebCryptoErrorTypeData,
167 "The AES-KW input data length is invalid: not a multiple of 8 " 167 "The AES-KW input data length is invalid: not a multiple of 8 "
168 "bytes"); 168 "bytes");
169 } 169 }
170 170
171 Status Status::ErrorGenerateKeyPublicExponent() { 171 Status Status::ErrorGenerateKeyPublicExponent() {
172 return Status(blink::WebCryptoErrorTypeData, 172 return Status(blink::WebCryptoErrorTypeData,
173 "The \"publicExponent\" is either empty, zero, or too large"); 173 "The \"publicExponent\" must be either 3 or 65537");
174 } 174 }
175 175
176 Status Status::ErrorImportRsaEmptyModulus() { 176 Status Status::ErrorImportRsaEmptyModulus() {
177 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty"); 177 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty");
178 } 178 }
179 179
180 Status Status::ErrorGenerateRsaZeroModulus() { 180 Status Status::ErrorGenerateRsaZeroModulus() {
181 return Status(blink::WebCryptoErrorTypeData, 181 return Status(blink::WebCryptoErrorTypeData,
182 "The modulus bit length cannot be zero"); 182 "The modulus bit length cannot be zero");
183 } 183 }
(...skipping 25 matching lines...) Expand all
209 error_type_(error_type), 209 error_type_(error_type),
210 error_details_(error_details_utf8) { 210 error_details_(error_details_utf8) {
211 } 211 }
212 212
213 Status::Status(Type type) : type_(type) { 213 Status::Status(Type type) : type_(type) {
214 } 214 }
215 215
216 } // namespace webcrypto 216 } // namespace webcrypto
217 217
218 } // namespace content 218 } // namespace content
OLDNEW
« content/child/webcrypto/shared_crypto.cc ('K') | « content/child/webcrypto/status.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698