TlsAlpn01Challenge extends TokenChallenge { public TlsAlpn01Challenge(Login login, JSON data) { super(login, data); } TlsAlpn01Challenge(Login login, JSON data); byte[] getAcmeValidation(); static final String TYPE; static final String ACME_VALIDATION_OID; static final String ACME_TLS_1_PROTOCOL; }
@Test public void testTlsAlpn01Challenge() { TlsAlpn01Challenge challenge = new TlsAlpn01Challenge(login, getJSON("tlsAlpnChallenge")); assertThat(challenge.getType(), is(TlsAlpn01Challenge.TYPE)); assertThat(challenge.getStatus(), is(Status.PENDING)); assertThat(challenge.getToken(), is(TOKEN)); assertThat(challenge.getAuthorization(), is(KEY_AUTHORIZATION)); assertThat(challenge.getAcmeValidation(), is(AcmeUtils.sha256hash(KEY_AUTHORIZATION))); JSONBuilder response = new JSONBuilder(); challenge.prepareResponse(response); assertThat(response.toString(), sameJSONAs("{}").allowingExtraUnexpectedFields()); }