1
1
use bitflags:: bitflags;
2
2
use foreign_types:: ForeignTypeRef ;
3
- use libc:: { c_int, c_long} ;
3
+ use libc:: { c_int, c_long, c_ulong } ;
4
4
use std:: mem;
5
5
use std:: ptr;
6
6
@@ -17,18 +17,18 @@ use openssl_macros::corresponds;
17
17
bitflags ! {
18
18
#[ derive( Copy , Clone , Debug , Eq , Hash , Ord , PartialEq , PartialOrd ) ]
19
19
#[ repr( transparent) ]
20
- pub struct OcspFlag : c_int {
21
- const NO_CERTS = ffi:: OCSP_NOCERTS ;
22
- const NO_INTERN = ffi:: OCSP_NOINTERN ;
23
- const NO_CHAIN = ffi:: OCSP_NOCHAIN ;
24
- const NO_VERIFY = ffi:: OCSP_NOVERIFY ;
25
- const NO_EXPLICIT = ffi:: OCSP_NOEXPLICIT ;
26
- const NO_CA_SIGN = ffi:: OCSP_NOCASIGN ;
27
- const NO_DELEGATED = ffi:: OCSP_NODELEGATED ;
28
- const NO_CHECKS = ffi:: OCSP_NOCHECKS ;
29
- const TRUST_OTHER = ffi:: OCSP_TRUSTOTHER ;
30
- const RESPID_KEY = ffi:: OCSP_RESPID_KEY ;
31
- const NO_TIME = ffi:: OCSP_NOTIME ;
20
+ pub struct OcspFlag : c_ulong {
21
+ const NO_CERTS = ffi:: OCSP_NOCERTS as c_ulong ;
22
+ const NO_INTERN = ffi:: OCSP_NOINTERN as c_ulong ;
23
+ const NO_CHAIN = ffi:: OCSP_NOCHAIN as c_ulong ;
24
+ const NO_VERIFY = ffi:: OCSP_NOVERIFY as c_ulong ;
25
+ const NO_EXPLICIT = ffi:: OCSP_NOEXPLICIT as c_ulong ;
26
+ const NO_CA_SIGN = ffi:: OCSP_NOCASIGN as c_ulong ;
27
+ const NO_DELEGATED = ffi:: OCSP_NODELEGATED as c_ulong ;
28
+ const NO_CHECKS = ffi:: OCSP_NOCHECKS as c_ulong ;
29
+ const TRUST_OTHER = ffi:: OCSP_TRUSTOTHER as c_ulong ;
30
+ const RESPID_KEY = ffi:: OCSP_RESPID_KEY as c_ulong ;
31
+ const NO_TIME = ffi:: OCSP_NOTIME as c_ulong ;
32
32
}
33
33
}
34
34
@@ -169,7 +169,7 @@ impl OcspBasicResponseRef {
169
169
self . as_ptr ( ) ,
170
170
certs. as_ptr ( ) ,
171
171
store. as_ptr ( ) ,
172
- flags. bits ( ) . try_into ( ) . map_err ( |_| ErrorStack :: get ( ) ) ? ,
172
+ flags. bits ( ) ,
173
173
) )
174
174
. map ( |_| ( ) )
175
175
}
0 commit comments