Home | History | Annotate | Download | only in android
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_
      6 #define NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_
      7 
      8 #include <jni.h>
      9 
     10 #include <string>
     11 #include <vector>
     12 
     13 #include "base/basictypes.h"
     14 
     15 namespace net {
     16 
     17 namespace android {
     18 
     19 enum CertVerifyStatusAndroid {
     20 #define CERT_VERIFY_STATUS_ANDROID(label, value) VERIFY_ ## label = value,
     21 #include "net/android/cert_verify_status_android_list.h"
     22 #undef CERT_VERIFY_STATUS_ANDROID
     23 };
     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 
     34 }  // namespace android
     35 
     36 }  // namespace net
     37 
     38 #endif  // NET_ANDROID_CERT_VERIFY_RESULT_ANDROID_H_
     39