Skip to content

SSL client auth: Client cert is not submitted from the 2nd time when upgrading from 1.8 to 1.9 #828

@jeffpeiyt

Description

@jeffpeiyt

Appreciate your help!

After upgrading to 1.9.10 from 1.8.14, the SSLcontext that have set the client authentication (mutual authentication) only works when hitting the target URL the first time. Then from the 2nd call the client is not submitting the cert anymore.

Is there any pool or settings that reset the client auth with the ssl engine / ssl parameters?

When <=1.8 we had the same issue if using AsyncHttpClientConfigBean, but when <=1.8, AsyncHttpClientConfig.Builder() actually do not have this issue.

code: from the 2nd time using the fastClient will not submit the client cert..

//set ssl context
sslContext.init(keyManagers, trustManager, secureRandom);

com.ning.http.client.AsyncHttpClientConfig.Builder builderFastClient = new AsyncHttpClientConfig.Builder();
builderFastClient.setSSLContext(sslContext);
builderFastClient.setAcceptAnyCertificate(true);

builderFastClient.setConnectTimeout(**);
builderFastClient.setRequestTimeout(**);
fastClient = new AsyncHttpClient(builderFastClient.build());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions