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

Side by Side Diff: content/renderer/webcrypto/webcrypto_impl_openssl.cc

Issue 34583010: [webcrypto] Add RSA key generation using NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for eroman Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/webcrypto/webcrypto_impl.h" 5 #include "content/renderer/webcrypto/webcrypto_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include <openssl/aes.h> 8 #include <openssl/aes.h>
9 #include <openssl/evp.h> 9 #include <openssl/evp.h>
10 #include <openssl/hmac.h> 10 #include <openssl/hmac.h>
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 bool WebCryptoImpl::GenerateKeyInternal( 228 bool WebCryptoImpl::GenerateKeyInternal(
229 const WebKit::WebCryptoAlgorithm& algorithm, 229 const WebKit::WebCryptoAlgorithm& algorithm,
230 scoped_ptr<WebKit::WebCryptoKeyHandle>* key, 230 scoped_ptr<WebKit::WebCryptoKeyHandle>* key,
231 WebKit::WebCryptoKeyType* type) { 231 WebKit::WebCryptoKeyType* type) {
232 // TODO(ellyjones): Placeholder for OpenSSL implementation. 232 // TODO(ellyjones): Placeholder for OpenSSL implementation.
233 // Issue http://crbug.com/267888. 233 // Issue http://crbug.com/267888.
234 return false; 234 return false;
235 } 235 }
236 236
237 bool WebCryptoImpl::GenerateKeyPairInternal(
238 const WebKit::WebCryptoAlgorithm& algorithm,
239 scoped_ptr<WebKit::WebCryptoKeyHandle>* public_key,
240 scoped_ptr<WebKit::WebCryptoKeyHandle>* private_key) {
241 // TODO(padolph): Placeholder for OpenSSL implementation.
242 // Issue http://crbug.com/267888.
243 return false;
244 }
245
237 bool WebCryptoImpl::ImportKeyInternal( 246 bool WebCryptoImpl::ImportKeyInternal(
238 WebKit::WebCryptoKeyFormat format, 247 WebKit::WebCryptoKeyFormat format,
239 const unsigned char* key_data, 248 const unsigned char* key_data,
240 unsigned key_data_size, 249 unsigned key_data_size,
241 const WebKit::WebCryptoAlgorithm& algorithm, 250 const WebKit::WebCryptoAlgorithm& algorithm,
242 WebKit::WebCryptoKeyUsageMask /*usage_mask*/, 251 WebKit::WebCryptoKeyUsageMask /*usage_mask*/,
243 scoped_ptr<WebKit::WebCryptoKeyHandle>* handle, 252 scoped_ptr<WebKit::WebCryptoKeyHandle>* handle,
244 WebKit::WebCryptoKeyType* type) { 253 WebKit::WebCryptoKeyType* type) {
245 254
246 // TODO(padolph): Support all relevant alg types and then remove this gate. 255 // TODO(padolph): Support all relevant alg types and then remove this gate.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 408
400 break; 409 break;
401 } 410 }
402 default: 411 default:
403 return false; 412 return false;
404 } 413 }
405 return true; 414 return true;
406 } 415 }
407 416
408 } // namespace content 417 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698