File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/main/java/org/jruby/ext/openssl Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ public IRubyObject initialize_copy(final IRubyObject obj) {
324
324
public IRubyObject to_pem (final ThreadContext context ) {
325
325
StringWriter writer = new StringWriter ();
326
326
try {
327
- PEMInputOutput .writeX509CRL (writer , getCRL () );
327
+ PEMInputOutput .writeX509CRL (writer , crl );
328
328
return RubyString .newString (context .runtime , writer .getBuffer ());
329
329
}
330
330
catch (IOException e ) {
Original file line number Diff line number Diff line change 32
32
import java .io .IOException ;
33
33
import java .math .BigInteger ;
34
34
import java .util .ArrayList ;
35
-
36
35
import java .security .KeyFactory ;
37
36
import java .security .PrivateKey ;
38
37
import java .security .PublicKey ;
48
47
49
48
import org .bouncycastle .asn1 .ASN1Sequence ;
50
49
import org .bouncycastle .asn1 .ASN1Set ;
50
+ import org .bouncycastle .asn1 .DLSequence ;
51
51
import org .bouncycastle .asn1 .x500 .X500Name ;
52
52
import org .bouncycastle .pkcs .PKCS10CertificationRequest ;
53
53
import org .bouncycastle .pkcs .PKCS10CertificationRequestBuilder ;
69
69
import org .bouncycastle .operator .ContentVerifierProvider ;
70
70
import org .bouncycastle .operator .DefaultSignatureAlgorithmIdentifierFinder ;
71
71
import org .bouncycastle .pkcs .PKCSException ;
72
-
73
72
import org .jruby .ext .openssl .SecurityHelper ;
74
73
75
74
public class PKCS10Request {
@@ -169,7 +168,8 @@ private static SubjectPublicKeyInfo makePublicKeyInfo(PublicKey publicKey) {
169
168
170
169
public ASN1Sequence toASN1Structure () {
171
170
if ( signedRequest == null ) {
172
- throw new IllegalStateException ("request not signed" );
171
+ // return an empty Sequence
172
+ return new DLSequence ();
173
173
}
174
174
return ASN1Sequence .getInstance ( signedRequest .toASN1Structure () );
175
175
}
You can’t perform that action at this time.
0 commit comments