File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,21 @@ fn wildcard_subject_alternative_names() {
331
331
) ;
332
332
}
333
333
334
+ #[ cfg( feature = "alloc" ) ]
335
+ #[ test]
336
+ fn no_subject_alt_names ( ) {
337
+ let ee = CertificateDer :: from ( & include_bytes ! ( "misc/no_subject_alternative_name.der" ) [ ..] ) ;
338
+
339
+ let cert = webpki:: EndEntityCert :: try_from ( & ee)
340
+ . expect ( "should parse end entity certificate correctly" ) ;
341
+
342
+ let names = cert
343
+ . dns_names ( )
344
+ . expect ( "we should get a result even without subjectAltNames" ) ;
345
+
346
+ assert ! ( names. collect:: <Vec <_>>( ) . is_empty( ) ) ;
347
+ }
348
+
334
349
#[ cfg( feature = "alloc" ) ]
335
350
fn expect_cert_dns_names < ' name > (
336
351
cert_der : & [ u8 ] ,
@@ -348,18 +363,3 @@ fn expect_cert_dns_names<'name>(
348
363
349
364
assert ! ( cert. dns_names( ) . unwrap( ) . eq( expected_names) ) ;
350
365
}
351
-
352
- #[ cfg( feature = "alloc" ) ]
353
- #[ test]
354
- fn no_subject_alt_names ( ) {
355
- let ee = CertificateDer :: from ( & include_bytes ! ( "misc/no_subject_alternative_name.der" ) [ ..] ) ;
356
-
357
- let cert = webpki:: EndEntityCert :: try_from ( & ee)
358
- . expect ( "should parse end entity certificate correctly" ) ;
359
-
360
- let names = cert
361
- . dns_names ( )
362
- . expect ( "we should get a result even without subjectAltNames" ) ;
363
-
364
- assert ! ( names. collect:: <Vec <_>>( ) . is_empty( ) ) ;
365
- }
You can’t perform that action at this time.
0 commit comments