--mimepart_4d62f47f5d18c_1dc2a8a8d2e3280
Content-Type: text/plain
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline

Bug #4422: [ext/openssl] Fix DSA public key PEM encoding
http://redmine.ruby-lang.org/issues/show/4422

Author: Martin Bosslet
Status: Open, Priority: Normal
Category: ext, Target version: 1.9.3
ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]

Related to http://redmine.ruby-lang.org/issues/show/4421.

The difference is that DSA already uses the "right" function for DER encoding,
but the "wrong" function (PEM_write_bio_DSAPublicKey instead of EM_write_bio_DSA_PUBKEY) for PEM encoding.

Similar to the RSA case, fallbacks in initialize are also re-prioritized
and again this should cause no trouble because initialize recognizes all
of the formats.

Regards,
Martin


----------------------------------------
http://redmine.ruby-lang.org

--mimepart_4d62f47f5d18c_1dc2a8a8d2e3280
Content-Type: text/x-patch; name=fix_dsa_pub_encoding.diff
Content-Transfer-Encoding: Base64
Content-Disposition: attachment; filename=fix_dsa_pub_encoding.diff

SW5kZXg6IHJ1YnkvZXh0L29wZW5zc2wvb3NzbF9wa2V5X2RzYS5jCj09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT0KLS0tIHJ1YnkvZXh0L29wZW5zc2wvb3NzbF9w
a2V5X2RzYS5jCShyZXZpc2lvbiAzMDkzOCkKKysrIHJ1YnkvZXh0L29wZW5z
c2wvb3NzbF9wa2V5X2RzYS5jCSh3b3JraW5nIGNvcHkpCkBAIC0xNjIsMTAg
KzE2NCw2IEBACiAJZHNhID0gUEVNX3JlYWRfYmlvX0RTQVByaXZhdGVLZXko
aW4sIE5VTEwsIG9zc2xfcGVtX3Bhc3N3ZF9jYiwgcGFzc3dkKTsKIAlpZiAo
IWRzYSkgewogCSAgICAodm9pZClCSU9fcmVzZXQoaW4pOwotCSAgICBkc2Eg
PSBQRU1fcmVhZF9iaW9fRFNBUHVibGljS2V5KGluLCBOVUxMLCBOVUxM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