This commit is contained in:
novice.li
2023-11-25 15:31:09 +08:00
parent e060f1c114
commit f1a2ce1395
10 changed files with 319 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ public class AgentMain {
AgentBuilder agentBuilder = newAgentBuilder();
agentBuilder.type(ElementMatchers.named("java.security.cert.PKIXBuilderParameters"))
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
.visit(Advice.to(PKIXBuilderParameters.class)
.visit(Advice.to(PKIXBuilderParametersAdvice.class)
.on(ElementMatchers.isConstructor().and(ElementMatchers.takesArgument(0, Set.class)))))
.asTerminalTransformation()
.type(ElementMatchers.named("sun.net.www.http.HttpClient"))