[PR #1633] [CLOSED] add --cert for cli #1673

Closed
opened 2026-05-07 01:03:11 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/1633
Author: @Tyler-Hardin
Created: 3/2/2026
Status: Closed

Base: mainHead: cert


📝 Commits (1)

📊 Changes

9 files changed (+95 additions, -13 deletions)

View changed files

📝 client/client.go (+46 -8)
📝 client/client_test.go (+2 -2)
📝 client/config.go (+7 -0)
📝 cmd/config_loader.go (+20 -0)
📝 cmd/publish.go (+8 -1)
📝 cmd/serve_test.go (+1 -1)
📝 cmd/subscribe.go (+8 -1)
📝 go.mod (+1 -0)
📝 go.sum (+2 -0)

📄 Description

I use mTLS for my self hosted server. Would appreciate if you would include support in mainline. Let me know if you see any changes you'd like. Included changes:

  • --cert flag
  • env var NTFY_CERT
  • client config keys cert-file and cert-password

I went with software.sslmate.com/src/go-pkcs12 for pkcs12/cert parsing because the std lib doesn't support sha2, which is standard now.

Thanks for your work on this. Very neat project!

Full disclosure, I used Claude for this. I'm a dev myself, but little experience in Go. I mostly work in Python and Rust. But I reviewed the changes and they do seem sensible to me.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/1633 **Author:** [@Tyler-Hardin](https://github.com/Tyler-Hardin) **Created:** 3/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `cert` --- ### 📝 Commits (1) - [`7935fba`](https://github.com/binwiederhier/ntfy/commit/7935fba9ffaf4bd4e1c596519cefcac69874f725) add --cert for cli ### 📊 Changes **9 files changed** (+95 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `client/client.go` (+46 -8) 📝 `client/client_test.go` (+2 -2) 📝 `client/config.go` (+7 -0) 📝 `cmd/config_loader.go` (+20 -0) 📝 `cmd/publish.go` (+8 -1) 📝 `cmd/serve_test.go` (+1 -1) 📝 `cmd/subscribe.go` (+8 -1) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+2 -0) </details> ### 📄 Description I use mTLS for my self hosted server. Would appreciate if you would include support in mainline. Let me know if you see any changes you'd like. Included changes: * `--cert` flag * env var `NTFY_CERT` * client config keys `cert-file` and `cert-password` I went with `software.sslmate.com/src/go-pkcs12` for pkcs12/cert parsing because the std lib doesn't support sha2, which is standard now. Thanks for your work on this. Very neat project! Full disclosure, I used Claude for this. I'm a dev myself, but little experience in Go. I mostly work in Python and Rust. But I reviewed the changes and they do seem sensible to me. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:03:11 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1673
No description provided.