| 1 |
use super::super::*; |
| 2 |
use std::ffi::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void}; |
| 3 |
|
| 4 |
pub enum CONF_METHOD {} |
| 5 |
|
| 6 |
extern "C" { |
| 7 |
pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME; |
| 8 |
pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME); |
| 9 |
pub fn GENERAL_NAME_set0_othername( |
| 10 |
gen: *mut GENERAL_NAME, |
| 11 |
oid: *mut ASN1_OBJECT, |
| 12 |
value: *mut ASN1_TYPE, |
| 13 |
) -> c_int; |
| 14 |
} |
| 15 |
|
| 16 |
#[repr(C)] |
| 17 |
pub struct ACCESS_DESCRIPTION { |
| 18 |
pub method: *mut ASN1_OBJECT, |
| 19 |
pub location: *mut GENERAL_NAME, |
| 20 |
} |
| 21 |
|
| 22 |
stack!(stack_st_ACCESS_DESCRIPTION); |
| 23 |
|
| 24 |
extern "C" { |
| 25 |
pub fn ACCESS_DESCRIPTION_free(ad: *mut ACCESS_DESCRIPTION); |
| 26 |
} |
| 27 |
|
| 28 |
#[repr(C)] |
| 29 |
pub struct AUTHORITY_KEYID { |
| 30 |
pub keyid: *mut ASN1_OCTET_STRING, |
| 31 |
pub issuer: *mut stack_st_GENERAL_NAME, |
| 32 |
pub serial: *mut ASN1_INTEGER, |
| 33 |
} |
| 34 |
|
| 35 |
extern "C" { |
| 36 |
pub fn AUTHORITY_KEYID_free(akid: *mut AUTHORITY_KEYID); |
| 37 |
} |
| 38 |
|
| 39 |
extern "C" { |
| 40 |
pub fn X509V3_EXT_nconf_nid( |
| 41 |
conf: *mut CONF, |
| 42 |
ctx: *mut X509V3_CTX, |
| 43 |
ext_nid: c_int, |
| 44 |
value: *const c_char, |
| 45 |
) -> *mut X509_EXTENSION; |
| 46 |
pub fn X509V3_EXT_nconf( |
| 47 |
conf: *mut CONF, |
| 48 |
ctx: *mut X509V3_CTX, |
| 49 |
name: *const c_char, |
| 50 |
value: *const c_char, |
| 51 |
) -> *mut X509_EXTENSION; |
| 52 |
} |
| 53 |
|
| 54 |
extern "C" { |
| 55 |
pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int; |
| 56 |
pub fn X509_verify(req: *mut X509, pkey: *mut EVP_PKEY) -> c_int; |
| 57 |
|
| 58 |
pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF); |
| 59 |
|
| 60 |
pub fn X509V3_set_ctx( |
| 61 |
ctx: *mut X509V3_CTX, |
| 62 |
issuer: *mut X509, |
| 63 |
subject: *mut X509, |
| 64 |
req: *mut X509_REQ, |
| 65 |
crl: *mut X509_CRL, |
| 66 |
flags: c_int, |
| 67 |
); |
| 68 |
|
| 69 |
pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING; |
| 70 |
} |
| 71 |
|
| 72 |
extern "C" { |
| 73 |
pub fn X509V3_get_d2i( |
| 74 |
x: *const stack_st_X509_EXTENSION, |
| 75 |
nid: c_int, |
| 76 |
crit: *mut c_int, |
| 77 |
idx: *mut c_int, |
| 78 |
) -> *mut c_void; |
| 79 |
pub fn X509V3_extensions_print( |
| 80 |
out: *mut BIO, |
| 81 |
title: *const c_char, |
| 82 |
exts: *const stack_st_X509_EXTENSION, |
| 83 |
flag: c_ulong, |
| 84 |
indent: c_int, |
| 85 |
) -> c_int; |
| 86 |
} |
| 87 |
|
| 88 |
extern "C" { |
| 89 |
#[cfg(not(libressl390))] |
| 90 |
pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int; |
| 91 |
pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void; |
| 92 |
pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION; |
| 93 |
pub fn X509V3_add1_i2d( |
| 94 |
x: *mut *mut stack_st_X509_EXTENSION, |
| 95 |
nid: c_int, |
| 96 |
value: *mut c_void, |
| 97 |
crit: c_int, |
| 98 |
flags: c_ulong, |
| 99 |
) -> c_int; |
| 100 |
pub fn X509V3_EXT_print( |
| 101 |
out: *mut BIO, |
| 102 |
ext: *mut X509_EXTENSION, |
| 103 |
flag: c_ulong, |
| 104 |
indent: c_int, |
| 105 |
) -> c_int; |
| 106 |
|
| 107 |
#[cfg(ossl110)] |
| 108 |
pub fn X509_get_pathlen(x: *mut X509) -> c_long; |
| 109 |
#[cfg(ossl110)] |
| 110 |
pub fn X509_get_extension_flags(x: *mut X509) -> u32; |
| 111 |
#[cfg(ossl110)] |
| 112 |
pub fn X509_get_key_usage(x: *mut X509) -> u32; |
| 113 |
#[cfg(ossl110)] |
| 114 |
pub fn X509_get_extended_key_usage(x: *mut X509) -> u32; |
| 115 |
#[cfg(ossl110)] |
| 116 |
pub fn X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING; |
| 117 |
#[cfg(ossl110)] |
| 118 |
pub fn X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING; |
| 119 |
#[cfg(ossl111d)] |
| 120 |
pub fn X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME; |
| 121 |
#[cfg(ossl111d)] |
| 122 |
pub fn X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER; |
| 123 |
} |
| 124 |
|
| 125 |
#[repr(C)] |
| 126 |
pub struct DIST_POINT_NAME { |
| 127 |
pub type_: c_int, |
| 128 |
pub name: DIST_POINT_NAME_st_anon_union, |
| 129 |
pub dpname: *mut X509_NAME, |
| 130 |
} |
| 131 |
|
| 132 |
#[repr(C)] |
| 133 |
pub union DIST_POINT_NAME_st_anon_union { |
| 134 |
pub fullname: *mut stack_st_GENERAL_NAME, |
| 135 |
pub relativename: *mut stack_st_X509_NAME_ENTRY, |
| 136 |
} |
| 137 |
|
| 138 |
#[repr(C)] |
| 139 |
pub struct DIST_POINT { |
| 140 |
pub distpoint: *mut DIST_POINT_NAME, |
| 141 |
pub reasons: *mut ASN1_BIT_STRING, |
| 142 |
pub CRLissuer: *mut stack_st_GENERAL_NAME, |
| 143 |
pub dp_reasons: c_int, |
| 144 |
} |
| 145 |
stack!(stack_st_DIST_POINT); |
| 146 |
|
| 147 |
extern "C" { |
| 148 |
pub fn DIST_POINT_free(dist_point: *mut DIST_POINT); |
| 149 |
pub fn DIST_POINT_NAME_free(dist_point: *mut DIST_POINT_NAME); |
| 150 |
} |
| 151 |
|
| 152 |
#[cfg(ossl110)] |
| 153 |
extern "C" { |
| 154 |
pub fn X509_check_host( |
| 155 |
x: *mut X509, |
| 156 |
chk: *const c_char, |
| 157 |
chklen: usize, |
| 158 |
flags: c_uint, |
| 159 |
peername: *mut *mut c_char, |
| 160 |
) -> c_int; |
| 161 |
pub fn X509_check_email( |
| 162 |
x: *mut X509, |
| 163 |
chk: *const c_char, |
| 164 |
chklen: usize, |
| 165 |
flags: c_uint, |
| 166 |
) -> c_int; |
| 167 |
pub fn X509_check_ip(x: *mut X509, chk: *const c_uchar, chklen: usize, flags: c_uint) -> c_int; |
| 168 |
pub fn X509_check_ip_asc(x: *mut X509, ipasc: *const c_char, flags: c_uint) -> c_int; |
| 169 |
} |