Subject: | Building a PKCS10 object from an RSA destroys the RSA object |
as seen here if I build the PKCS10 object and then later try to dump the key as a string, I get no content.
perl -Maliased=Crypt::OpenSSL::RSA -Maliased=Crypt::OpenSSL::PKCS10 -E 'my $rsa = RSA->generate_key(4096); PKCS10->new_from_rsa($rsa); say $rsa->get_private_key_string'
Without generating the PKCS10 object (or alternatively, by "cloning" the RSA object) I can print the key just fine.
This is a surprising result and IMO should be fixed.