store.add_cert(intermediate_cert)
store_ctx = X509StoreContext(store, intermediate_server_cert)
print(store_ctx.verify_certificate())
How to validate / verify an X509 Certificate chain of trust in Python?