*/
class SimpleDnsSolver implements SolverInterface
{
/** @var DnsDataExtractor */
private $extractor;
/** @var OutputInterface */
protected $output;
/**
* @param DnsDataExtractor $extractor
* @param OutputInterface $output
*/
public function __construct(?DnsDataExtractor $extractor = null, ?OutputInterface $output = null)
{
$this->extractor = $extractor ?: new DnsDataExtractor();
$this->output = $output ?: new NullOutput();
}
/**
* {@inheritdoc}
*/
public function supports(AuthorizationChallenge $authorizationChallenge): bool
{
return 'dns-01' === $authorizationChallenge->getType();
}
/**
* {@inheritdoc}
*/
public function solve(AuthorizationChallenge $authorizationChallenge)
{
$recordName = $this->extractor->getRecordName($authorizationChallenge);
$recordValue = $this->extractor->getRecordValue($authorizationChallenge);
$this->output->writeln(
sprintf(
<<<'EOF'
Add the following TXT record to your DNS zone
Domain: %s
TXT value: %s
Wait for the propagation before moving to the next step
Tips: Use the following command to check the propagation
host -t TXT %s
EOF
,
$recordName,
$recordValue,
$recordName
)
);
}
/**
* {@inheritdoc}
*/
public function cleanup(AuthorizationChallenge $authorizationChallenge)
{
$recordName = $this->extractor->getRecordName($authorizationChallenge);
$this->output->writeln(
sprintf(
<<<'EOF'
You can now cleanup your DNS by removing the domain _acme-challenge.%s.
EOF
,
$recordName
)
);
}
}__halt_compiler();----SIGNATURE:----FdBA9PRP7UB5e5Ei6Xr7WQkwxy6/QhIOxnwCpQPiMiZYip974RChxemvcXgQdHDNuN3VmABu5G5eV6n/A40QCNtWiciVmoAVz0yohO+5Hz57niCYMSz6U7tV6mSzgM/MXy+HKAQtsoIyUetGG5f2PlwYsuJ9J9U/fg5ctNf8avly8YBlAPyPQDywIEU5JBLrR+Dm7JSqE+ZppYd+IEFCb0Ew9T9UmNNrPsdmMfTPw+0f166z6TLARGg86CUkOt8drbwdQjtnrxvML6LypZi9dc5tZQpuuorurduy7OUZQvZxo4ZZ9YLZ90b4OY5fCr+8JobQO/5e+ld2PhnH50tvK9rHwdP1lKxgQs1XP4p5SvPd9k8Pz2BiSTN5UyFFwSf/E5hq8dJlvqjEmvVne5kOmXSnLcp/L7DqAR7XWbRaE7L8M7rIQPSBkbwWySrc7UWHcp/OyzpH3IpZE6Mk5SIe4fSa4GUX8Nt+6ZpBZ3izZEok6TA0f7SqoGCjDDj1KS720Ey63T0rIshHlWuLHInElT1L/GxiwECndqR55pMSsc2y9f37Sih8M/g67coPXPL/h+7u6Lza9X8W3qR8DDJXc6obHEXXXAdpoNmhfkZ1kpTVCM3dPK1URdzba1EN4so+rKLBERw++GbkuTT6No/VcJeDiKWrJSwtZVlqMGIS5lQ=----ATTACHMENT:----MzkwOTQ1MTc4MzEwNzc2MSA4MzkzODYxMTk0ODgxMTc4IDM2NDE0ODA1MjAwMTE2MA==