refactor LoadCheckX509 into safer AuthSSL::parseX509DetailsFromFile

This commit is contained in:
Gioacchino Mazzurco 2019-05-14 22:05:42 +02:00
parent 0c097c2080
commit 16d606b513
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
5 changed files with 65 additions and 49 deletions

View file

@ -115,14 +115,6 @@ bool getX509id(X509 *x509, RsPeerId &xid);
int pem_passwd_cb(char *buf, int size, int rwflag, void *password);
/** This function loads the X509 certificate from the file, and checks the
* certificate.
* Not dependent on sslroot. load, and detroys the X509 memory. */
int LoadCheckX509(
const char* cert_file, RsPgpId& issuer, std::string& location,
RsPeerId& userId );
std::string getX509NameString(X509_NAME *name);
std::string getX509CNString(X509_NAME *name);
std::string getX509TypeString(X509_NAME *name, const char *type, int len);