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

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

Issue 287133004: [webcrypto] Add JWK import/export of RSA private keys (NSS). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment typeo 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
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/status.cc » ('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 #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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 static Status ErrorJwkUseInconsistent(); 95 static Status ErrorJwkUseInconsistent();
96 96
97 // The "key_ops" parameter was specified, however it is incompatible with that 97 // The "key_ops" parameter was specified, however it is incompatible with that
98 // specified by the Web Crypto import operation. 98 // specified by the Web Crypto import operation.
99 static Status ErrorJwkKeyopsInconsistent(); 99 static Status ErrorJwkKeyopsInconsistent();
100 100
101 // Both the "key_ops" and the "use" parameters were specified, however they 101 // Both the "key_ops" and the "use" parameters were specified, however they
102 // are incompatible with each other. 102 // are incompatible with each other.
103 static Status ErrorJwkUseAndKeyopsInconsistent(); 103 static Status ErrorJwkUseAndKeyopsInconsistent();
104 104
105 // TODO(eroman): Private key import through JWK is not yet supported.
106 static Status ErrorJwkRsaPrivateKeyUnsupported();
107
108 // The "kty" parameter was given and was a string, however it was 105 // The "kty" parameter was given and was a string, however it was
109 // unrecognized. 106 // unrecognized.
110 static Status ErrorJwkUnrecognizedKty(); 107 static Status ErrorJwkUnrecognizedKty();
111 108
112 // The amount of key data provided was incompatible with the selected 109 // The amount of key data provided was incompatible with the selected
113 // algorithm. For instance if the algorith name was A128CBC then EXACTLY 110 // algorithm. For instance if the algorith name was A128CBC then EXACTLY
114 // 128-bits of key data must have been provided. If 192-bits of key data were 111 // 128-bits of key data must have been provided. If 192-bits of key data were
115 // given that is an error. 112 // given that is an error.
116 static Status ErrorJwkIncorrectKeyLength(); 113 static Status ErrorJwkIncorrectKeyLength();
117 114
115 // The JWK was for an RSA private key but only partially provided the optional
116 // parameters (p, q, dq, dq, qi).
117 static Status ErrorJwkIncompleteOptionalRsaPrivateKey();
118
118 // ------------------------------------ 119 // ------------------------------------
119 // Other errors 120 // Other errors
120 // ------------------------------------ 121 // ------------------------------------
121 122
122 // No key data was provided when importing an spki, pkcs8, or jwk formatted 123 // No key data was provided when importing an spki, pkcs8, or jwk formatted
123 // key. This does not apply to raw format, since it is possible to have empty 124 // key. This does not apply to raw format, since it is possible to have empty
124 // key data there. 125 // key data there.
125 static Status ErrorImportEmptyKeyData(); 126 static Status ErrorImportEmptyKeyData();
126 127
127 // The key data buffer provided for importKey() is an incorrect length for 128 // The key data buffer provided for importKey() is an incorrect length for
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Type type_; 202 Type type_;
202 blink::WebCryptoErrorType error_type_; 203 blink::WebCryptoErrorType error_type_;
203 std::string error_details_; 204 std::string error_details_;
204 }; 205 };
205 206
206 } // namespace webcrypto 207 } // namespace webcrypto
207 208
208 } // namespace content 209 } // namespace content
209 210
210 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 211 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698