From 46312d1a167d882253d24b0a883fb2378a070e11 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 10 Sep 2015 14:15:33 +0300 Subject: Cleanup --- servo/lib/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'servo/lib/utils.py') 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() -- cgit v1.2.3