mirror of
https://gitlab.com/spaceti-app/integrations/acs/colnod-connector.git
synced 2026-07-12 13:10:45 +02:00
SSL socket works
This commit is contained in:
parent
b6c2317757
commit
81a9c66ded
@ -141,14 +141,14 @@ void UnitTest::debugConnection()
|
||||
Content-Length: 164
|
||||
|
||||
{"password":"E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0","username":"spaceti"}*/
|
||||
qDebug() << tmp.toUtf8();
|
||||
qDebug().noquote() << tmp.toUtf8();
|
||||
ssl.write(tmp.toUtf8());
|
||||
QString data;
|
||||
while (ssl.waitForReadyRead() && data.isEmpty())
|
||||
{
|
||||
data.append(ssl.readAll().data());
|
||||
}
|
||||
qDebug() << data;
|
||||
qDebug().noquote() << data;
|
||||
int index = data.lastIndexOf("id");
|
||||
QString tkn = data.mid( index + 5, 36);
|
||||
tkn = tkn + ":";
|
||||
@ -162,7 +162,7 @@ void UnitTest::debugConnection()
|
||||
|
||||
QString token = testAccess->getToken();
|
||||
token = token + ":";*/
|
||||
tmp = "POST /SubjectManager/getSubjects HTTP/1.1\r\nHost: 192.168.1.3:8443\r\nAuthorization: Basic " + tkn.toUtf8().toBase64() + "\r\nUser-Agent: curl/7.65.3\r\nAccept: */*";
|
||||
tmp = "POST /SubjectManager/getSubjects HTTP/1.1\r\nHost: 192.168.1.3:8443\r\nAuthorization: Basic " + tkn.toUtf8().toBase64() + "\r\nUser-Agent: curl/7.65.3\r\nAccept: */*\r\nContent-Type: application/json\r\nContent-Length: 0\r\n\r\n";
|
||||
QFile file("output1234.txt");
|
||||
file.open(QIODevice::ReadWrite);
|
||||
QTextStream st(&file);
|
||||
@ -173,6 +173,8 @@ void UnitTest::debugConnection()
|
||||
while (ssl.waitForReadyRead())
|
||||
qDebug() << ssl.readAll().data();
|
||||
|
||||
qDebug() << ssl.errorString();
|
||||
|
||||
QVERIFY(true);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user