Closed ippocratis closed 1 year ago
What OpenSSL version was used to encrypt the certificate?
What OpenSSL version was used to encrypt the certificate?
OpenSSL 1.1.1q 5 Jul 2022 on a raspberrypi
Linux sway 5.15.78-1-MANJARO-ARM-RPI #1 SMP PREEMPT Sat Nov 12 17:13:38 UTC 2022 aarch64 GNU/Linux
I see that cadaver uses 3.0.7 1 Nov 2022 (is that somehow integrated to cadaver?)
I also have 3.1.0 14 Mar 2023 installed in termux
Try re-encrypting your certificate with OpenSSL v3.x. There were changes made to encrypt functionality in the major update and I once get similar problem (not with cert, but with file).
Try re-encrypting your certificate with OpenSSL v3.x. There were changes made to encrypt functionality in the major update and I once get similar problem (not with cert, but with file).
I had to upgrade manjaro arm to get v3.x openssl
Cadaver can now decrypt the cert fine
BUT
This creates another issue more severe for my use case
Android cant decrypt the p12 cert created with openssl 3 when trying to install it in the devices user cert store
I need that for apps and the browser that user the device user cert store for mutual tls authentication
Converting the p12 to legacy mode did the trick
openssl pkcs12 -nodes < your.p12 > /tmp/certbag.pem
openssl pkcs12 -export -legacy -in /tmp/certbag.pem > /tmp/legacy.p12
Thanks
Closing
Problem description
I am running a dockerised webdav server https://github.com/dgraziotin/docker-nginx-webdav-nononsense behind reverse proxy and mutual tls with caddy
I use cadaver on android with termux installed with
pkg install cadaver
also have tsu installedcadaver cant decrypt the p12 client certificate
What steps will reproduce the bug?
Open my webdav server
sudo cadaver https://mywebdav.instance.com
Throws error
Could not open collection: Could not read status line (TLS client certificate was requested): SSL error: sslv3 alert bad certificate
Set the client certificate
set client-cert /path/to/cert/client.p12
Open
open https://mywebdav.instance.com
Teturns
The server has requested a client certificate. Client certificate /storage/emulated/0/cert/v4/client.p12' is encrypted. Decryption password: Password incorrect, try again. Decryption password: Password incorrect, try again.
Cadaver wont accept my correct password and therefore can't decrypt the p12 cert
I also tried to use my .crt and .pem certs but those throw error
Could not load client certificate from /path/to/cert/client.crt'. Could not open collection: Could not read status line (TLS client certificate was requested): SSL error: sslv3 alert bad certificate
What is the expected behavior?
Cadaver should decrypt the client certificate so that it will be provided to the server for mutual authentication and therefore be able to mount the webdav remote
System information
termux-info:
cadaver -V
shows
cadaver 0.24 neon 0.32.5: Library build, IPv6, Expat 2.5.0, zlib 1.2.13, OpenSSL 3.0.7 1 Nov 2022 (thread-safe). readline 8.2
openssl version
Shows
OpenSSL 3.1.0 14 Mar 2023 (Library: OpenSSL 3.1.0 14 Mar 2023)