We generate certificates that are intended to be used for server authentication in a couple of places:

- `bin/elasticsearch-certutil http` command  ( See `CertGenUtils.generateSignedCertificate` in `HttpCertificateCommand` )
- TLS auto-configuraion for node startup ( see [`AutoConfigureNode`](https://github.com/elastic/elasticsearch/blob/814f7f9f52cb8c05db6465b9bfc818ea5d76c575/x-pack/plugin/security/cli/src/main/java/org/elasticsearch/xpack/security/cli/AutoConfigureNode.java#L454) )

In these cases we know that the certificate is meant to be used for server authentication, so we can set Extended Key Usage extension to `1.3.6.1.5.5.7.3.1`
x-pack/plugin/security/cli/src/test/java/org/elasticsearch/xpack/security/cli/HttpCertificateCommandTests.java
final HttpCertificateCommand command = new HttpCertificateCommand();
        final MockTerminal terminal = MockTerminal.create();
        terminal.addTextInput("2y");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.ofYears(2)));
        terminal.addTextInput("18m");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.ofMonths(18)));
        terminal.addTextInput("90d");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.ofDays(90)));
        terminal.addTextInput("1y, 6m");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.ofYears(1).withMonths(6)));
        
        terminal.addTextInput("2m & 4d");
        terminal.addTextInput("2m 4d");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.ofMonths(2).withDays(4)));
        terminal.addTextInput("1y, 6m");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.ofYears(1).withMonths(6)));
        
        final Period p = Period.of(randomIntBetween(1, 5), randomIntBetween(0, 11), randomIntBetween(0, 30));
        terminal.addTextInput("");
        assertThat(command.readPeriodInput(terminal, "", p, 1), is(p));
        final int y = randomIntBetween(1, 5);
        final int m = randomIntBetween(1, 11);
        final int d = randomIntBetween(1, 30);
        terminal.addTextInput(y + "y " + m + "m " + d + "d");
        assertThat(command.readPeriodInput(terminal, "", null, 1), is(Period.of(y, m, d)));
        
        final int shortDays = randomIntBetween(1, 20);
        terminal.addTextInput(shortDays + "d");
        terminal.addTextInput("y"); 
        assertThat(command.readPeriodInput(terminal, "", null, 21), is(Period.ofDays(shortDays)));