The M2Crypto library has a few CA-related functions on its SSL.Context object, but the documentation is very unclear as to when you would use certain functions and why. In fact, the docs for almost all of them are, "Load CA certs into the context," so it seems possible that they all do the same thing.
There are several examples that use both set_client_CA_list_from_file()
and load_verify_info()
, but there are also other similar functions like load_client_ca()
and load_verify_locations()
.
I am writing both client and server pieces. What functions should I use and why? What specifically do they do?
Edit:
Looking through the code I see:
# Deprecated.
load_client_CA = load_client_ca = set_client_CA_list_from_file
and
# Deprecated.
load_verify_info = load_verify_locations
So that helps a little. This brings us down to two functions: set_client_CA_list_from_file()
and load_verify_locations()
. But I still can't quite tell the difference between the two.