File tree 2 files changed +18
-4
lines changed
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ typedef struct {
82
82
EFI_TLS_VERSION Version ;
83
83
EFI_TLS_CONNECTION_END ConnectionEnd ;
84
84
EFI_TLS_VERIFY VerifyMethod ;
85
+ EFI_TLS_VERIFY_HOST VerifyHost ;
85
86
EFI_TLS_SESSION_STATE SessionState ;
86
87
} TLS_CONFIG_DATA ;
87
88
Original file line number Diff line number Diff line change @@ -623,13 +623,16 @@ TlsConfigureSession (
623
623
//
624
624
// TlsConfigData initialization
625
625
//
626
- HttpInstance -> TlsConfigData .ConnectionEnd = EfiTlsClient ;
627
- HttpInstance -> TlsConfigData .VerifyMethod = EFI_TLS_VERIFY_PEER ;
628
- HttpInstance -> TlsConfigData .SessionState = EfiTlsSessionNotStarted ;
626
+ HttpInstance -> TlsConfigData .ConnectionEnd = EfiTlsClient ;
627
+ HttpInstance -> TlsConfigData .VerifyMethod = EFI_TLS_VERIFY_PEER ;
628
+ HttpInstance -> TlsConfigData .VerifyHost .Flags = EFI_TLS_VERIFY_FLAG_NO_WILDCARDS ;
629
+ HttpInstance -> TlsConfigData .VerifyHost .HostName = HttpInstance -> RemoteHost ;
630
+ HttpInstance -> TlsConfigData .SessionState = EfiTlsSessionNotStarted ;
629
631
630
632
//
631
633
// EfiTlsConnectionEnd,
632
- // EfiTlsVerifyMethod
634
+ // EfiTlsVerifyMethod,
635
+ // EfiTlsVerifyHost,
633
636
// EfiTlsSessionState
634
637
//
635
638
Status = HttpInstance -> Tls -> SetSessionData (
@@ -652,6 +655,16 @@ TlsConfigureSession (
652
655
return Status ;
653
656
}
654
657
658
+ Status = HttpInstance -> Tls -> SetSessionData (
659
+ HttpInstance -> Tls ,
660
+ EfiTlsVerifyHost ,
661
+ & HttpInstance -> TlsConfigData .VerifyHost ,
662
+ sizeof (EFI_TLS_VERIFY_HOST )
663
+ );
664
+ if (EFI_ERROR (Status )) {
665
+ return Status ;
666
+ }
667
+
655
668
Status = HttpInstance -> Tls -> SetSessionData (
656
669
HttpInstance -> Tls ,
657
670
EfiTlsSessionState ,
You can’t perform that action at this time.
0 commit comments