Skip to content

Commit 3c92fb8

Browse files
committed
If data is not provided, extract it from the PKCS7 instance.
Fixes #132.
1 parent 17eba7d commit 3c92fb8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/jruby/ext/openssl/PKCS7.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ public static IRubyObject write_smime(IRubyObject self, IRubyObject[] args) {
190190
default: pkcs7 = (PKCS7) args[0];
191191
}
192192

193+
if (data.isNil()) data = pkcs7.getData();
194+
193195
final int flg = flags.isNil() ? 0 : RubyNumeric.fix2int(flags);
194196

195197
String smime = "";

0 commit comments

Comments
 (0)