-
-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot import SSL Client Certificate (.p12) #2975
Comments
I have the same issue on iPhone 15 with iOS 17.5.1. But it show "Connection Error: Bad request" after installing client certificate. I am using Nginx as reverse web proxy and show the following error log from Nginx
With the same client certificate installed in iOS system, my Safari web browser can login to my nextcloud server without any problem. |
Hi, can you post all the commands you used to create the certificates? |
Hi mpivhchev, Thank you for your help! I used theses commands to create the certificate: On our OpenBSD CA server (LibreSSL 3): I have attached the openssl.cnf. I tried to recreate the PKCS12 on AlmaLinux 9 (OpenSSL 3): But I didn't try to recreate a new CA on AlmaLinux 9 and recreate the KEY/CERT. I will test it. |
Hi, I tried on AlmaLinux 9 and it is still not working for me.
Note that this PKCS12 file (nctest-legacy.pfx) is still correctly imported in Safari and client authentication to our NC server succeeds. |
@mpivchev some news here ? |
Is this related to the fix of #2904? With 5.5.2 I don't see the certificate nagging anymore but I haven't yet checked if the certificate is still send when installed. |
Hi, you can use https://www.openlogic.com/blog/mutual-authentication-using-apache-and-web-client to try and set up a certificate. This is only TLS, not mTLS. mTLS should work as well, but not 100% sure on this. Please keep in mind all the questions that are asked when creating the certificates, such as Organization Name, Location, and so on, must be different in both the client and server certificate. Otherwise Apple assumes that the cert is self-signed. |
Finally, you can test if the certificate can be imported into Mac Keychain. If it works there, it should work on iOS, as they use the same algorithms. |
As I understand, mTLS is TLS with client certificate. In normal case, client verifies server’s certificate. When server needs to verify client’s certificate, it is mutual TLS(mTLS) because both side need to verify each other. mTLS is TLS protocol when server requests client certificate. If mTLS is not supported, then client certificate is not supported. |
Hi all, I tried with the latest version of Nextcloud App (5.5.5) and I still have the issue. On Apache logs: So it looks like the Nextcloud app is not sending the client certificate to the server. It still works with Safari. This bug prevents us from deploying Nextcloud on our company ipads, so is there anything I can check/provide to help on this issue? Thank you for your help, |
@ctgvt Hi, did you find solution? Thanks in advance! |
Hi @maxbillcheck, Unfortunately no. We are still waiting for some help so that we can start to use the ios app... |
Hi @ctgvt @maxbillcheck. Can you try this PR and check if it resolves your issue? Thanks. #3223 |
Hi @mpivchev does app with this PR available on TestFlight? |
Steps to reproduce
Expected behaviour
The client certificate should be imported into the app and sent to our NC server when connecting.
Note that the same client certificate is correctly installed through Safari and we correctly connect to our NC server through Safari. It only fails when using the NC ios app.
Actual behaviour
The client certificate is not imported into the app and it is looping on the import steps.
Screenshots
Logs
Reasoning or why should it be changed/implemented?
Environment data
iOS version: IpadOS 17.5.1
Nextcloud iOS app version: 5.4.1
Server operating system: AlmaLinux 8.9
Web server: Apache
Database: Postgres
PHP version: 8.2.16
Nextcloud version: 28.0.2
The text was updated successfully, but these errors were encountered: