mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:36:44 +02:00
remove old gnutls code from domain-server
This commit is contained in:
parent
9bc95a0fc1
commit
e835b5ccf3
1 changed files with 4 additions and 23 deletions
|
@ -133,33 +133,14 @@ bool DomainServer::optionallyReadX509KeyAndCertificate() {
|
||||||
QString keyPath = _settingsManager.getSettingsMap().value(X509_PRIVATE_KEY_OPTION).toString();
|
QString keyPath = _settingsManager.getSettingsMap().value(X509_PRIVATE_KEY_OPTION).toString();
|
||||||
|
|
||||||
if (!certPath.isEmpty() && !keyPath.isEmpty()) {
|
if (!certPath.isEmpty() && !keyPath.isEmpty()) {
|
||||||
// the user wants to use DTLS to encrypt communication with nodes
|
// the user wants to use the following cert and key for HTTPS
|
||||||
|
// this is used for Oauth callbacks when authorizing users against a data server
|
||||||
// let's make sure we can load the key and certificate
|
// let's make sure we can load the key and certificate
|
||||||
// _x509Credentials = new gnutls_certificate_credentials_t;
|
|
||||||
// gnutls_certificate_allocate_credentials(_x509Credentials);
|
|
||||||
|
|
||||||
QString keyPassphraseString = QProcessEnvironment::systemEnvironment().value(X509_KEY_PASSPHRASE_ENV);
|
QString keyPassphraseString = QProcessEnvironment::systemEnvironment().value(X509_KEY_PASSPHRASE_ENV);
|
||||||
|
|
||||||
qDebug() << "Reading certificate file at" << certPath << "for DTLS.";
|
qDebug() << "Reading certificate file at" << certPath << "for HTTPS.";
|
||||||
qDebug() << "Reading key file at" << keyPath << "for DTLS.";
|
qDebug() << "Reading key file at" << keyPath << "for HTTPS.";
|
||||||
|
|
||||||
// int gnutlsReturn = gnutls_certificate_set_x509_key_file2(*_x509Credentials,
|
|
||||||
// certPath.toLocal8Bit().constData(),
|
|
||||||
// keyPath.toLocal8Bit().constData(),
|
|
||||||
// GNUTLS_X509_FMT_PEM,
|
|
||||||
// keyPassphraseString.toLocal8Bit().constData(),
|
|
||||||
// 0);
|
|
||||||
//
|
|
||||||
// if (gnutlsReturn < 0) {
|
|
||||||
// qDebug() << "Unable to load certificate or key file." << "Error" << gnutlsReturn << "- domain-server will now quit.";
|
|
||||||
// QMetaObject::invokeMethod(this, "quit", Qt::QueuedConnection);
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// qDebug() << "Successfully read certificate and private key.";
|
|
||||||
|
|
||||||
// we need to also pass this certificate and private key to the HTTPS manager
|
|
||||||
// this is used for Oauth callbacks when authorizing users against a data server
|
|
||||||
|
|
||||||
QFile certFile(certPath);
|
QFile certFile(certPath);
|
||||||
certFile.open(QIODevice::ReadOnly);
|
certFile.open(QIODevice::ReadOnly);
|
||||||
|
|
Loading…
Reference in a new issue