id_rsaをチェックする Nobuo Danjou openssl rsa -check -in id_rsa-gsg-keypair -noout ↓perlでやると #!/usr/bin/perl use strict; use warnings; use Crypt::OpenSSL::RSA; my $id_rsa = shift; open my $fh, '<', $id_rsa; my $rsa_text = do {local $/;<$fh>}; close $fh; my $key = Crypt::OpenSSL::RSA->new_private_key($rsa_text); if ($key->check_key) { warn 'ok'; } Written on 2008-11-14. Categories: Tags: Next: ec2-fingerprint-key Previous: todo