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

Side by Side Diff: content/child/webcrypto/nss/rsa_ssa_nss.cc

Issue 404733005: Replace uses of uint8 with uint8_t. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master 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/nss/rsa_oaep_nss.cc ('k') | content/child/webcrypto/nss/sha_nss.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 #include <cryptohi.h> 5 #include <cryptohi.h>
6 6
7 #include "content/child/webcrypto/crypto_data.h" 7 #include "content/child/webcrypto/crypto_data.h"
8 #include "content/child/webcrypto/nss/key_nss.h" 8 #include "content/child/webcrypto/nss/key_nss.h"
9 #include "content/child/webcrypto/nss/rsa_key_nss.h" 9 #include "content/child/webcrypto/nss/rsa_key_nss.h"
10 #include "content/child/webcrypto/nss/util_nss.h" 10 #include "content/child/webcrypto/nss/util_nss.h"
(...skipping 26 matching lines...) Expand all
37 case blink::WebCryptoAlgorithmIdSha512: 37 case blink::WebCryptoAlgorithmIdSha512:
38 return "RS512"; 38 return "RS512";
39 default: 39 default:
40 return NULL; 40 return NULL;
41 } 41 }
42 } 42 }
43 43
44 virtual Status Sign(const blink::WebCryptoAlgorithm& algorithm, 44 virtual Status Sign(const blink::WebCryptoAlgorithm& algorithm,
45 const blink::WebCryptoKey& key, 45 const blink::WebCryptoKey& key,
46 const CryptoData& data, 46 const CryptoData& data,
47 std::vector<uint8>* buffer) const OVERRIDE { 47 std::vector<uint8_t>* buffer) const OVERRIDE {
48 if (key.type() != blink::WebCryptoKeyTypePrivate) 48 if (key.type() != blink::WebCryptoKeyTypePrivate)
49 return Status::ErrorUnexpectedKeyType(); 49 return Status::ErrorUnexpectedKeyType();
50 50
51 SECKEYPrivateKey* private_key = PrivateKeyNss::Cast(key)->key(); 51 SECKEYPrivateKey* private_key = PrivateKeyNss::Cast(key)->key();
52 52
53 const blink::WebCryptoAlgorithm& hash = 53 const blink::WebCryptoAlgorithm& hash =
54 key.algorithm().rsaHashedParams()->hash(); 54 key.algorithm().rsaHashedParams()->hash();
55 55
56 // Pick the NSS signing algorithm by combining RSA-SSA (RSA PKCS1) and the 56 // Pick the NSS signing algorithm by combining RSA-SSA (RSA PKCS1) and the
57 // inner hash of the input Web Crypto algorithm. 57 // inner hash of the input Web Crypto algorithm.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 } // namespace 136 } // namespace
137 137
138 AlgorithmImplementation* CreatePlatformRsaSsaImplementation() { 138 AlgorithmImplementation* CreatePlatformRsaSsaImplementation() {
139 return new RsaSsaImplementation; 139 return new RsaSsaImplementation;
140 } 140 }
141 141
142 } // namespace webcrypto 142 } // namespace webcrypto
143 143
144 } // namespace content 144 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/nss/rsa_oaep_nss.cc ('k') | content/child/webcrypto/nss/sha_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698