Skip to content

Fix OpenSSL::X509::CRL#to_pem when building CRL from scratch #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smortex
Copy link

@smortex smortex commented Jun 29, 2025

When building an CRL from scratch, the crl member variable has no value, and when calling to_pem on the object, the following value is returned instead of the actual CRL:

-----BEGIN X509 CRL-----
MAA=
-----END X509 CRL-----

The function getCRL() return the crl member variable if it is non-null, and generate the CRL and store it in this variable otherwise. It seems adequate to use this getter function rather than accessing the member variable directly.

Fixes #163

When building an CRL from scratch, the `crl` member variable has no
value, and when calling `to_pem` on the object, the following value is
returned instead of the actual CRL:

```
-----BEGIN X509 CRL-----
MAA=
-----END X509 CRL-----
```

The function `getCRL()` return the `crl` member variable if it is
non-null, and generate the CRL and store it in this variable otherwise.
It seems adequate to use this getter function rather than accessing the
member variable directly.

Fixes jruby#163
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.

Inconsistent handling of internal state in CRL
1 participant