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) {
128
128
super (runtime , type );
129
129
}
130
130
131
- private X509CRL ( Ruby runtime ) {
132
- super ( runtime , _CRL ( runtime ) );
131
+ java . security . cert . X509CRL getCRL ( ) {
132
+ return getCRL ( false );
133
133
}
134
134
135
- java .security .cert .X509CRL getCRL () {
135
+ private java .security .cert .X509CRL getCRL (boolean allowNull ) {
136
136
if ( crl != null ) return crl ;
137
137
try {
138
138
if ( crlHolder == null ) {
139
+ if ( allowNull ) return null ;
139
140
throw new IllegalStateException ("no crl holder" );
140
141
}
141
142
final byte [] encoded = crlHolder .getEncoded ();
@@ -168,7 +169,8 @@ private X509CRLHolder getCRLHolder(boolean allowNull) {
168
169
169
170
final byte [] getEncoded () throws IOException , CRLException {
170
171
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
172
174
}
173
175
174
176
private byte [] getSignature () {
You can’t perform that action at this time.
0 commit comments