Subject: | KeyFile argument does not work |
The documentation shows passing the name of the file containing the private key as an argument named KeyFile. Doing so results in the error: Can't call method "data" on an undefined value at /usr/local/lib64/perl5/Mail/OpenDKIM/Signer.pm line 131
It appears Signer.pm is expecting a Mail::OpenDKIM::PrivateKey to be passed as an argument named Key. I inserted the below in Signer.pm before line 128 to allow both the current and documented functionality.
croak 'Private key not found' unless $args{Key} || ($args{KeyFile} && ($args{Key} = Mail::OpenDKIM::PrivateKey->load(File => $args{KeyFile})));