Skip to content

pkey: avoid using {DH,DSA,RSA}#public_key in docs and tests - #1092

Merged
rhenium merged 1 commit into
ruby:masterfrom
rhenium:ky/pkey-docs-avoid-public-key
Aug 19, 2026
Merged

pkey: avoid using {DH,DSA,RSA}#public_key in docs and tests#1092
rhenium merged 1 commit into
ruby:masterfrom
rhenium:ky/pkey-docs-avoid-public-key

Conversation

@rhenium

@rhenium rhenium commented Aug 14, 2026

Copy link
Copy Markdown
Member

As documented, the #public_key methods on OpenSSL::PKey::{DH,DSA,RSA} are obsolete, as their behavior is inconsistent and better alternatives are available. Remove unnecessary uses from RDoc comments for other methods.

Also add dedicated tests for these methods to confirm the current behavior.

Reported by @junaruga at ruby/drb#53 (comment).

As documented, the #public_key methods on OpenSSL::PKey::{DH,DSA,RSA}
are obsolete, as their behavior is inconsistent and better alternatives
are available. Remove unnecessary uses from RDoc comments for other
methods.

Also add dedicated tests for these methods to confirm the current
behavior.
@junaruga

Copy link
Copy Markdown
Member

Thanks for the PR!

junaruga added a commit to junaruga/ruby-drb that referenced this pull request Aug 18, 2026
OpenSSL::PKey::RSA#public_key is obsolete according to ruby/openssl#1092.
junaruga added a commit to junaruga/ruby-drb that referenced this pull request Aug 18, 2026
OpenSSL::PKey::RSA#public_key is obsolete according to ruby/openssl#1092.
@rhenium

rhenium commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Test failures are unrelated to this change.

@rhenium
rhenium merged commit 2c109b2 into ruby:master Aug 19, 2026
45 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants