mirror of
https://github.com/imapsync/imapsync.git
synced 2025-06-04 19:57:21 +02:00
Use pure perl code for xoauth2 authmech
This commit is contained in:
parent
5d6bc8149f
commit
a877e6f162
1 changed files with 4 additions and 2 deletions
6
imapsync
6
imapsync
|
@ -8902,6 +8902,7 @@ sub xoauth2
|
|||
require HTML::Entities ;
|
||||
require JSON ;
|
||||
require JSON::WebToken::Crypt::RSA ;
|
||||
require Crypt::OpenSSL::PKCS12 ;
|
||||
require Crypt::OpenSSL::RSA ;
|
||||
require Encode::Byte ;
|
||||
require IO::Socket::SSL ;
|
||||
|
@ -8942,8 +8943,9 @@ sub xoauth2
|
|||
|
||||
$sync->{ debug } and myprint( "Service account: $iss\nKey file: $keyfile\nKey password: $keypass\n");
|
||||
|
||||
# Get private key from p12 file (would be better in perl...)
|
||||
$key = `openssl pkcs12 -in "$keyfile" -nodes -nocerts -passin pass:$keypass -nomacver`;
|
||||
# Get private key from p12 file
|
||||
my $pkcs12 = Crypt::OpenSSL::PKCS12->new_from_file($keyfile);
|
||||
$key = $pkcs12->private_key($keypass);
|
||||
|
||||
$sync->{ debug } and myprint( "Private key:\n$key\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue