def load_verify_locations(self, cafile=None, capath=None): """Load CA certs into the context. These CA certs are used during verification of the peer's certificate. @param cafile: File containing one or more PEM-encoded CA certificates concatenated together. @type cafile: str @param capath: Directory containing PEM-encoded CA certificates (one certificate per file). @type capath: str """ if cafile is None and capath is None: raise ValueError("cafile and capath can not both be None.") return m2.ssl_ctx_load_verify_locations(self.ctx, cafile, capath)
def load_verify_locations(self, cafile=None, capath=None): """Load CA certs into the context. These CA certs are used during verification of the peer's certificate. @param cafile: File containing one or more PEM-encoded CA certificates concatenated together. @type cafile: str @param capath: Directory containing PEM-encoded CA certificates (one certificate per file). @type capath: str """ if cafile is None and capath is None: raise ValueError("cafile and capath can not both be None.") return m2.ssl_ctx_load_verify_locations(self.ctx, cafile, capath)
def load_verify_locations(self, cafile=None, capath=None): # type: (Optional[AnyStr], Optional[AnyStr]) -> int """Load CA certs into the context. These CA certs are used during verification of the peer's certificate. @param cafile: File containing one or more PEM-encoded CA certificates concatenated together. @param capath: Directory containing PEM-encoded CA certificates (one certificate per file). @return 0 if the operation failed because CAfile and CApath are NULL or the processing at one of the locations specified failed. Check the error stack to find out the reason. 1 The operation succeeded. """ if cafile is None and capath is None: raise ValueError("cafile and capath can not both be None.") return m2.ssl_ctx_load_verify_locations(self.ctx, cafile, capath)
def load_verify_locations(self, cafile=None, capath=None): # type: (Optional[AnyStr], Optional[AnyStr]) -> int """Load CA certs into the context. These CA certs are used during verification of the peer's certificate. @param cafile: File containing one or more PEM-encoded CA certificates concatenated together. @param capath: Directory containing PEM-encoded CA certificates (one certificate per file). @return 0 if the operation failed because CAfile and CApath are NULL or the processing at one of the locations specified failed. Check the error stack to find out the reason. 1 The operation succeeded. """ if cafile is None and capath is None: raise ValueError("cafile and capath can not both be None.") return m2.ssl_ctx_load_verify_locations(self.ctx, cafile, capath)