| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "net/android/keystore_openssl.h" | 5 #include "net/android/keystore_openssl.h" |
| 6 | 6 |
| 7 #include <jni.h> | 7 #include <jni.h> |
| 8 #include <openssl/bn.h> | 8 #include <openssl/bn.h> |
| 9 #include <openssl/dsa.h> | 9 #include <openssl/dsa.h> |
| 10 #include <openssl/ec.h> | 10 #include <openssl/ec.h> |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 NULL /* init */, | 297 NULL /* init */, |
| 298 NULL /* finish */, | 298 NULL /* finish */, |
| 299 RsaMethodSize, | 299 RsaMethodSize, |
| 300 NULL /* sign */, | 300 NULL /* sign */, |
| 301 NULL /* verify */, | 301 NULL /* verify */, |
| 302 RsaMethodEncrypt, | 302 RsaMethodEncrypt, |
| 303 RsaMethodSignRaw, | 303 RsaMethodSignRaw, |
| 304 RsaMethodDecrypt, | 304 RsaMethodDecrypt, |
| 305 RsaMethodVerifyRaw, | 305 RsaMethodVerifyRaw, |
| 306 NULL /* private_transform */, |
| 306 NULL /* mod_exp */, | 307 NULL /* mod_exp */, |
| 307 NULL /* bn_mod_exp */, | 308 NULL /* bn_mod_exp */, |
| 308 RSA_FLAG_OPAQUE, | 309 RSA_FLAG_OPAQUE, |
| 309 NULL /* keygen */, | 310 NULL /* keygen */, |
| 310 }; | 311 }; |
| 311 | 312 |
| 312 // Setup an EVP_PKEY to wrap an existing platform RSA PrivateKey object. | 313 // Setup an EVP_PKEY to wrap an existing platform RSA PrivateKey object. |
| 313 // |private_key| is the JNI reference (local or global) to the object. | 314 // |private_key| is the JNI reference (local or global) to the object. |
| 314 // |legacy_rsa|, if non-NULL, is a pointer to the system OpenSSL RSA object | 315 // |legacy_rsa|, if non-NULL, is a pointer to the system OpenSSL RSA object |
| 315 // backing |private_key|. This parameter is only used for Android < 4.2 to | 316 // backing |private_key|. This parameter is only used for Android < 4.2 to |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 default: | 586 default: |
| 586 LOG(WARNING) | 587 LOG(WARNING) |
| 587 << "GetOpenSSLPrivateKeyWrapper() called with invalid key type"; | 588 << "GetOpenSSLPrivateKeyWrapper() called with invalid key type"; |
| 588 return NULL; | 589 return NULL; |
| 589 } | 590 } |
| 590 return pkey.release(); | 591 return pkey.release(); |
| 591 } | 592 } |
| 592 | 593 |
| 593 } // namespace android | 594 } // namespace android |
| 594 } // namespace net | 595 } // namespace net |
| OLD | NEW |