aboutsummaryrefslogtreecommitdiffstats
path: root/servo/lib/utils.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-09-10 14:15:33 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-09-10 14:15:33 +0300
commit46312d1a167d882253d24b0a883fb2378a070e11 (patch)
treef5aff8d2757d4422cbf5321c1fc76ecc0490ab7c /servo/lib/utils.py
parentbb0ffafe4f040f4e69ecff6624ca73cb3db61bd0 (diff)
downloadServo-46312d1a167d882253d24b0a883fb2378a070e11.tar.gz
Servo-46312d1a167d882253d24b0a883fb2378a070e11.tar.bz2
Servo-46312d1a167d882253d24b0a883fb2378a070e11.zip
Cleanup
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()