@@ -545,34 +545,116 @@ public void ConstructorWithFileNameAndPassPhraseShouldBeAbleToReadFileThatIsShar
545
545
}
546
546
}
547
547
548
- /// <summary>
549
- /// A test for opening an openssh v1 keyfile where there is no passphrase.
550
- ///</summary>
551
548
[ TestMethod ( ) ]
552
549
[ Owner ( "bhalbright" ) ]
553
550
[ TestCategory ( "PrivateKey" ) ]
554
- public void TestOpenSshV1KeyFileNoPassphrase ( )
551
+ public void Test_PrivateKey_OPENSSH_ED25519 ( )
555
552
{
556
553
using ( var stream = GetData ( "Key.OPENSSH.ED25519.txt" ) )
557
554
{
558
555
new PrivateKeyFile ( stream ) ;
559
556
}
560
557
}
561
558
562
- /// <summary>
563
- /// A test for opening an openssh v1 keyfile where there is a passphrase.
564
- ///</summary>
565
559
[ TestMethod ( ) ]
566
560
[ Owner ( "bhalbright" ) ]
567
561
[ TestCategory ( "PrivateKey" ) ]
568
- public void TestOpenSshV1KeyFileWithPassphrase ( )
562
+ public void Test_PrivateKey_OPENSSH_ED25519_ENCRYPTED ( )
569
563
{
570
564
using ( var stream = GetData ( "Key.OPENSSH.ED25519.Encrypted.txt" ) )
571
565
{
572
566
new PrivateKeyFile ( stream , "password" ) ;
573
567
}
574
568
}
575
569
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
+
576
658
private void SaveStreamToFile ( Stream stream , string fileName )
577
659
{
578
660
var buffer = new byte [ 4000 ] ;
0 commit comments