Skip to content

Commit fc1fd19

Browse files
committed
Support loading der files
1 parent 38431b5 commit fc1fd19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/XML/Enc.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,10 @@ sub _load_key {
969969
local $/ = undef;
970970
$text = <$KEY>;
971971
close $KEY;
972+
if ($file =~ m/der$/ ) {
973+
my $priv = Crypt::PK::RSA->new($file);
974+
$text = $priv->export_key_pem('private');
975+
}
972976
if ( $text =~ m/BEGIN ([DR]SA) PRIVATE KEY/ ) {
973977
my $key_used = $1;
974978

0 commit comments

Comments
 (0)