OpenSSL 1.0.0 doesn't use the string "RSA PRIVATE KEY" anymore. Update to allow for this.

This commit is contained in:
Matt Lewandowsky
2011-11-16 20:59:50 -08:00
parent 5fdad592ca
commit 8a41997df2

View File

@@ -8,8 +8,8 @@ require './webmin-lib.pl';
# Validate inputs
$key = $in{'key'} || $in{'keyfile'};
$key =~ s/\r//g;
$key =~ /BEGIN RSA PRIVATE KEY/ &&
$key =~ /END RSA PRIVATE KEY/ || &error($text{'savekey_ekey'});
$key =~ /BEGIN .*PRIVATE KEY/ &&
$key =~ /END .*PRIVATE KEY/ || &error($text{'savekey_ekey'});
if (!$in{'cert_def'}) {
# Make sure cert is valid
$cert = $in{'cert'} || $in{'certfile'};