Skip to content

OpenSSL::Timestamp is missing #372

Closed

Description

@gettalong

I'm using the OpenSSL::Timestamp class in my library to generate timestamp request and process their response. When trying to run this on JRuby I'm running into the issue that OpenSSL::Timestamp is missing:

irb(main):001> RUBY_VERSION
=> "4.0.0"
irb(main):002> JRUBY_VERSION
=> "10.1.1.0"
irb(main):003> require 'openssl'
=> true
irb(main):004> JOpenSSL::VERSION
=> "0.16.2"
irb(main):005> OpenSSL::Timestamp
org/jruby/RubyModule.java:4849:in 'const_missing': uninitialized constant OpenSSL::Timestamp (NameError)

Is there an alternative that can/should be used on JRuby? Or is this not yet implemented?

Activity

  1. headius commented on Sep 18, 2026

    @headius
    Member

    New one to me! Probably not hard to add. I'll look into an alternative for you.

  2. headius commented on Sep 18, 2026

    @headius
    Member

    jruby-openssl uses BouncyCastle for much of its implementation, so this should just be another place where we need to wrap the TSA support provided by BC.

    For reference, this is the source in CRuby:

    https://github.com/ruby/ruby/blob/7bb18ed2bb5e00bda24526ff72515c9f1909bda2/ext/openssl/ossl_ts.c

    A pretty decent article about using BC for TSA:

    https://patchmypc.com/blog/demystifying-timestamping-securing-scripts-cab/

    The short-term workaround would be to simply wrap those classes with Ruby code, but obviously we need to get this officially added.

  3. kares commented on Sep 18, 2026

    @kares
    Member

    also missed this one, JOSSL isn't OpenSSL 3.0 compatible yet but this is actually older API.
    seems fairly straight-forward - going to attempt to ship the first version in next release.

  4. self-assigned this
    on Sep 18, 2026
  5. added this to the 0.19.2 milestone on Sep 22, 2026
  6. linked a pull request that will close this issue[feat] support OpenSSL::Timestamp #378on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions