| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // ExDataDup is called when one of the RSA, DSA or EC_KEY objects is | 87 // ExDataDup is called when one of the RSA, DSA or EC_KEY objects is |
| 88 // duplicated. We don't support this and it should never happen. | 88 // duplicated. We don't support this and it should never happen. |
| 89 int ExDataDup(CRYPTO_EX_DATA* to, | 89 int ExDataDup(CRYPTO_EX_DATA* to, |
| 90 const CRYPTO_EX_DATA* from, | 90 const CRYPTO_EX_DATA* from, |
| 91 void** from_d, | 91 void** from_d, |
| 92 int index, | 92 int index, |
| 93 long argl, | 93 long argl, |
| 94 void* argp) { | 94 void* argp) { |
| 95 CHECK(false); | 95 CHECK_EQ((void*)NULL, *from_d); |
| 96 return 0; | 96 return 0; |
| 97 } | 97 } |
| 98 | 98 |
| 99 // ExDataFree is called when one of the RSA, DSA or EC_KEY object is freed. | 99 // ExDataFree is called when one of the RSA, DSA or EC_KEY object is freed. |
| 100 void ExDataFree(void* parent, | 100 void ExDataFree(void* parent, |
| 101 void* ptr, | 101 void* ptr, |
| 102 CRYPTO_EX_DATA* ad, | 102 CRYPTO_EX_DATA* ad, |
| 103 int index, | 103 int index, |
| 104 long argl, | 104 long argl, |
| 105 void* argp) { | 105 void* argp) { |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 default: | 585 default: |
| 586 LOG(WARNING) | 586 LOG(WARNING) |
| 587 << "GetOpenSSLPrivateKeyWrapper() called with invalid key type"; | 587 << "GetOpenSSLPrivateKeyWrapper() called with invalid key type"; |
| 588 return NULL; | 588 return NULL; |
| 589 } | 589 } |
| 590 return pkey.release(); | 590 return pkey.release(); |
| 591 } | 591 } |
| 592 | 592 |
| 593 } // namespace android | 593 } // namespace android |
| 594 } // namespace net | 594 } // namespace net |
| OLD | NEW |