nextcloud / nextcloud/notify_push

invalid peer certificate contents: invalid peer certificate: UnknownIssuer

Open
#179 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Rust
Stars
344
Forks
64
Avg merge
2d 10h
Merged PRs (30d)
5

Description

Hi,

Set-up is done and correct according to the setup utility, unfortunately when I test with the test_client program I have an error.
Here is my config, followed by the error.
Config

[Unit]
Description = Push daemon for Nextcloud clients

[Service]
Environment=PORT=7867
Environment=NEXTCLOUD_URL=https://nextcloud.xxxxxx.com
Environment=ALLOW_SELF_SIGNED=true
ExecStart=/var/www/nextcloud/apps/notify_push/bin/x86_64/notify_push /var/www/nextcloud/config/config.php
User=www-data

[Install]
WantedBy = multi-user.target

nextcloud.xxxxxx.com is added to my /etc/hosts as 127.0.1.1 nextcloud.xxxxx.com

error

nextcloud@nextcloud:~# ./test_client http://nextcloud.xxxx.com YYYYYY YYYYYYY
[2022-07-25 00:34:41.359171 +02:00] WARN [rustls::conn] /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustls-0.20.2/src/conn.rs:1197: Sending fatal alert BadCertificate
Error:
  x http://nextcloud.xxxxx.com/ocs/v2.php/cloud/capabilities: Connection Failed: tls connection init failed: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
  `-> invalid peer certificate contents: invalid peer certificate: UnknownIssuer

Thank you very much !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the mentioned test_client program and the supplied service configuration, focusing on the rustls UnknownIssuer error. Check how ALLOW_SELF_SIGNED=true is handled and compare it with the certificate and host setup described in the issue; done means the certificate-handling cause and expected behavior are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.