Skip to content

Commit e29a8ec

Browse files
committed
Updated to most recent BMP build of LP to fix issues with SNI
1 parent a32d780 commit e29a8ec

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

browsermob-core-littleproxy/src/main/java/net/lightbody/bmp/ssl/BrowserMobProxyMitmManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import javax.net.ssl.SSLEngine;
66
import javax.net.ssl.SSLSession;
7+
import java.net.InetSocketAddress;
78

89
/**
910
* This implementation mirrors the implementation of {@link org.littleshoot.proxy.extras.SelfSignedMitmManager}, but uses the
@@ -14,8 +15,8 @@ public class BrowserMobProxyMitmManager implements MitmManager {
1415
new BrowserMobSslEngineSource();
1516

1617
@Override
17-
public SSLEngine serverSslEngine() {
18-
return bmpSslEngineSource.newSslEngine();
18+
public SSLEngine serverSslEngine(InetSocketAddress inetSocketAddress) {
19+
return bmpSslEngineSource.newSslEngine(inetSocketAddress.getHostString(), inetSocketAddress.getPort());
1920
}
2021

2122
@Override

browsermob-core-littleproxy/src/main/java/net/lightbody/bmp/ssl/BrowserMobSslEngineSource.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public SSLEngine newSslEngine() {
3535
return sslContext.createSSLEngine();
3636
}
3737

38+
@Override
39+
public SSLEngine newSslEngine(String host, int port) {
40+
return sslContext.createSSLEngine(host, port);
41+
}
42+
3843
private SSLContext initializeSSLContext() {
3944
String algorithm = Security
4045
.getProperty("ssl.KeyManagerFactory.algorithm");

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
<dependency>
256256
<groupId>net.lightbody.bmp</groupId>
257257
<artifactId>littleproxy</artifactId>
258-
<version>1.1.0-beta-bmp-3</version>
258+
<version>1.1.0-beta-bmp-4</version>
259259
</dependency>
260260

261261
<dependency>

0 commit comments

Comments
 (0)