Esempio n. 1
0
        public async Task SearchErrorTest()
        {
            IOpenPgpKeySearch pgpKeys = new OpenPgpKeySearch();

            await Assert.ThrowsAsync <FormatException>(() => pgpKeys.SearchWebKeyDirectory("notanaddress"));

            var inexistantEmail = "*****@*****.**";
            var inexistantKey   = await pgpKeys.SearchWebKeyDirectory(inexistantEmail);

            Assert.Null(inexistantKey);

            inexistantKey = await pgpKeys.SearchHttpKeyServer(inexistantEmail);

            Assert.Null(inexistantKey);
        }
Esempio n. 2
0
        public async Task SearchWebKeyDirectoryTest()
        {
            IOpenPgpKeySearch pgpKeys = new OpenPgpKeySearch();

            var email = "*****@*****.**";
            var key   = await pgpKeys.SearchWebKeyDirectory(email);

            Assert.NotNull(key);

            Utils.CheckFingerprint(key, "4805b5106ca0eab809e16b798bfc4819e62f4977");
        }