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

Allow user to set CAPATH/CAINFO #144

Merged
merged 2 commits into from
May 5, 2024
Merged

Conversation

mulimoen
Copy link
Collaborator

@mulimoen mulimoen commented May 5, 2024

This let's one set the certificate for curl, as this is not done by default. The certificate can be set either programatically by the safe wrapper

    netcdf::rc::set("HTTP.SSL.CAPATH", "/etc/ssl/certs/").unwrap();

by using the unsafe c-function

    unsafe {
        let path = c"HTTP.SSL.CAPATH";
        let value = c"/etc/ssl/certs/";
        let ret = netcdf_sys::nc_rc_set(path.as_ptr(), value.as_ptr());
        assert_eq!(ret, 0);
    }

or by setting the information in ~/.ncrc:

HTTP.SSL.CAPATH=/etc/ssl/certs/

Fixes #141

@mulimoen mulimoen merged commit 9ffb968 into georust:master May 5, 2024
13 checks passed
@mulimoen mulimoen deleted the fix-capath branch May 5, 2024 14:50
@jreniel jreniel mentioned this pull request May 5, 2024
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.

Reading OpenDAP
2 participants