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

Cannot find cert.pem in compiled applications #251

Closed
vitornesello opened this issue Aug 2, 2022 · 4 comments
Closed

Cannot find cert.pem in compiled applications #251

vitornesello opened this issue Aug 2, 2022 · 4 comments

Comments

@vitornesello
Copy link

Hello,

MbedTLS.jl is used as a dependency in one of my applications.
We deploy a compiled version of this app using PackageCompiler.jl and everything was working just fine until one of the latest releases of the month of July.

What happens is that this function (code copied below) is trying to access the file cert.pem using the variable Sys.BINDIR as reference path. The problem is that in the compiled app the certificate does not exist in the expected directory.

How could I fix it? I am keen to opening a PR if the problem really comes from this package

function __sslinit__()
    c_send[] = @cfunction(f_send, Cint, (Ptr{Cvoid}, Ptr{UInt8}, Csize_t))
    c_recv[] = @cfunction(f_recv, Cint, (Ptr{Cvoid}, Ptr{UInt8}, Csize_t))
    c_dbg[] = @cfunction(f_dbg, Cvoid, (Any, Cint, Ptr{UInt8}, Cint, Ptr{UInt8}))
    # Note: `MozillaCACerts_jll.cacert` is filled by `__init__`
    fallback = abspath(joinpath(Sys.BINDIR, "..", "share", "julia", "cert.pem"))
    if isfile(MozillaCACerts_jll.cacert)
        DEFAULT_CERT[] = read(MozillaCACerts_jll.cacert, String)
    else
        DEFAULT_CERT[] = read(fallback, String)
    end
    return
end
@vitornesello vitornesello changed the title annot find cert.pem in compiled applications Cannot find cert.pem in compiled applications Aug 2, 2022
@KwatMDPhD
Copy link

Hi, I have the exact same issue her ehttps://github.com/GSEA-MSigDB/GSEA2.jl/issues/59. I hope you could help take care of this.

@KwatMDPhD
Copy link

And this is the same issue #242

@KwatMDPhD
Copy link

This is fixed.

@quinnj quinnj closed this as completed Aug 10, 2022
@vitornesello
Copy link
Author

Thanks, guys

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

No branches or pull requests

3 participants