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) {
324324 public IRubyObject to_pem (final ThreadContext context ) {
325325 StringWriter writer = new StringWriter ();
326326 try {
327- PEMInputOutput .writeX509CRL (writer , getCRL () );
327+ PEMInputOutput .writeX509CRL (writer , crl );
328328 return RubyString .newString (context .runtime , writer .getBuffer ());
329329 }
330330 catch (IOException e ) {
Original file line number Diff line number Diff line change 3232import java .io .IOException ;
3333import java .math .BigInteger ;
3434import java .util .ArrayList ;
35-
3635import java .security .KeyFactory ;
3736import java .security .PrivateKey ;
3837import java .security .PublicKey ;
4847
4948import org .bouncycastle .asn1 .ASN1Sequence ;
5049import org .bouncycastle .asn1 .ASN1Set ;
50+ import org .bouncycastle .asn1 .DLSequence ;
5151import org .bouncycastle .asn1 .x500 .X500Name ;
5252import org .bouncycastle .pkcs .PKCS10CertificationRequest ;
5353import org .bouncycastle .pkcs .PKCS10CertificationRequestBuilder ;
6969import org .bouncycastle .operator .ContentVerifierProvider ;
7070import org .bouncycastle .operator .DefaultSignatureAlgorithmIdentifierFinder ;
7171import org .bouncycastle .pkcs .PKCSException ;
72-
7372import org .jruby .ext .openssl .SecurityHelper ;
7473
7574public class PKCS10Request {
@@ -169,7 +168,8 @@ private static SubjectPublicKeyInfo makePublicKeyInfo(PublicKey publicKey) {
169168
170169 public ASN1Sequence toASN1Structure () {
171170 if ( signedRequest == null ) {
172- throw new IllegalStateException ("request not signed" );
171+ // return an empty Sequence
172+ return new DLSequence ();
173173 }
174174 return ASN1Sequence .getInstance ( signedRequest .toASN1Structure () );
175175 }
You can’t perform that action at this time.
0 commit comments