File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
mitm/src/main/java/net/lightbody/bmp/mitm/manager Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 12
12
import net .lightbody .bmp .mitm .RootCertificateGenerator ;
13
13
import net .lightbody .bmp .mitm .exception .MitmException ;
14
14
import net .lightbody .bmp .mitm .exception .SslContextInitializationException ;
15
+ import net .lightbody .bmp .mitm .keys .ECKeyGenerator ;
15
16
import net .lightbody .bmp .mitm .keys .KeyGenerator ;
16
17
import net .lightbody .bmp .mitm .keys .RSAKeyGenerator ;
17
18
import net .lightbody .bmp .mitm .stats .CertificateGenerationStatistics ;
@@ -300,12 +301,25 @@ public CertificateGenerationStatistics getStatistics() {
300
301
}
301
302
302
303
/**
303
- * Convenience method to return a new {@link Builder} instance.
304
+ * Convenience method to return a new {@link Builder} instance default default values: a {@link RootCertificateGenerator}
305
+ * that dynamically generates an RSA root certificate and RSA server certificates.
304
306
*/
305
307
public static Builder builder () {
306
308
return new Builder ();
307
309
}
308
310
311
+ /**
312
+ * Convenience method to return a new {@link Builder} instance that will dynamically create EC root certificates and
313
+ * EC server certificates, but otherwise uses default values.
314
+ */
315
+ public static Builder builderWithECC () {
316
+ return new Builder ()
317
+ .serverKeyGenerator (new ECKeyGenerator ())
318
+ .rootCertificateSource (RootCertificateGenerator .builder ()
319
+ .keyGenerator (new ECKeyGenerator ())
320
+ .build ());
321
+ }
322
+
309
323
/**
310
324
* A Builder for {@link ImpersonatingMitmManager}s. Initialized with suitable default values suitable for most purposes.
311
325
*/
You can’t perform that action at this time.
0 commit comments