Skip to content

Conversation

@imiric
Copy link

@imiric imiric commented Dec 8, 2025

This updates the Exoscale DNS script to work with v2 of their API.

I ran the DNS CI workflow in my fork according to the DNS API Dev Guide, and it passed.

The script is very brittle due to parsing JSON with _egrep_o, so any improvement suggestions would be appreciated.

Closes #5165

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Welcome
READ ME !!!!!
Read me !!!!!!
First thing: don't send PR to the master branch, please send to the dev branch instead.
Please read the DNS API Dev Guide.
You MUST pass the DNS-API-Test.
Then reply on this message, otherwise, your code will not be reviewed or merged.
Please also make sure to add/update the usage here: https://github.com/acmesh-official/acme.sh/wiki/dnsapi2
注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

record_name=$(echo "$record" | _egrep_o '"name":"[^"]*"' | cut -d'"' -f4)
record_name_lower=$(echo "$record_name" | tr '[:upper:]' '[:lower:]')
if [ "$record_name_lower" = "$name_lower" ]; then
echo "$record" | _egrep_o '"id":"[^"]*"' | head -n1 | cut -d'"' -f4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use _head_n() function

fi
# Build the message with the actual body or empty line
message=$(printf "%s %s\n%s\n\n\n%s" "$method" "/v2$path" "$data" "$expiration")
signature=$(printf "%s" "$message" | ${ACME_OPENSSL_BIN:-openssl} dgst -sha256 -hmac "$EXOSCALE_SECRET_KEY" -binary | _base64)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use openssl here, use _hmac()

@imiric imiric force-pushed the fix/exoscale-dns branch 2 times, most recently from ea77497 to b986b65 Compare December 9, 2025 08:45
This updates the Exoscale DNS script to work with v2 of their API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants