public static IRubyObject read_smime(IRubyObject klass, IRubyObject arg) {
BIO in = obj2bio(arg);
BIO[] out = new BIO[]{null};
org.jruby.ext.openssl.impl.PKCS7 pkcs7 = null;
try {
pkcs7 = new SMIME(Mime.DEFAULT).readPKCS7(in, out);
} catch (IOException ioe) {
throw newPKCS7Error(klass.getRuntime(), ioe.getMessage());
} catch (PKCS7Exception pkcs7e) {
throw newPKCS7Exception(klass.getRuntime(), pkcs7e);
}