make ip-whitelisting configurable for DNS TransIP
i need to use the TransIP API without a whitelisted IP because of dynamic IP. it wasn't possible to configure this without changing the dns_transip.sh script, so i made the existing variable configurable, yet retain the default of false
fix the ci checks first: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test
getting the CI to run correctly took more work then the actual change, since the TransIP API requires a keyfile, and not a variable, so i added some code to create a keyfile from the base64 encoded keyfile in the secrets..
i tried to decode this with the base64 -d command, but that isn't available by default on the BSD OS-es, but then i found the _dbase64 function in acme.sh which uses openssl and works as expected.
the workflow is currently running, and i expect it to complete successfully, since it managed to get through the whole workflow before removing a bunch of _debug messages, and the last rebase to upstream/dev of course..
@Neilpang just did a new rebase, could you approve the workflow?
@Neilpang CI checks are all fixed
it's a bit of a learning curve, i use bash quite a lot for scripting, but not so much the POSIX variant, and mostly on Debian, Ubuntu and Fedora. thanks for pointing me in the right direction!
can we delete the temp key file ?
Well, I was thinking about that, but it should only delete the file during the test run, otherwise people lose their private key, so I figured since it's a short lived VM, and the files are rather small, I could just let the destruction of the VM handle that. But now that I think of it, it's actually a new feature where you could have the private key on a local webserver, so then it should be cleaned, and documented that you could also use a URL for the key.
You think I should check for http:// as well then? Or just http?
I'll add the changes tomorrow probably..
delete the temp key file only when it's downloaded from web. If the file is not a URL, don't delete it.
yeah, but after downloading the file the original URL is "gone" since the variable which holds the URL gets replaced with the tempfile location
Apparently Solaris doesn't accept the CA for transfer.sh so i used PasteBin instead, also had to change the delete function a bit to make sure the URL gets restored after deleting the temp-file.
Right now the checks are all on green.. :-D