File tree 8 files changed +61
-8
lines changed
8 files changed +61
-8
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ ## [ v0.9.101] - 2024-02-21
6
+
7
+ ### Fixed
8
+
9
+ * Fixed a bug where, when building with the ` vendored ` feature, this crate always needed to be rebuilt.
10
+
11
+ ## [ v0.9.100] - 2024-02-19
12
+
5
13
### Added
6
14
7
15
* Added ` OSSL_PARAM ` , ` OSSL_PARAM_construct_uint ` , ` OSSL_PARAM_construct_end ` .
8
16
* Added ` EVP_PKEY_CTX_set_params ` and ` EVP_PKEY_CTX_get_params ` .
17
+ * Added ` X509_alias_get0 ` .
18
+ * Added ` EVP_default_properties_enable_fips ` .
9
19
10
20
## [ v0.9.99] - 2024-01-19
11
21
@@ -583,7 +593,9 @@ Fixed builds against OpenSSL built with `no-cast`.
583
593
* Added ` X509_verify ` and ` X509_REQ_verify ` .
584
594
* Added ` EVP_MD_type ` and ` EVP_GROUP_get_curve_name ` .
585
595
586
- [ Unreleased ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.99..master
596
+ [ Unreleased ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.101..master
597
+ [ v0.9.101 ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.100...openssl-sys-v0.9.101
598
+ [ v0.9.100 ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.99...openssl-sys-v0.9.100
587
599
[ v0.9.99 ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.98...openssl-sys-v0.9.99
588
600
[ v0.9.98 ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.97...openssl-sys-v0.9.98
589
601
[ v0.9.97 ] : https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.96...openssl-sys-v0.9.97
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " openssl-sys"
3
- version = " 0.9.99 "
3
+ version = " 0.9.101 "
4
4
authors = [
5
5
" Alex Crichton <[email protected] >" ,
6
6
" Steven Fackler <[email protected] >" ,
Original file line number Diff line number Diff line change @@ -79,8 +79,14 @@ fn main() {
79
79
let target = env:: var ( "TARGET" ) . unwrap ( ) ;
80
80
81
81
let ( lib_dirs, include_dir) = find_openssl ( & target) ;
82
- if let Some ( printable_include) = include_dir. join ( "openssl" ) . to_str ( ) {
83
- println ! ( "cargo:rerun-if-changed={}" , printable_include) ;
82
+ // rerun-if-changed causes openssl-sys to rebuild if the openssl include
83
+ // dir has changed since the last build. However, this causes a rebuild
84
+ // every time when vendoring so we disable it.
85
+ let potential_path = include_dir. join ( "openssl" ) ;
86
+ if potential_path. exists ( ) && !cfg ! ( feature = "vendored" ) {
87
+ if let Some ( printable_include) = potential_path. to_str ( ) {
88
+ println ! ( "cargo:rerun-if-changed={}" , printable_include) ;
89
+ }
84
90
}
85
91
86
92
if !lib_dirs. iter ( ) . all ( |p| p. exists ( ) ) {
Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ extern "C" {
311
311
pub fn X509_get_version ( x : * const X509 ) -> c_long ;
312
312
pub fn X509_set_serialNumber ( x : * mut X509 , sn : * mut ASN1_INTEGER ) -> c_int ;
313
313
pub fn X509_get_serialNumber ( x : * mut X509 ) -> * mut ASN1_INTEGER ;
314
+ pub fn X509_alias_get0 ( x : * mut X509 , len : * mut c_int ) -> * mut c_uchar ;
314
315
}
315
316
const_ptr_api ! {
316
317
extern "C" {
Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ ## [ v0.10.64] - 2024-02-19
6
+
5
7
### Added
6
8
7
9
* Added ` PkeyCtxRef::{nonce_type, set_nonce_type} ` .
10
+ * Added ` X509Ref::alias ` .
11
+
8
12
9
13
## [ v0.10.63] - 2024-01-19
10
14
888
892
889
893
Look at the [ release tags] for information about older releases.
890
894
891
- [ Unreleased ] : https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.63...master
895
+ [ Unreleased ] : https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...master
896
+ [ v0.10.64 ] : https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.63...openssl-v0.10.64
892
897
[ v0.10.63 ] : https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.62...openssl-v0.10.63
893
898
[ v0.10.62 ] : https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.61...openssl-v0.10.62
894
899
[ v0.10.61 ] : https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.60...openssl-v0.10.61
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " openssl"
3
- version = " 0.10.63 "
3
+ version = " 0.10.64 "
4
4
authors = [
" Steven Fackler <[email protected] >" ]
5
5
license = " Apache-2.0"
6
6
description = " OpenSSL bindings"
@@ -30,7 +30,7 @@ libc = "0.2"
30
30
once_cell = " 1.5.2"
31
31
32
32
openssl-macros = { version = " 0.1.0" , path = " ../openssl-macros" }
33
- ffi = { package = " openssl-sys" , version = " 0.9.99 " , path = " ../openssl-sys" }
33
+ ffi = { package = " openssl-sys" , version = " 0.9.100 " , path = " ../openssl-sys" }
34
34
35
35
[dev-dependencies ]
36
36
hex = " 0.3"
Original file line number Diff line number Diff line change @@ -304,9 +304,20 @@ mod test {
304
304
let parsed = pkcs12. parse2 ( "mypass" ) . unwrap ( ) ;
305
305
306
306
assert_eq ! (
307
- hex:: encode( parsed. cert. unwrap( ) . digest( MessageDigest :: sha1( ) ) . unwrap( ) ) ,
307
+ hex:: encode(
308
+ parsed
309
+ . cert
310
+ . as_ref( )
311
+ . unwrap( )
312
+ . digest( MessageDigest :: sha1( ) )
313
+ . unwrap( )
314
+ ) ,
308
315
"59172d9313e84459bcff27f967e79e6e9217e584"
309
316
) ;
317
+ assert_eq ! (
318
+ parsed. cert. as_ref( ) . unwrap( ) . alias( ) ,
319
+ Some ( b"foobar.com" as & [ u8 ] )
320
+ ) ;
310
321
311
322
let chain = parsed. ca . unwrap ( ) ;
312
323
assert_eq ! ( chain. len( ) , 1 ) ;
Original file line number Diff line number Diff line change @@ -650,6 +650,24 @@ impl X509Ref {
650
650
}
651
651
}
652
652
653
+ /// Returns this certificate's "alias". This field is populated by
654
+ /// OpenSSL in some situations -- specifically OpenSSL will store a
655
+ /// PKCS#12 `friendlyName` in this field. This is not a part of the X.509
656
+ /// certificate itself, OpenSSL merely attaches it to this structure in
657
+ /// memory.
658
+ #[ corresponds( X509_alias_get0 ) ]
659
+ pub fn alias ( & self ) -> Option < & [ u8 ] > {
660
+ unsafe {
661
+ let mut len = 0 ;
662
+ let ptr = ffi:: X509_alias_get0 ( self . as_ptr ( ) , & mut len) ;
663
+ if ptr. is_null ( ) {
664
+ None
665
+ } else {
666
+ Some ( slice:: from_raw_parts ( ptr, len as usize ) )
667
+ }
668
+ }
669
+ }
670
+
653
671
to_pem ! {
654
672
/// Serializes the certificate into a PEM-encoded X509 structure.
655
673
///
You can’t perform that action at this time.
0 commit comments