Skip to content
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

OpenSSL::TestASN1 regression #18

Closed
mkristian opened this issue Dec 11, 2014 · 4 comments
Closed

OpenSSL::TestASN1 regression #18

mkristian opened this issue Dec 11, 2014 · 4 comments
Milestone

Comments

@mkristian
Copy link
Member

test_decode:
OpenSSL::ASN1::ASN1Error: DER length more than 4 bytes: 126
org/jruby/ext/openssl/ASN1.java:1133:in decode' test/externals/ruby1.9/openssl/test_asn1.rb:176:intest_decode'

test_primitive_cannot_set_infinite_length:
[test/externals/ruby1.9/openssl/test_asn1.rb:237]:
Could set infinite length on primitive value

also see end of https://s3.amazonaws.com/archive.travis-ci.org/jobs/43629181/log.txt

@mkristian mkristian added this to the 0.9.6 milestone Dec 11, 2014
@mkristian mkristian mentioned this issue Dec 11, 2014
@kares
Copy link
Member

kares commented Dec 12, 2014

yep this one I got stuck on ...

I "improved" (at least I think I did) ASN1 handling internally, even got it working for all BCs.

I recall I hit the limits of BC's APIs but was able to get most relevant composites such as ASN1 Sequence/Set ~ right (where not working with infinite lengths previously) - but than this blowed in my face. it kind of seemed like a special handling for a special case, for one imp (can't recall if JRuby or MRI) it's double wrapped in a bit-string for the other it's one less wrapping. really not sure how it could have worked before ;( or there's the other case of me missing something :) !

this definitely needs dedicated time ...

@kares
Copy link
Member

kares commented Dec 12, 2014

also I do see another ASN1 test failure as well :

  1) Error:
test_decode(OpenSSL::TestASN1):
OpenSSL::ASN1::ASN1Error: DER length more than 4 bytes: 126
    org/jruby/ext/openssl/ASN1.java:1098:in `decode'
    /home/kares/workspace/oss/jruby/test/externals/ruby1.9/openssl/test_asn1.rb:176:in `test_decode'

  2) Failure:
test_primitive_cannot_set_infinite_length(OpenSSL::TestASN1) [/home/kares/workspace/oss/jruby/test/externals/ruby1.9/openssl/test_asn1.rb:237]:
Could set infinite length on primitive value

... (simple) fix landing on master

@mkristian
Copy link
Member Author

@kares I looked at a few certificates from rubygems/ssl_cert and they all have those
OCTET STRING, encapsulates { OCTET STRING
the rfc itself is not clear to me: https://www.ipa.go.jp/security/rfc/RFC3280-04EN.html#42102
so the sample CA certificates are the reference for this.

the jruby test needs some adjustments to work, but the actual test will pass now

@kares
Copy link
Member

kares commented Dec 15, 2014

@mkristian you're the man! ... really do not know why I might have changed that - but if all pass no worries

mkristian added a commit to jruby/jruby that referenced this issue Dec 16, 2014
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Dec 16, 2014
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Dec 17, 2014
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Dec 17, 2014
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Dec 19, 2014
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Dec 19, 2014
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Jan 23, 2015
Sponsored by Lookout Inc.
mkristian added a commit to jruby/jruby that referenced this issue Feb 1, 2015
Sponsored by Lookout Inc.
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

No branches or pull requests

2 participants