mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
certs: do not export keys world-readable in install_key_from_p12
Make sure the exported private key files are readable only by the owner. https://pagure.io/freeipa/issue/6831 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
b9fd123d61
commit
0c5b2c42bf
@@ -73,7 +73,8 @@ def install_key_from_p12(p12_fname, p12_passwd, pem_fname):
|
||||
pwd = ipautil.write_tmp_file(p12_passwd)
|
||||
ipautil.run([paths.OPENSSL, "pkcs12", "-nodes", "-nocerts",
|
||||
"-in", p12_fname, "-out", pem_fname,
|
||||
"-passin", "file:" + pwd.name])
|
||||
"-passin", "file:" + pwd.name],
|
||||
umask=0o077)
|
||||
|
||||
|
||||
def export_pem_p12(pkcs12_fname, pkcs12_pwd_fname, nickname, pem_fname):
|
||||
|
||||
Reference in New Issue
Block a user