aboutsummaryrefslogtreecommitdiffstats
path: root/servo/lib/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'servo/lib/utils.py')
-rw-r--r--servo/lib/utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/servo/lib/utils.py b/servo/lib/utils.py
index ed77897..bd6a99f 100644
--- a/servo/lib/utils.py
+++ b/servo/lib/utils.py
@@ -29,6 +29,15 @@ from django.db.models import Model
from django.core.serializers.json import DjangoJSONEncoder
+def strip_keypass(keypass, infile, outfile):
+ """
+ Strips a passphrase from a private key
+ """
+ import subprocess
+ keypass = self.cleaned_data['gsx_keypass']
+ subprocess.call(['openssl', 'rsa', '-passin',
+ 'pass:' + keypass, '-in', infile, '-out', outfile])
+
def multiprint(*args):
"""
Emulate JS console.log()