• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use super::super::*;
2 use libc::*;
3 
4 #[repr(C)]
5 pub struct ASN1_ENCODING {
6     pub enc: *mut c_uchar,
7     pub len: c_long,
8     pub modified: c_int,
9 }
10 
11 extern "C" {
ASN1_OBJECT_free(x: *mut ASN1_OBJECT)12     pub fn ASN1_OBJECT_free(x: *mut ASN1_OBJECT);
13 }
14 
15 stack!(stack_st_ASN1_OBJECT);
16 
17 extern "C" {
ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING18     pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING;
19     #[cfg(any(ossl110, libressl273))]
ASN1_STRING_get0_data(x: *const ASN1_STRING) -> *const c_uchar20     pub fn ASN1_STRING_get0_data(x: *const ASN1_STRING) -> *const c_uchar;
21     #[cfg(any(all(ossl101, not(ossl110)), libressl))]
ASN1_STRING_data(x: *mut ASN1_STRING) -> *mut c_uchar22     pub fn ASN1_STRING_data(x: *mut ASN1_STRING) -> *mut c_uchar;
23 
ASN1_BIT_STRING_free(x: *mut ASN1_BIT_STRING)24     pub fn ASN1_BIT_STRING_free(x: *mut ASN1_BIT_STRING);
25 
ASN1_STRING_free(x: *mut ASN1_STRING)26     pub fn ASN1_STRING_free(x: *mut ASN1_STRING);
ASN1_STRING_length(x: *const ASN1_STRING) -> c_int27     pub fn ASN1_STRING_length(x: *const ASN1_STRING) -> c_int;
28 
ASN1_STRING_set(x: *mut ASN1_STRING, data: *const c_void, len: c_int) -> c_int29     pub fn ASN1_STRING_set(x: *mut ASN1_STRING, data: *const c_void, len: c_int) -> c_int;
30 
ASN1_GENERALIZEDTIME_free(tm: *mut ASN1_GENERALIZEDTIME)31     pub fn ASN1_GENERALIZEDTIME_free(tm: *mut ASN1_GENERALIZEDTIME);
ASN1_GENERALIZEDTIME_print(b: *mut BIO, tm: *const ASN1_GENERALIZEDTIME) -> c_int32     pub fn ASN1_GENERALIZEDTIME_print(b: *mut BIO, tm: *const ASN1_GENERALIZEDTIME) -> c_int;
ASN1_TIME_new() -> *mut ASN1_TIME33     pub fn ASN1_TIME_new() -> *mut ASN1_TIME;
34     #[cfg(ossl102)]
ASN1_TIME_diff( pday: *mut c_int, psec: *mut c_int, from: *const ASN1_TIME, to: *const ASN1_TIME, ) -> c_int35     pub fn ASN1_TIME_diff(
36         pday: *mut c_int,
37         psec: *mut c_int,
38         from: *const ASN1_TIME,
39         to: *const ASN1_TIME,
40     ) -> c_int;
ASN1_TIME_free(tm: *mut ASN1_TIME)41     pub fn ASN1_TIME_free(tm: *mut ASN1_TIME);
ASN1_TIME_print(b: *mut BIO, tm: *const ASN1_TIME) -> c_int42     pub fn ASN1_TIME_print(b: *mut BIO, tm: *const ASN1_TIME) -> c_int;
ASN1_TIME_set(from: *mut ASN1_TIME, to: time_t) -> *mut ASN1_TIME43     pub fn ASN1_TIME_set(from: *mut ASN1_TIME, to: time_t) -> *mut ASN1_TIME;
44 
ASN1_INTEGER_free(x: *mut ASN1_INTEGER)45     pub fn ASN1_INTEGER_free(x: *mut ASN1_INTEGER);
ASN1_INTEGER_get(dest: *const ASN1_INTEGER) -> c_long46     pub fn ASN1_INTEGER_get(dest: *const ASN1_INTEGER) -> c_long;
ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int47     pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int;
BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER48     pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER;
ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM49     pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM;
50 
ASN1_TIME_set_string(s: *mut ASN1_TIME, str: *const c_char) -> c_int51     pub fn ASN1_TIME_set_string(s: *mut ASN1_TIME, str: *const c_char) -> c_int;
52     #[cfg(ossl111)]
ASN1_TIME_set_string_X509(s: *mut ASN1_TIME, str: *const c_char) -> c_int53     pub fn ASN1_TIME_set_string_X509(s: *mut ASN1_TIME, str: *const c_char) -> c_int;
54 }
55 
56 const_ptr_api! {
57     extern "C" {
58         pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: #[const_ptr_if(any(ossl110, libressl280))] ASN1_STRING) -> c_int;
59     }
60 }
61