@@ -545,34 +545,116 @@ public void ConstructorWithFileNameAndPassPhraseShouldBeAbleToReadFileThatIsShar
545545 }
546546 }
547547
548- /// <summary>
549- /// A test for opening an openssh v1 keyfile where there is no passphrase.
550- ///</summary>
551548 [ TestMethod ( ) ]
552549 [ Owner ( "bhalbright" ) ]
553550 [ TestCategory ( "PrivateKey" ) ]
554- public void TestOpenSshV1KeyFileNoPassphrase ( )
551+ public void Test_PrivateKey_OPENSSH_ED25519 ( )
555552 {
556553 using ( var stream = GetData ( "Key.OPENSSH.ED25519.txt" ) )
557554 {
558555 new PrivateKeyFile ( stream ) ;
559556 }
560557 }
561558
562- /// <summary>
563- /// A test for opening an openssh v1 keyfile where there is a passphrase.
564- ///</summary>
565559 [ TestMethod ( ) ]
566560 [ Owner ( "bhalbright" ) ]
567561 [ TestCategory ( "PrivateKey" ) ]
568- public void TestOpenSshV1KeyFileWithPassphrase ( )
562+ public void Test_PrivateKey_OPENSSH_ED25519_ENCRYPTED ( )
569563 {
570564 using ( var stream = GetData ( "Key.OPENSSH.ED25519.Encrypted.txt" ) )
571565 {
572566 new PrivateKeyFile ( stream , "password" ) ;
573567 }
574568 }
575569
570+ [ TestMethod ( ) ]
571+ [ Owner ( "darinkes" ) ]
572+ [ TestCategory ( "PrivateKey" ) ]
573+ public void Test_PrivateKey_OPENSSH_RSA ( )
574+ {
575+ using ( var stream = GetData ( "Key.OPENSSH.RSA.txt" ) )
576+ {
577+ new PrivateKeyFile ( stream ) ;
578+ }
579+ }
580+
581+ [ TestMethod ( ) ]
582+ [ Owner ( "darinkes" ) ]
583+ [ TestCategory ( "PrivateKey" ) ]
584+ public void Test_PrivateKey_OPENSSH_RSA_ENCRYPTED ( )
585+ {
586+ using ( var stream = GetData ( "Key.OPENSSH.RSA.Encrypted.txt" ) )
587+ {
588+ new PrivateKeyFile ( stream , "12345" ) ;
589+ }
590+ }
591+
592+ [ TestMethod ( ) ]
593+ [ Owner ( "darinkes" ) ]
594+ [ TestCategory ( "PrivateKey" ) ]
595+ public void Test_PrivateKey_OPENSSH_ECDSA ( )
596+ {
597+ using ( var stream = GetData ( "Key.OPENSSH.ECDSA.txt" ) )
598+ {
599+ new PrivateKeyFile ( stream ) ;
600+ }
601+ }
602+
603+ [ TestMethod ( ) ]
604+ [ Owner ( "darinkes" ) ]
605+ [ TestCategory ( "PrivateKey" ) ]
606+ public void Test_PrivateKey_OPENSSH_ECDSA_ENCRYPTED ( )
607+ {
608+ using ( var stream = GetData ( "Key.OPENSSH.ECDSA.Encrypted.txt" ) )
609+ {
610+ new PrivateKeyFile ( stream , "12345" ) ;
611+ }
612+ }
613+
614+ [ TestMethod ( ) ]
615+ [ Owner ( "darinkes" ) ]
616+ [ TestCategory ( "PrivateKey" ) ]
617+ public void Test_PrivateKey_OPENSSH_ECDSA384 ( )
618+ {
619+ using ( var stream = GetData ( "Key.OPENSSH.ECDSA384.txt" ) )
620+ {
621+ new PrivateKeyFile ( stream ) ;
622+ }
623+ }
624+
625+ [ TestMethod ( ) ]
626+ [ Owner ( "darinkes" ) ]
627+ [ TestCategory ( "PrivateKey" ) ]
628+ public void Test_PrivateKey_OPENSSH_ECDSA384_ENCRYPTED ( )
629+ {
630+ using ( var stream = GetData ( "Key.OPENSSH.ECDSA384.Encrypted.txt" ) )
631+ {
632+ new PrivateKeyFile ( stream , "12345" ) ;
633+ }
634+ }
635+
636+ [ TestMethod ( ) ]
637+ [ Owner ( "darinkes" ) ]
638+ [ TestCategory ( "PrivateKey" ) ]
639+ public void Test_PrivateKey_OPENSSH_ECDSA521 ( )
640+ {
641+ using ( var stream = GetData ( "Key.OPENSSH.ECDSA521.txt" ) )
642+ {
643+ new PrivateKeyFile ( stream ) ;
644+ }
645+ }
646+
647+ [ TestMethod ( ) ]
648+ [ Owner ( "darinkes" ) ]
649+ [ TestCategory ( "PrivateKey" ) ]
650+ public void Test_PrivateKey_OPENSSH_ECDSA521_ENCRYPTED ( )
651+ {
652+ using ( var stream = GetData ( "Key.OPENSSH.ECDSA521.Encrypted.txt" ) )
653+ {
654+ new PrivateKeyFile ( stream , "12345" ) ;
655+ }
656+ }
657+
576658 private void SaveStreamToFile ( Stream stream , string fileName )
577659 {
578660 var buffer = new byte [ 4000 ] ;
0 commit comments