Skip to content
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

#3169 fix ssl client certificate #3223

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

zero0cool0
Copy link

@zero0cool0 zero0cool0 commented Dec 5, 2024

Issue #3169

I tested SSL Client Certificate authentication and found that it didn't really work for me.

NCLogin does not set itself as certificateDelegate of NCNetworking hence its delegate methods are never called if NSURLAuthenticationMethodClientCertificate is received in NCNetworking.authenticationChallenge didReceive challenge

UIAlertControllers in NCLogin are not presented on the main thread

These two changes correctly prompt for a certificate file to pick and also ask for a certificate password.

However, once the login flow is restarted after p12Data is set, authenticationChallenge didReceive challenge wasn't called once more, I suspect due to a reuse of the underlying SSL session.

I found that instead of the default action, it is better to cancel the authentication challenge if didAskForClientCertificate() is called on the delegate. This leads to the challenge being received and now properly answered with the client certificate.

@zero0cool0 zero0cool0 changed the title 3169 fix ssl client certificate #3169 fix ssl client certificate Dec 5, 2024
@marinofaggiana
Copy link
Member

@zero0cool0 thanks ! @mpivchev can you check

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.

2 participants