| OLD | NEW |
| 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 "net/ssl/openssl_platform_key.h" | 5 #include "net/ssl/openssl_platform_key.h" |
| 6 | 6 |
| 7 #include <openssl/err.h> | 7 #include <openssl/err.h> |
| 8 #include <openssl/evp.h> | 8 #include <openssl/evp.h> |
| 9 #include <openssl/rsa.h> | 9 #include <openssl/rsa.h> |
| 10 | 10 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 NULL /* init */, | 308 NULL /* init */, |
| 309 NULL /* finish */, | 309 NULL /* finish */, |
| 310 RsaMethodSize, | 310 RsaMethodSize, |
| 311 NULL /* sign */, | 311 NULL /* sign */, |
| 312 NULL /* verify */, | 312 NULL /* verify */, |
| 313 RsaMethodEncrypt, | 313 RsaMethodEncrypt, |
| 314 RsaMethodSignRaw, | 314 RsaMethodSignRaw, |
| 315 RsaMethodDecrypt, | 315 RsaMethodDecrypt, |
| 316 RsaMethodVerifyRaw, | 316 RsaMethodVerifyRaw, |
| 317 NULL /* private_transform */, |
| 317 NULL /* mod_exp */, | 318 NULL /* mod_exp */, |
| 318 NULL /* bn_mod_exp */, | 319 NULL /* bn_mod_exp */, |
| 319 RSA_FLAG_OPAQUE, | 320 RSA_FLAG_OPAQUE, |
| 320 NULL /* keygen */, | 321 NULL /* keygen */, |
| 321 }; | 322 }; |
| 322 | 323 |
| 323 crypto::ScopedEVP_PKEY CreateRSAWrapper(SecKeyRef key, | 324 crypto::ScopedEVP_PKEY CreateRSAWrapper(SecKeyRef key, |
| 324 const CSSM_KEY* cssm_key) { | 325 const CSSM_KEY* cssm_key) { |
| 325 crypto::ScopedRSA rsa( | 326 crypto::ScopedRSA rsa( |
| 326 RSA_new_method(global_boringssl_engine.Get().engine())); | 327 RSA_new_method(global_boringssl_engine.Get().engine())); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 base::ScopedCFTypeRef<SecKeyRef> private_key( | 455 base::ScopedCFTypeRef<SecKeyRef> private_key( |
| 455 FetchSecKeyRefForCertificate(certificate)); | 456 FetchSecKeyRefForCertificate(certificate)); |
| 456 if (!private_key) | 457 if (!private_key) |
| 457 return crypto::ScopedEVP_PKEY(); | 458 return crypto::ScopedEVP_PKEY(); |
| 458 | 459 |
| 459 // Create an EVP_PKEY wrapper. | 460 // Create an EVP_PKEY wrapper. |
| 460 return CreatePkeyWrapper(private_key.get()); | 461 return CreatePkeyWrapper(private_key.get()); |
| 461 } | 462 } |
| 462 | 463 |
| 463 } // namespace net | 464 } // namespace net |
| OLD | NEW |