Skip to content

[Bug]: PKCS12 client certificates not being picked up by browser context #1747

@stevenfuhr

Description

@stevenfuhr

Version

1.49.0

Steps to reproduce

Currently setPfxPath does not properly add client certificates.

Code snippet:

ClientCertificate clientCertificate = new ClientCertificate("https://localhost:8443");
clientCertificate.setPassphrase("passphrase");
clientCertificate.setPfxPath(Paths.get("/path/to/client_keystore.p12"));

List<ClientCertificate> clientCertificates = List.of(clientCertificate);

Browser.NewContextOptions options = new Browser.NewContextOptions();
options.setIgnoreHTTPSErrors(true);
options.setClientCertificates(clientCertificates);

context = browser.newContext(options);

Expected behavior

PKCS12 certificates are properly added to the context.

Actual behavior

The certificate is not be present in the context.

Additional context

I create a PR: #1746

Environment

  • Operating System: Ubuntu 20.04
  • Browser: Chromium
  • Java version: java version "21.0.5" 2024-10-15 LTS
  • Maven: 3.9.6

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