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

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

Issue 287133004: [webcrypto] Add JWK import/export of RSA private keys (NSS). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't distinguish between unspecified optional params and empty params Created 6 years, 7 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 "specified by the Web Crypto call. The JWK usage must be a " 92 "specified by the Web Crypto call. The JWK usage must be a "
93 "superset of those requested"); 93 "superset of those requested");
94 } 94 }
95 95
96 Status Status::ErrorJwkUseAndKeyopsInconsistent() { 96 Status Status::ErrorJwkUseAndKeyopsInconsistent() {
97 return Status(blink::WebCryptoErrorTypeData, 97 return Status(blink::WebCryptoErrorTypeData,
98 "The JWK \"use\" and \"key_ops\" properties were both found " 98 "The JWK \"use\" and \"key_ops\" properties were both found "
99 "but are inconsistent with each other."); 99 "but are inconsistent with each other.");
100 } 100 }
101 101
102 Status Status::ErrorJwkRsaPrivateKeyUnsupported() {
103 return Status(blink::WebCryptoErrorTypeNotSupported,
104 "JWK RSA key contained \"d\" property: Private key import is "
105 "not yet supported");
106 }
107
108 Status Status::ErrorJwkUnrecognizedKty() { 102 Status Status::ErrorJwkUnrecognizedKty() {
109 return Status(blink::WebCryptoErrorTypeData, 103 return Status(blink::WebCryptoErrorTypeData,
110 "The JWK \"kty\" property was unrecognized"); 104 "The JWK \"kty\" property was unrecognized");
111 } 105 }
112 106
113 Status Status::ErrorJwkIncorrectKeyLength() { 107 Status Status::ErrorJwkIncorrectKeyLength() {
114 return Status(blink::WebCryptoErrorTypeData, 108 return Status(blink::WebCryptoErrorTypeData,
115 "The JWK \"k\" property did not include the right length " 109 "The JWK \"k\" property did not include the right length "
116 "of key data for the given algorithm."); 110 "of key data for the given algorithm.");
117 } 111 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 error_type_(error_type), 198 error_type_(error_type),
205 error_details_(error_details_utf8) { 199 error_details_(error_details_utf8) {
206 } 200 }
207 201
208 Status::Status(Type type) : type_(type) { 202 Status::Status(Type type) : type_(type) {
209 } 203 }
210 204
211 } // namespace webcrypto 205 } // namespace webcrypto
212 206
213 } // namespace content 207 } // namespace content
OLDNEW
« content/child/webcrypto/shared_crypto_unittest.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