We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 588f798 commit aca089cCopy full SHA for aca089c
src/main/java/org/jruby/ext/openssl/X509Extensions.java
@@ -838,8 +838,8 @@ public IRubyObject to_der() {
838
final ASN1EncodableVector vec = new ASN1EncodableVector();
839
try {
840
vec.add( getRealOid() );
841
- if ( critical != null ) { // NOTE: likely a hack Boolean.FALSE should also get skipped
842
- vec.add(critical.booleanValue() ? DERBoolean.TRUE : DERBoolean.FALSE);
+ if ( critical != null && critical.booleanValue() ) {
+ vec.add( DERBoolean.TRUE );
843
}
844
vec.add( new DEROctetString(getRealValueBytes()) );
845
return RubyString.newString(getRuntime(), new DLSequence(vec).getEncoded(ASN1Encoding.DER));
0 commit comments