### CI Link

https://gradle-enterprise.elastic.co/s/jze725jpxi7ki/console-log?task=:x-pack:plugin:security:internalClusterTest

### Repro line

./gradlew ':x-pack:plugin:security:internalClusterTest' --tests "org.elasticsearch.xpack.security.authc.pki.PkiAuthDelegationIntegTests.testDelegateThenAuthenticate" -Dtests.seed=F5EC1FEFFC2FC08B -Dtests.locale=en-GB -Dtests.timezone=SystemV/PST8PDT -Druntime.java=20

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

The pki integ test began failing today. Looking at the certs the test uses, they are all expired:

```
❯ openssl x509 -enddate -noout -in testClient.crt
notAfter=Jul 18 13:33:41 2023 GMT
❯ openssl x509 -enddate -noout -in testIntermediateCA.crt
notAfter=Jul 18 13:32:34 2023 GMT
❯ openssl x509 -enddate -noout -in testRootCA.crt
notAfter=Jul 18 13:32:20 2023 GMT
```
x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthDelegationIntegTests.java
assertThat(e2, throwableWithMessage(containsString("Validation Failed: 1: certificates chain must be an ordered chain;")));
        
        final List<X509Certificate> certificateChain3 = Arrays.asList(bogusCertificate);
        ResponseException e3 = expectThrows(
            ResponseException.class,
            () -> getSecurityClient(optionsBuilder.build()).delegatePkiAuthentication(certificateChain3)
        );
        assertThat(e3, throwableWithMessage(containsString("security_exception")));
        assertThat(e3, throwableWithMessage(containsString("unable to authenticate user")));
    }
    private X509Certificate readCertForPkiDelegation(String certName) throws Exception {
        Path path = getDataPath("/org/elasticsearch/xpack/security/action/pki_delegation/" + certName);
        try (InputStream in = Files.newInputStream(path)) {
            CertificateFactory factory = CertificateFactory.getInstance("X.509");
            return (X509Certificate) factory.generateCertificate(in);
        }
    }
    @SuppressWarnings("unchecked")
    private Map<String, Object> assertMap(Map<String, Object> map, ParseField field) {
        final Object val = map.get(field.getPreferredName());
        assertThat("Field " + field + " of " + map, val, instanceOf(Map.class));
        return (Map<String, Object>) val;
    }
    private List<?> assertList(Map<String, Object> map, ParseField field) {
        final Object val = map.get(field.getPreferredName());
        assertThat("Field " + field + " of " + map, val, instanceOf(List.class));
        return (List<?>) val;
    }
}