summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-05-26 10:15:49 -0400
committerJeff Forcier <jeff@bitprophet.org>2023-05-26 10:15:52 -0400
commit63fd01aa39b0d7cba587380a61b38590004c755d (patch)
tree0e01320bbd3f4dd0c9f21b23c44f24fa2df7839a
parent2fd0f5f2fdda49a7739290a68e853b2c7ea4cccf (diff)
Update GSS tests to leverage util._support for finding fixture keys
Re #2245
-rw-r--r--tests/test_kex_gss.py6
-rw-r--r--tests/test_ssh_gss.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_kex_gss.py b/tests/test_kex_gss.py
index c33f4c68..a81b1959 100644
--- a/tests/test_kex_gss.py
+++ b/tests/test_kex_gss.py
@@ -31,7 +31,7 @@ import unittest
import paramiko
-from ._util import needs_gssapi, KerberosTestCase, update_env
+from ._util import needs_gssapi, KerberosTestCase, update_env, _support
class NullServer(paramiko.ServerInterface):
@@ -80,7 +80,7 @@ class GSSKexTest(KerberosTestCase):
def _run(self):
self.socks, addr = self.sockl.accept()
self.ts = paramiko.Transport(self.socks, gss_kex=True)
- host_key = paramiko.RSAKey.from_private_key_file("tests/rsa.key")
+ host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key"))
self.ts.add_server_key(host_key)
self.ts.set_gss_host(self.realm.hostname)
try:
@@ -96,7 +96,7 @@ class GSSKexTest(KerberosTestCase):
Diffie-Hellman Key Exchange and user authentication with the GSS-API
context created during key exchange.
"""
- host_key = paramiko.RSAKey.from_private_key_file("tests/rsa.key")
+ host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key"))
public_host_key = paramiko.RSAKey(data=host_key.asbytes())
self.tc = paramiko.SSHClient()
diff --git a/tests/test_ssh_gss.py b/tests/test_ssh_gss.py
index 27976a8d..b441a225 100644
--- a/tests/test_ssh_gss.py
+++ b/tests/test_ssh_gss.py
@@ -89,7 +89,7 @@ class GSSAuthTest(KerberosTestCase):
def _run(self):
self.socks, addr = self.sockl.accept()
self.ts = paramiko.Transport(self.socks)
- host_key = paramiko.RSAKey.from_private_key_file("tests/rsa.key")
+ host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key"))
self.ts.add_server_key(host_key)
server = NullServer()
self.ts.start_server(self.event, server)
@@ -100,7 +100,7 @@ class GSSAuthTest(KerberosTestCase):
The exception is ... no exception yet
"""
- host_key = paramiko.RSAKey.from_private_key_file("tests/rsa.key")
+ host_key = paramiko.RSAKey.from_private_key_file(_support("rsa.key"))
public_host_key = paramiko.RSAKey(data=host_key.asbytes())
self.tc = paramiko.SSHClient()