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 #ifndef NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_ | 5 #ifndef NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_ |
6 #define NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_ | 6 #define NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_ |
7 | 7 |
| 8 #include <jni.h> |
| 9 |
| 10 #include <string> |
| 11 #include <vector> |
| 12 |
8 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
9 | 14 |
10 namespace net { | 15 namespace net { |
11 | 16 |
12 namespace android { | 17 namespace android { |
13 | 18 |
14 enum CertVerifyResultAndroid { | 19 enum CertVerifyStatusAndroid { |
15 #define CERT_VERIFY_RESULT_ANDROID(label, value) VERIFY_ ## label = value, | 20 #define CERT_VERIFY_STATUS_ANDROID(label, value) VERIFY_ ## label = value, |
16 #include "net/android/cert_verify_result_android_list.h" | 21 #include "net/android/cert_verify_status_android_list.h" |
17 #undef CERT_VERIFY_RESULT_ANDROID | 22 #undef CERT_VERIFY_STATUS_ANDROID |
18 }; | 23 }; |
19 | 24 |
| 25 // Extract parameters out of an AndroidCertVerifyResult object. |
| 26 void ExtractCertVerifyResult(jobject result, |
| 27 CertVerifyStatusAndroid* status, |
| 28 bool* is_issued_by_known_root, |
| 29 std::vector<std::string>* verified_chain); |
| 30 |
| 31 // Register JNI methods. |
| 32 bool RegisterCertVerifyResult(JNIEnv* env); |
| 33 |
20 } // namespace android | 34 } // namespace android |
21 | 35 |
22 } // namespace net | 36 } // namespace net |
23 | 37 |
24 #endif // NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_ | 38 #endif // NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_ |
OLD | NEW |