File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
openssl-sys/src/handwritten Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,12 @@ extern "C" {
118
118
#[ cfg( any( ossl102, libressl261) ) ]
119
119
pub fn X509_VERIFY_PARAM_set_hostflags ( param : * mut X509_VERIFY_PARAM , flags : c_uint ) ;
120
120
#[ cfg( any( ossl102, libressl261) ) ]
121
+ pub fn X509_VERIFY_PARAM_set1_email (
122
+ param : * mut X509_VERIFY_PARAM ,
123
+ email : * const c_char ,
124
+ emaillen : size_t ,
125
+ ) -> c_int ;
126
+ #[ cfg( any( ossl102, libressl261) ) ]
121
127
pub fn X509_VERIFY_PARAM_set1_ip (
122
128
param : * mut X509_VERIFY_PARAM ,
123
129
ip : * const c_uchar ,
Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ ### Added
6
+ * Added ` X509VerifyParam::set_email `
7
+
5
8
## [ v0.10.56] - 2023-08-06
6
9
7
10
## Added
Original file line number Diff line number Diff line change @@ -131,6 +131,21 @@ impl X509VerifyParamRef {
131
131
}
132
132
}
133
133
134
+ /// Set the expected email address.
135
+ #[ corresponds( X509_VERIFY_PARAM_set1_email ) ]
136
+ pub fn set_email ( & mut self , email : & str ) -> Result < ( ) , ErrorStack > {
137
+ unsafe {
138
+ // len == 0 means "run strlen" :(
139
+ let raw_email = if email. is_empty ( ) { "\0 " } else { email } ;
140
+ cvt ( ffi:: X509_VERIFY_PARAM_set1_email (
141
+ self . as_ptr ( ) ,
142
+ raw_email. as_ptr ( ) as * const _ ,
143
+ email. len ( ) ,
144
+ ) )
145
+ . map ( |_| ( ) )
146
+ }
147
+ }
148
+
134
149
/// Set the expected IPv4 or IPv6 address.
135
150
#[ corresponds( X509_VERIFY_PARAM_set1_ip ) ]
136
151
pub fn set_ip ( & mut self , ip : IpAddr ) -> Result < ( ) , ErrorStack > {
You can’t perform that action at this time.
0 commit comments