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

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

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/status.h ('k') | content/child/webcrypto/webcrypto_impl.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Status Status::ErrorJwkUnrecognizedAlgorithm() { 50 Status Status::ErrorJwkUnrecognizedAlgorithm() {
51 return Status("The JWK \"alg\" property was not recognized"); 51 return Status("The JWK \"alg\" property was not recognized");
52 } 52 }
53 53
54 Status Status::ErrorJwkAlgorithmInconsistent() { 54 Status Status::ErrorJwkAlgorithmInconsistent() {
55 return Status( 55 return Status(
56 "The JWK \"alg\" property was inconsistent with that specified " 56 "The JWK \"alg\" property was inconsistent with that specified "
57 "by the Web Crypto call"); 57 "by the Web Crypto call");
58 } 58 }
59 59
60 Status Status::ErrorJwkAlgorithmMissing() {
61 return Status(
62 "The JWK optional \"alg\" property is missing or not a string, "
63 "and one wasn't specified by the Web Crypto call");
64 }
65
66 Status Status::ErrorJwkUnrecognizedUse() { 60 Status Status::ErrorJwkUnrecognizedUse() {
67 return Status("The JWK \"use\" property could not be parsed"); 61 return Status("The JWK \"use\" property could not be parsed");
68 } 62 }
69 63
70 Status Status::ErrorJwkUnrecognizedKeyop() { 64 Status Status::ErrorJwkUnrecognizedKeyop() {
71 return Status("The JWK \"key_ops\" property could not be parsed"); 65 return Status("The JWK \"key_ops\" property could not be parsed");
72 } 66 }
73 67
74 Status Status::ErrorJwkUseInconsistent() { 68 Status Status::ErrorJwkUseInconsistent() {
75 return Status( 69 return Status(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 Status Status::ErrorInvalidAesKwDataLength() { 138 Status Status::ErrorInvalidAesKwDataLength() {
145 return Status( 139 return Status(
146 "The AES-KW input data length is invalid: not a multiple of 8 " 140 "The AES-KW input data length is invalid: not a multiple of 8 "
147 "bytes"); 141 "bytes");
148 } 142 }
149 143
150 Status Status::ErrorGenerateKeyPublicExponent() { 144 Status Status::ErrorGenerateKeyPublicExponent() {
151 return Status("The \"publicExponent\" is either empty, zero, or too large"); 145 return Status("The \"publicExponent\" is either empty, zero, or too large");
152 } 146 }
153 147
154 Status Status::ErrorMissingAlgorithmImportRawKey() {
155 return Status(
156 "The key's algorithm must be specified when importing "
157 "raw-formatted key.");
158 }
159
160 Status Status::ErrorMissingAlgorithmUnwrapRawKey() {
161 return Status(
162 "The key's algorithm must be specified when unwrapping a "
163 "raw-formatted key.");
164 }
165
166 Status Status::ErrorImportRsaEmptyModulus() { 148 Status Status::ErrorImportRsaEmptyModulus() {
167 return Status("The modulus is empty"); 149 return Status("The modulus is empty");
168 } 150 }
169 151
170 Status Status::ErrorGenerateRsaZeroModulus() { 152 Status Status::ErrorGenerateRsaZeroModulus() {
171 return Status("The modulus bit length cannot be zero"); 153 return Status("The modulus bit length cannot be zero");
172 } 154 }
173 155
174 Status Status::ErrorImportRsaEmptyExponent() { 156 Status Status::ErrorImportRsaEmptyExponent() {
175 return Status("No bytes for the exponent were provided"); 157 return Status("No bytes for the exponent were provided");
(...skipping 11 matching lines...) Expand all
187 169
188 Status::Status(const std::string& error_details_utf8) 170 Status::Status(const std::string& error_details_utf8)
189 : type_(TYPE_ERROR), error_details_(error_details_utf8) {} 171 : type_(TYPE_ERROR), error_details_(error_details_utf8) {}
190 172
191 Status::Status(Type type) : type_(type) {} 173 Status::Status(Type type) : type_(type) {}
192 174
193 175
194 } // namespace webcrypto 176 } // namespace webcrypto
195 177
196 } // namespace content 178 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/webcrypto_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698