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

Failed to load trusted CA certificates despite --check-certificate=false #842

Closed
sebalos314 opened this issue Jan 27, 2017 · 9 comments
Closed
Labels

Comments

@sebalos314
Copy link

I use aria2 version 1.25.0 on Redhat Linux 6u7 and I can not avoid the big red

01/27 14:09:19 [ERROR] Failed to load trusted CA certificates from /etc/ssl/certs/ca-certificates.crt. Cause: error:02001002:system library:fopen:No such file or directory

despite having the --check-certificate=false parameter on the command line.

Is there anything I am missing ?

@tatsuhiro-t
Copy link
Collaborator

I'm not familiar with RedHat, doesn't it have certificates under /etc/ssl/certs? Or another place?

@sebalos314
Copy link
Author

sebalos314 commented Jan 30, 2017

Hello Tatsuhiro,
thanks for your reply.

on my system, I have:

# ls /etc/ssl/certs/
ca-bundle.crt  ca-bundle.trust.crt  make-dummy-cert  Makefile  renew-dummy-cert

is that necessary/mandatory to actually have a certificate ?

@tatsuhiro-t
Copy link
Collaborator

Somehow aria2 is configured to load /etc/ssl/certs/ca-certificates.crt.
You can pass --ca-certificate option to read CA files from different path.
CA certificates are either /etc/ssl/certs/ca-bundle.crt or /etc/ssl/certs/ca-bundle.trust.crt.

@sebalos314
Copy link
Author

thanks, this works with ca-bundle.trust.crt

However, for my understanding, what is the point of option ' --check-certificate=false ' then ?

@tatsuhiro-t
Copy link
Collaborator

It just skips server authentication. It does not influence --ca-certificate option.

@sebalos314
Copy link
Author

so it is normal that despite specifying check-cerficiate=false, I still have the ERROR message showing ? I was hoping to not use the certificate at all and optionally use it if considered necessary.

@tatsuhiro-t
Copy link
Collaborator

The default path to certificates are compile time option. I don't know how your aria2c binary was built, it seems to me that it was not built using correct configuration for RedHat system. To fix this issue cleanly, when building aria2, run ./configure without --with-ca-bundle option, or points it to the correct path.
If rebuilding aria2 is not an option, create aria2 configuration file, and write ca-certificate option to the correct path.

@sebalos314
Copy link
Author

thank you. your explanation was correct. I did compile it myself a very long time ago and I did specify --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' because this was automatically done on my ubuntu system at that time... I am running the binary compiled on the ubuntu system on redhat, which explains all the problems... I will rebuild without the option now and update my findings.

@sebalos314
Copy link
Author

I confirm that after recompilation and removing the --with-ca-bundle from configure, the ERROR message is not there anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants