mirror of
https://github.com/shred/acme4j.git
synced 2025-12-13 11:14:02 +08:00
Add SERVFAIL support to challtestsrv client
This commit is contained in:
@@ -163,6 +163,32 @@ public class BammBammClient {
|
||||
sendRequest("clear-cname", jb.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulates a SERVFAIL for the given domain.
|
||||
*
|
||||
* @param domain
|
||||
* Domain that will give a SERVFAIL response
|
||||
* @since 2.9
|
||||
*/
|
||||
public void dnsAddServFailRecord(String domain) throws IOException {
|
||||
JSONBuilder jb = new JSONBuilder();
|
||||
jb.put("host", domain);
|
||||
sendRequest("set-servfail", jb.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a SERVFAIL Record from the DNS.
|
||||
*
|
||||
* @param domain
|
||||
* Domain to remove the SEVFAIL Record from
|
||||
* @since 2.9
|
||||
*/
|
||||
public void dnsRemoveServFailRecord(String domain) throws IOException {
|
||||
JSONBuilder jb = new JSONBuilder();
|
||||
jb.put("host", domain);
|
||||
sendRequest("clear-servfail", jb.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a certificate for TLS-ALPN tests.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user