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

RDK-56804: Implement Authentication Callback #6169

Draft
wants to merge 5 commits into
base: sprint/25Q1
Choose a base branch
from

Conversation

JackHowgateCC
Copy link
Contributor

Implemented authenticationCallback in WebKitImplementation in order to call webkit_authenticate with a pk12 certificate instead of a nullptr placeholder. Reverts back to previous functionality if Glib version is less than 2.72 or if a certificate cannot be obtained.

Reason for Change: Required as Webkit 2.38+ and libsoup3 don't automatically fall back to user certs provided by TLS envs
Risks: Medium
Priority: P1

…o call webkit_authenticate with a pk12 certificate instead of a nullptr placeholder. Reverts back to previous functionality if Glib version is less than 2.72 or if a certificate cannot be obtained.
…o call webkit_authenticate with a pk12 certificate instead of a nullptr placeholder. Reverts back to previous functionality if Glib version is less than 2.72 or if a certificate cannot be obtained.
out:
if (error)
{
TRACE(Trace::Information ("AUTHENTICATION:Cert load failed. %s", error ? error->message : "unknown"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code path should be taken if cert is null too.

else
{
TRACE(Trace::Information ("AUTHENTICATION:Sending cert to webkit"));
webkit_authentication_request_authenticate(request, webkit_credential_new_for_certificate(cert, WEBKIT_CREDENTIAL_PERSISTENCE_NONE));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe cert and credential need to be unrefed after providing to webkit_authentication_request_authenticate().

…r is sent in the event that no cert object is produced and fixed trace logs
@JackHowgateCC JackHowgateCC requested a review from emutavchi March 28, 2025 10:00
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