summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/common/python/pki/crypto.py (renamed from base/common/python/pki/cryptoutil.py)8
-rw-r--r--base/common/python/pki/key.py4
-rw-r--r--base/common/python/pki/kra.py6
-rw-r--r--base/kra/functional/drmtest.py6
4 files changed, 12 insertions, 12 deletions
diff --git a/base/common/python/pki/cryptoutil.py b/base/common/python/pki/crypto.py
index 44adb3fb6..174e681b8 100644
--- a/base/common/python/pki/cryptoutil.py
+++ b/base/common/python/pki/crypto.py
@@ -30,7 +30,7 @@ import subprocess
import tempfile
-class CryptoUtil(object):
+class CryptoProvider(object):
"""
Abstract class containing methods to do cryptographic operations.
"""
@@ -93,9 +93,9 @@ class CryptoUtil(object):
pass
-class NSSCryptoUtil(CryptoUtil):
+class NSSCryptoProvider(CryptoProvider):
"""
- Class that defines NSS implementation of CryptoUtil.
+ Class that defines NSS implementation of CryptoProvider.
Requires an NSS database to have been set up and initialized.
Note that all inputs and outputs are unencoded.
@@ -126,7 +126,7 @@ class NSSCryptoUtil(CryptoUtil):
This method expects a NSS database to have already been created at
certdb_dir with password certdb_password.
"""
- CryptoUtil.__init__(self)
+ CryptoProvider.__init__(self)
self.certdb_dir = certdb_dir
self.certdb_password = certdb_password
self.nonce_iv = "e4:bb:3b:d3:c3:71:2e:58"
diff --git a/base/common/python/pki/key.py b/base/common/python/pki/key.py
index 048cc0d41..af34a7ff4 100644
--- a/base/common/python/pki/key.py
+++ b/base/common/python/pki/key.py
@@ -770,7 +770,7 @@ class KeyClient(object):
1) trans_wrapped_session_key is not provided by caller.
- In this case, the function will call CryptoUtil methods to generate and
+ In this case, the function will call CryptoProvider methods to generate and
wrap the session key. The function will return the KeyData object with
a private_data attribute which stores the unwrapped key information.
@@ -833,7 +833,7 @@ class KeyClient(object):
1) A passphrase is provided by the caller.
- In this case, CryptoUtil methods will be called to create the data to
+ In this case, CryptoProvider methods will be called to create the data to
securely send the passphrase to the DRM. Basically, three pieces of
data will be sent:
diff --git a/base/common/python/pki/kra.py b/base/common/python/pki/kra.py
index e3daabdd3..6559b986b 100644
--- a/base/common/python/pki/kra.py
+++ b/base/common/python/pki/kra.py
@@ -40,13 +40,13 @@ class KRAClient(object):
""" Constructor
:param connection - PKIConnection object with DRM connection info.
- :param crypto - CryptoUtil object. NSSCryptoUtil is provided by
+ :param crypto - CryptoProvider object. NSSCryptoProvider is provided by
default. If a different crypto implementation is
- desired, a different subclass of CryptoUtil must be
+ desired, a different subclass of CryptoProvider must be
provided.
:param transport_cert_nick - identifier for the DRM transport
certificate. This will be passed to the
- CryptoUtil.get_cert() command to get a representation
+ CryptoProvider.get_cert() command to get a representation
of the transport certificate usable for crypto ops.
Note that for NSS databases, the database must have been
initialized beforehand.
diff --git a/base/kra/functional/drmtest.py b/base/kra/functional/drmtest.py
index 9ef096194..abade3511 100644
--- a/base/kra/functional/drmtest.py
+++ b/base/kra/functional/drmtest.py
@@ -33,7 +33,7 @@ See drmtest.readme.txt.
import base64
import pki
-import pki.cryptoutil as cryptoutil
+import pki.crypto
import pki.key as key
import time
@@ -80,11 +80,11 @@ def main():
# create an NSS DB for crypto operations
certdb_dir = "/tmp/drmtest-certdb"
certdb_password = "redhat123"
- cryptoutil.NSSCryptoUtil.setup_database(certdb_dir, certdb_password,
+ pki.crypto.NSSCryptoProvider.setup_database(certdb_dir, certdb_password,
over_write=True)
#create kraclient
- crypto = cryptoutil.NSSCryptoUtil(certdb_dir, certdb_password)
+ crypto = pki.crypto.NSSCryptoProvider(certdb_dir, certdb_password)
kraclient = KRAClient(connection, crypto)
keyclient = kraclient.keys