Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/TestSelfSignedCertificate/TestSelfSignedCertificate.cpp')
-rw-r--r--src/tests/TestSelfSignedCertificate/TestSelfSignedCertificate.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/TestSelfSignedCertificate/TestSelfSignedCertificate.cpp b/src/tests/TestSelfSignedCertificate/TestSelfSignedCertificate.cpp
index 27d798f63..c06080367 100644
--- a/src/tests/TestSelfSignedCertificate/TestSelfSignedCertificate.cpp
+++ b/src/tests/TestSelfSignedCertificate/TestSelfSignedCertificate.cpp
@@ -41,6 +41,20 @@ void TestSelfSignedCertificate::exerciseClientCert() {
QCOMPARE(ok, true);
QCOMPARE(cert.isNull(), false);
QCOMPARE(key.isNull(), false);
+
+ // Test that users can create certificates without an email
+ // address set.
+ ok = SelfSignedCertificate::generateMumbleCertificate(QLatin1String("John Doe"), QString(), cert, key);
+ QCOMPARE(ok, true);
+ QCOMPARE(cert.isNull(), false);
+ QCOMPARE(key.isNull(), false);
+
+ // Test that it's possible to create a client certificate with
+ // both a name and an email.
+ ok = SelfSignedCertificate::generateMumbleCertificate(QLatin1String("John Doe"), QLatin1String("john@doe.family"), cert, key);
+ QCOMPARE(ok, true);
+ QCOMPARE(cert.isNull(), false);
+ QCOMPARE(key.isNull(), false);
}
void TestSelfSignedCertificate::exerciseServerCert() {