1
1
use std:: mem:: MaybeUninit ;
2
2
3
+ #[ cfg( ossl110) ]
3
4
use ffi:: {
4
5
ASIdOrRange_id , ASIdOrRange_range , ASIdentifierChoice_asIdsOrRanges ,
5
6
ASIdentifierChoice_inherit , IPAddressChoice_addressesOrRanges , X509v3_addr_get_afi ,
@@ -15,6 +16,7 @@ use crate::{
15
16
16
17
use super :: X509 ;
17
18
19
+ #[ cfg( ossl110) ]
18
20
foreign_type_and_impl_send_sync ! {
19
21
type CType = ffi:: ASIdOrRange ;
20
22
fn drop = ffi:: ASIdOrRange_free ;
@@ -24,11 +26,12 @@ foreign_type_and_impl_send_sync! {
24
26
/// Reference to `ASIdOrRange`.
25
27
pub struct ASIdOrRangeRef ;
26
28
}
27
-
29
+ # [ cfg ( ossl110 ) ]
28
30
impl Stackable for ASIdOrRange {
29
31
type StackType = ffi:: stack_st_ASIdOrRange ;
30
32
}
31
33
34
+ #[ cfg( ossl110) ]
32
35
foreign_type_and_impl_send_sync ! {
33
36
type CType = ffi:: ASIdentifiers ;
34
37
fn drop = ffi:: ASIdentifiers_free ;
@@ -39,6 +42,7 @@ foreign_type_and_impl_send_sync! {
39
42
pub struct ASIdentifiersRef ;
40
43
}
41
44
45
+ #[ cfg( ossl110) ]
42
46
impl ASIdentifiers {
43
47
pub fn inherited ( & self ) -> bool {
44
48
unsafe {
@@ -109,6 +113,7 @@ foreign_type_and_impl_send_sync! {
109
113
pub struct IPAddressFamilyRef ;
110
114
}
111
115
116
+ #[ cfg( ossl110) ]
112
117
impl Stackable for IPAddressFamily {
113
118
type StackType = ffi:: stack_st_IPAddressFamily ;
114
119
}
@@ -119,6 +124,7 @@ pub enum IPVersion {
119
124
V6 ,
120
125
}
121
126
127
+ #[ cfg( ossl110) ]
122
128
impl IPAddressFamily {
123
129
pub fn fam ( & self ) -> Option < IPVersion > {
124
130
let ptr = self . 0 ;
@@ -180,11 +186,13 @@ impl IPAddressFamily {
180
186
}
181
187
}
182
188
189
+ #[ cfg( ossl110) ]
183
190
pub trait ExtractSBGPInfo {
184
191
fn asn ( & self ) -> Option < ASIdentifiers > ;
185
192
fn ip_addresses ( & self ) -> Option < Stack < IPAddressFamily > > ;
186
193
}
187
194
195
+ #[ cfg( ossl110) ]
188
196
impl ExtractSBGPInfo for X509 {
189
197
fn asn ( & self ) -> Option < ASIdentifiers > {
190
198
unsafe {
0 commit comments