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

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

Issue 401233004: Refactor RSA key generation for WebCrypto's NSS implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 years, 5 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/status.h ('k') | content/child/webcrypto/webcrypto_util.h » ('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 #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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 Status Status::ErrorGenerateKeyPublicExponent() { 184 Status Status::ErrorGenerateKeyPublicExponent() {
185 return Status(blink::WebCryptoErrorTypeData, 185 return Status(blink::WebCryptoErrorTypeData,
186 "The \"publicExponent\" must be either 3 or 65537"); 186 "The \"publicExponent\" must be either 3 or 65537");
187 } 187 }
188 188
189 Status Status::ErrorImportRsaEmptyModulus() { 189 Status Status::ErrorImportRsaEmptyModulus() {
190 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty"); 190 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty");
191 } 191 }
192 192
193 Status Status::ErrorGenerateRsaZeroModulus() { 193 Status Status::ErrorGenerateRsaUnsupportedModulus() {
194 return Status(blink::WebCryptoErrorTypeData, 194 return Status(blink::WebCryptoErrorTypeNotSupported,
195 "The modulus bit length cannot be zero"); 195 "The modulus length must be a multiple of 8 bits and >= 256 "
196 "and <= 16384");
196 } 197 }
197 198
198 Status Status::ErrorImportRsaEmptyExponent() { 199 Status Status::ErrorImportRsaEmptyExponent() {
199 return Status(blink::WebCryptoErrorTypeData, 200 return Status(blink::WebCryptoErrorTypeData,
200 "No bytes for the exponent were provided"); 201 "No bytes for the exponent were provided");
201 } 202 }
202 203
203 Status Status::ErrorKeyNotExtractable() { 204 Status Status::ErrorKeyNotExtractable() {
204 return Status(blink::WebCryptoErrorTypeInvalidAccess, 205 return Status(blink::WebCryptoErrorTypeInvalidAccess,
205 "They key is not extractable"); 206 "They key is not extractable");
(...skipping 16 matching lines...) Expand all
222 error_type_(error_type), 223 error_type_(error_type),
223 error_details_(error_details_utf8) { 224 error_details_(error_details_utf8) {
224 } 225 }
225 226
226 Status::Status(Type type) : type_(type) { 227 Status::Status(Type type) : type_(type) {
227 } 228 }
228 229
229 } // namespace webcrypto 230 } // namespace webcrypto
230 231
231 } // namespace content 232 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/webcrypto_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698