File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/main/java/org/jruby/ext/openssl Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,15 @@ public X509CRL(Ruby runtime, RubyClass type) {
128128 super (runtime , type );
129129 }
130130
131- private X509CRL ( Ruby runtime ) {
132- super ( runtime , _CRL ( runtime ) );
131+ java . security . cert . X509CRL getCRL ( ) {
132+ return getCRL ( false );
133133 }
134134
135- java .security .cert .X509CRL getCRL () {
135+ private java .security .cert .X509CRL getCRL (boolean allowNull ) {
136136 if ( crl != null ) return crl ;
137137 try {
138138 if ( crlHolder == null ) {
139+ if ( allowNull ) return null ;
139140 throw new IllegalStateException ("no crl holder" );
140141 }
141142 final byte [] encoded = crlHolder .getEncoded ();
@@ -168,7 +169,8 @@ private X509CRLHolder getCRLHolder(boolean allowNull) {
168169
169170 final byte [] getEncoded () throws IOException , CRLException {
170171 if ( crlHolder != null ) return crlHolder .getEncoded ();
171- return getCRL ().getEncoded ();
172+ java .security .cert .X509CRL crl = getCRL (true );
173+ return crl == null ? new byte [0 ] : crl .getEncoded (); // TODO CRL.new isn't like MRI
172174 }
173175
174176 private byte [] getSignature () {
You can’t perform that action at this time.
0 commit comments