mirror of
https://github.com/danog/tgseclib.git
synced 2025-01-22 14:01:20 +01:00
72a0913d39
CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW and CRYPT_RSA_PUBLIC_FORMAT_PKCS1 produce two very similar looking keys but they are not the same. As dissection OpenSSL's asn1parse would reveal CRYPT_RSA_PUBLIC_FORMAT_PKCS1 has the fact that it is an RSA key embedded within it whereas CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW does not. phpseclib now resolves this ambiguity in the same way that OpenSSH's ssh-keygen does. Despite this change CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW is still incompatible with OpenSSL's rsautl (CRYPT_RSA_PUBLIC_FORMAT_PKCS1 is compatible). I guess this incompatibility isn't just due to the headers but is also due to the overall structure of the format.