Skip to content

dns_yc: fix key handling and unify add/rm key preparation#6783

Closed
zhuravlev-nik wants to merge 2 commits intoacmesh-official:masterfrom
zhuravlev-nik:fix-dns-yc-key-handling
Closed

dns_yc: fix key handling and unify add/rm key preparation#6783
zhuravlev-nik wants to merge 2 commits intoacmesh-official:masterfrom
zhuravlev-nik:fix-dns-yc-key-handling

Conversation

@zhuravlev-nik
Copy link

Previously:

  • YC_SA_Key_File was removed unconditionally after signing,
    which deleted user-provided key files when using
    YC_SA_Key_File_Path.
  • dns_yc_rm() did not prepare the key file the same way as
    dns_yc_add(), which could lead to inconsistent behavior
    depending on call order.

Changes:

  • Do not delete persistent YC_SA_Key_File_Path.
  • Prepare key material consistently in both add() and rm().
  • Use internal _mktemp() for temporary key files created
    from YC_SA_Key_File_PEM_b64.
  • Clean up temporary key files via POSIX-compatible trap.

The change is backward compatible and preserves existing
configuration behavior.

root added 2 commits February 11, 2026 18:22
Do not delete user-provided YC_SA_Key_File_Path.
Prepare key file in dns_yc_rm same as dns_yc_add.
Use mktemp for PEM_b64 key.
Cleanup via trap.
@github-actions
Copy link

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, 都必须确保通过这个测试.

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.

1 participant