I want to add trusted certificates from directory. I tried to use:
store = crypto.X509Store()
store.load_locations(None, ".\\certificates")
and then
context = crypto.X509StoreContext(self.store, cert)
where cert is my certificate which I want to verify.
It does completely nothing. I tried to open this directory. I worked. I read those certificates. It worked too. But when I was trying verify my cert by context.verify_certificate() it failed. What do I wrong?
If you check the documentation for X509StoreContext objects, you will see that you need to execute either the "get_verified_chain()" or the "verify_certificate()" method in order to do the verification. So, adding something around those lines should execute your verification :