public void OpenSshKeyParser_ParseOpenSshKeyFile_sshkeygen_ECDSA_nistp521_Encrypted()
        {
            var data    = TestHelpers.GetResourceData("sshkeygen", "ECDSA.nistp521.Encrypted.txt");
            var keyPair = OpenSshKeyParser.ParseOpenSshKeyFile(data, "password");

            Assert.IsTrue(keyPair != null && keyPair is EcdsaKeyPair);
        }
        public void OpenSshKeyParser_ParseOpenSshKeyFile_sshkeygen_DSA()
        {
            var data    = TestHelpers.GetResourceData("sshkeygen", "DSA.txt");
            var keyPair = OpenSshKeyParser.ParseOpenSshKeyFile(data);

            Assert.IsTrue(keyPair != null && keyPair is DsaKeyPair);
        }
        public void OpenSshKeyParser_ParseOpenSshKeyFile_sshkeygen_ECDSA_nistp384()
        {
            var data    = TestHelpers.GetResourceData("sshkeygen", "ECDSA.nistp384.txt");
            var keyPair = OpenSshKeyParser.ParseOpenSshKeyFile(data);

            Assert.IsTrue(keyPair != null && keyPair is EcdsaKeyPair);
        }
        public void OpenSshKeyParser_ParseOpenSshKeyFile_sshkeygen_ED25519_Encrypted()
        {
            var data    = TestHelpers.GetResourceData("sshkeygen", "ED25519.Encrypted.txt");
            var keyPair = OpenSshKeyParser.ParseOpenSshKeyFile(data, "password");

            Assert.IsTrue(keyPair != null && keyPair is Ed25519KeyPair);
        }
Exemple #5
0
        public void OpenSshKeyParser_ParseOpenSshKeyFile_PuTTYgen_ED25519()
        {
            var data    = TestHelpers.GetResourceData("PuTTYgen", "ED25519.txt");
            var keyPair = OpenSshKeyParser.ParseOpenSshKeyFile(data);

            Assert.IsTrue(keyPair != null && keyPair is Ed25519KeyPair);
        }
Exemple #6
0
        public void OpenSshKeyParser_ParseOpenSshKeyFile_PuTTYgen_RSA_Encrypted()
        {
            var data    = TestHelpers.GetResourceData("PuTTYgen", "RSA.Encrypted.txt");
            var keyPair = OpenSshKeyParser.ParseOpenSshKeyFile(data, "password");

            Assert.IsTrue(keyPair != null && keyPair is RsaKeyPair);
        }
        public void OpenSshKeyParser_ParseOpenSshKeyFile_WithWrongPassphrase_sshkeygen_RSA_Encrypted()
        {
            var data = TestHelpers.GetResourceData("sshkeygen", "RSA.Encrypted.txt");

            OpenSshKeyParser.ParseOpenSshKeyFile(data, "wrong_password");
        }