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

Unable to set verifyHostName to false without cert file #6679

Closed
anuruddhal opened this issue Jul 3, 2024 · 1 comment · Fixed by ballerina-platform/module-ballerina-http#2237
Assignees
Labels
Area/Client good first issue Good for newcomers module/http Points/0.5 Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug

Comments

@anuruddhal
Copy link
Member

anuruddhal commented Jul 3, 2024

Description:

Following HTTP client throws the error when setting verifyHostName to false without providing a certificate.

error: Need to configure cert with client SSL certificates file.

final http:Client centralAPI = check new ("https://0.0.0.0:7070", {
    httpVersion: "1.1",
    secureSocket: {
        verifyHostName: false
    }
});

It works when we provide a cert to secureSocket config.

final http:Client centralAPI = check new ("https://0.0.0.0:7070", {
    httpVersion: "1.1",
    secureSocket: {
        cert: "resources/security/client.cer",
        verifyHostName: false
    }
});

Steps to reproduce:

Affected Versions:
Ballerina 2201.9.0 (Swan Lake Update 9)
Language specification 2024R1
Update Tool 1.4.2

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Copy link

github-actions bot commented Dec 5, 2024

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

@TharmiganK TharmiganK added the Reason/EngineeringMistake The issue occurred due to a mistake made in the past. label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Client good first issue Good for newcomers module/http Points/0.5 Reason/EngineeringMistake The issue occurred due to a mistake made in the past. Type/Bug
Projects
Status: Done
2 participants