summaryrefslogtreecommitdiffstats
path: root/net/android/cert_verify_result_android.h
blob: 7027c3d7726dc1842133f528d6e98c5feda5e181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_
#define NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_

#include <jni.h>

#include <string>
#include <vector>

#include "base/basictypes.h"

namespace net {

namespace android {

enum CertVerifyStatusAndroid {
#define CERT_VERIFY_STATUS_ANDROID(label, value) VERIFY_ ## label = value,
#include "net/android/cert_verify_status_android_list.h"
#undef CERT_VERIFY_STATUS_ANDROID
};

// Extract parameters out of an AndroidCertVerifyResult object.
void ExtractCertVerifyResult(jobject result,
                             CertVerifyStatusAndroid* status,
                             bool* is_issued_by_known_root,
                             std::vector<std::string>* verified_chain);

// Register JNI methods.
bool RegisterCertVerifyResult(JNIEnv* env);

}  // namespace android

}  // namespace net

#endif  // NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_