File tree 1 file changed +5
-5
lines changed
x509-cert/src/builder/profile
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
//! CA/Browser forum specific profiles
2
2
//!
3
3
//! <https://cabforum.org/wp-content/uploads/CA-Browser-Forum-BR-v2.0.1.pdf>
4
- use alloc :: vec ;
5
- use std :: collections:: HashSet ;
4
+
5
+ use alloc :: { collections:: BTreeSet , vec } ;
6
6
7
7
use crate :: {
8
8
builder:: { BuilderProfile , Error , Result } ,
@@ -41,7 +41,7 @@ pub fn check_names_encoding(name: &Name, multiple_allowed: bool) -> Result<()> {
41
41
] ;
42
42
let mut ordering = enforce_ordering. iter ( ) ;
43
43
44
- let mut seen = HashSet :: new ( ) ;
44
+ let mut seen = BTreeSet :: new ( ) ;
45
45
46
46
for rdn in name. iter_rdn ( ) {
47
47
if rdn. len ( ) != 1 {
@@ -70,12 +70,12 @@ pub fn check_names_encoding(name: &Name, multiple_allowed: bool) -> Result<()> {
70
70
///
71
71
/// BR 7.1.2.10.2 CA Certificate Naming
72
72
pub fn ca_certificate_naming ( subject : & Name ) -> Result < ( ) > {
73
- let mut required = HashSet :: from ( [
73
+ let mut required = BTreeSet :: from ( [
74
74
rfc4519:: COUNTRY_NAME ,
75
75
rfc4519:: ORGANIZATION_NAME ,
76
76
rfc4519:: COMMON_NAME ,
77
77
] ) ;
78
- let mut allowed = HashSet :: from ( [
78
+ let mut allowed = BTreeSet :: from ( [
79
79
rfc4519:: COUNTRY_NAME ,
80
80
rfc2256:: STATE_OR_PROVINCE_NAME ,
81
81
rfc4519:: LOCALITY_NAME ,
You can’t perform that action at this time.
0 commit comments