@@ -10,33 +10,63 @@ public PasswordAuthenticationMethod CreatePowerUserPasswordAuthenticationMethod(
1010
1111 public PrivateKeyAuthenticationMethod CreateRegularUserPrivateKeyAuthenticationMethod ( )
1212 {
13- var privateKeyFile = GetPrivateKey ( "resources.client.id_rsa " ) ;
13+ var privateKeyFile = GetPrivateKey ( "Data.Key.RSA.txt " ) ;
1414 return new PrivateKeyAuthenticationMethod ( Users . Regular . UserName , privateKeyFile ) ;
1515 }
1616
1717 public PrivateKeyAuthenticationMethod CreateRegularUserMultiplePrivateKeyAuthenticationMethod ( )
1818 {
19- var privateKeyFile1 = GetPrivateKey ( "resources.client.id_rsa " ) ;
20- var privateKeyFile2 = GetPrivateKey ( "resources.client.id_rsa " ) ;
19+ var privateKeyFile1 = GetPrivateKey ( "Data.Key.RSA.txt " ) ;
20+ var privateKeyFile2 = GetPrivateKey ( "Data.Key.RSA.txt " ) ;
2121 return new PrivateKeyAuthenticationMethod ( Users . Regular . UserName , privateKeyFile1 , privateKeyFile2 ) ;
2222 }
2323
2424 public PrivateKeyAuthenticationMethod CreateRegularUserPrivateKeyWithPassPhraseAuthenticationMethod ( )
2525 {
26- var privateKeyFile = GetPrivateKey ( "resources.client.id_rsa_with_pass " , "tester " ) ;
26+ var privateKeyFile = GetPrivateKey ( "Data.Key.RSA.Encrypted.Aes.256.CBC.12345.txt " , "12345 " ) ;
2727 return new PrivateKeyAuthenticationMethod ( Users . Regular . UserName , privateKeyFile ) ;
2828 }
2929
3030 public PrivateKeyAuthenticationMethod CreateRegularUserPrivateKeyWithEmptyPassPhraseAuthenticationMethod ( )
3131 {
32- var privateKeyFile = GetPrivateKey ( "resources.client.id_rsa_with_pass " , null ) ;
32+ var privateKeyFile = GetPrivateKey ( "Data.Key.RSA.Encrypted.Aes.256.CBC.12345.txt " , null ) ;
3333 return new PrivateKeyAuthenticationMethod ( Users . Regular . UserName , privateKeyFile ) ;
3434 }
3535
3636 public PrivateKeyAuthenticationMethod CreateRegularUserPrivateKeyAuthenticationMethodWithBadKey ( )
3737 {
38- var privateKeyFile = GetPrivateKey ( "resources.client.id_noaccess.rsa" ) ;
39- return new PrivateKeyAuthenticationMethod ( Users . Regular . UserName , privateKeyFile ) ;
38+ string unauthorizedKey = """
39+ -----BEGIN RSA PRIVATE KEY-----
40+ MIIEpAIBAAKCAQEAuK3OhcrEnQbbE1+WaE57tUCcTz1yqdE2AwvMfs3of1nyfGcS
41+ Rz9vzAFYU+3uEEApk0QOsIeWCyB2DIlPnlQHyjVWRYPqiTtQ7GmdzbF0ISa7dr23
42+ EHJKgtJxSm3O/sb5F9JyqlxFMhKpz5NVgnN7NFcej93opHZN6h9LaP8cHgJIepWV
43+ IkZqhcv8v6SpAgei0muoPHB+ZA6Rycnv+2//WUBzu+3AJu0PiHUkTTVC8M5svMRV
44+ Ah8CnLsCkAAx7ld4AH7McRlFjymmkwxTSewFJYkloI/OqDOjsmuW03Gmx+eytPWa
45+ HEPGeRhcz1kZ6eOmqrPMlTaLPV1MbFn86nauAQIDAQABAoIBAGEiWauZOMx2nKeV
46+ 8SAvl3V/5DbxVOvotAXqIMbZOl4xSw8Pj1eWEBE26+RJEpvNg5CHjUpgJhT4H978
47+ Ibpe7DH418V8WtGPN0MBUhSsLy54lsUfh7fIxVQFp7zEAMmUkdNrxw+/tE1f75zU
48+ G3efkb+3ysVUrFZEOzrW9uzksT8+gm2Ll/IKuDy2r5k9mJr2cX5OYKxXjtNo5duO
49+ UK+M3jW9Sk1k23Jzpq2GwuJGTTjgtI41ND6CDkrY7COdRQdIx3eQ0uQSXosKNREe
50+ lv0VTlboVyh8JXt+G1tkfA6+Al77/mzycaZVX26C8Io7Y/S7JVG7TT1p1RsFGZM8
51+ kcqvpBkCgYEA7vD3S+6T+8Ql8U877nDi/Ttf16NEUUQllgjWgCP+DiWcqQGWaiaB
52+ JTYyM4Ydb4jy2jAcAdf3HfImE4QO3+u/wyuQrdlvWByHo2NqOxYMdyqKqwGh7qhU
53+ zZFbGfHRD/gV4hWXfzj65wA8uMBVc5J3/ug7nmkTWywiDH/SsPdbxmcCgYEAxd0c
54+ EbJ3dlIyK5Ul1Gw5dASyE91Nx/NHAvB+5QHH5rIe/IqbtxbXmEMKcxwEPN8hvpzs
55+ g487TQFkNPze6X8vZkiuaNLUq9vwRlQwr/LIdjLLKOA69wKfFDSkei8LEMgEz7Wg
56+ ZEm8ifJP75hGozx31bW4dYX2o2X75SbXneMVF1cCgYEAo4h8WJXC5o9KwKtQA1Nz
57+ p4lZgUaW3V/csaD+3djEan5HiEwz3BbaUNOU7DqgLtP2EmrW4FQlJ3Oxp628WHkL
58+ V9KbRMEKOa3dD3BdJm9ivLR7D6sgXy0KTV9skIc2ZM2QfJn2g/ZFkpBQ/sl0MpNO
59+ WUIse7DCtKWx8AgT9VZ2k4UCgYB1G8JSQyPrtwiUvQkP6iIzJdhUY4Z20ulztu4U
60+ EvLC+yfV5x/0xKNELmHP8YQclyA81loyH6NEl488wXIaFznxuxDnX+mZ8moK5ieO
61+ 7A5zzuppvhWIP1fyOJok6xUMkKYwXdqZoP7jUrS3JZShZteyeIS9olVxLpphbZTu
62+ kQnZrwKBgQDhO2+iGXwNLS+OFKwEiyUgvi6jb5OrIsdwWgqaqQarm6h0QWtxrCs6
63+ CMFFEusswZEGRo83J6lQxtcXvhWzTkVPu69J8YvTQqcKlvUSA9TEG2iX9bwXSWzy
64+ LeGb5NjBZ3szfzp9l5Utnj5GuAGoDDDKpf7M6S95Lg6F58Mhd/tCFA==
65+ -----END RSA PRIVATE KEY-----
66+ """ ;
67+
68+ using MemoryStream memoryStream = new ( Encoding . UTF8 . GetBytes ( unauthorizedKey ) ) ;
69+ return new PrivateKeyAuthenticationMethod ( Users . Regular . UserName , new PrivateKeyFile ( memoryStream ) ) ;
4070 }
4171
4272 public PasswordAuthenticationMethod CreateRegulatUserPasswordAuthenticationMethod ( )
0 commit comments