mirror of
https://github.com/google/nomulus
synced 2026-09-17 05:24:44 +00:00
Remove checking of SNI headers
This is only useful when we used the [] proxy because the GFE requires SNI during handshake in order to request the client certificate. The GCP proxy does not need this (it always requests the client certificate). We do not need to check for its existence. Also removed the checking of internal headers for ssl cert hash used only by the [] proxy. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213059027
This commit is contained in:
@@ -46,21 +46,8 @@ public final class TlsCredentialsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProvideRequestedServername() {
|
||||
HttpServletRequest req = mock(HttpServletRequest.class);
|
||||
when(req.getHeader("X-Requested-Servername-SNI")).thenReturn("data");
|
||||
assertThat(TlsCredentials.EppTlsModule.provideRequestedServername(req))
|
||||
.isEqualTo("data");
|
||||
}
|
||||
public void testNothing1() {}
|
||||
|
||||
@Test
|
||||
public void testProvideRequestedServername_missing() {
|
||||
HttpServletRequest req = mock(HttpServletRequest.class);
|
||||
BadRequestException thrown =
|
||||
assertThrows(
|
||||
BadRequestException.class,
|
||||
() -> TlsCredentials.EppTlsModule.provideRequestedServername(req));
|
||||
assertThat(thrown).hasMessageThat().contains("Missing header: X-Requested-Servername-SNI");
|
||||
}
|
||||
|
||||
public void testNothing2() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user