We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents df9cb6a + 8997f6d commit cb46c9dCopy full SHA for cb46c9d
ext/openssl/ossl_pkcs7.c
@@ -510,6 +510,8 @@ ossl_pkcs7_get_detached(VALUE self)
510
{
511
PKCS7 *p7;
512
GetPKCS7(self, p7);
513
+ if (!PKCS7_type_is_signed(p7))
514
+ return Qfalse;
515
return PKCS7_get_detached(p7) ? Qtrue : Qfalse;
516
}
517
test/openssl/test_pkcs7.rb
@@ -265,6 +265,7 @@ def test_data
265
266
p7 = OpenSSL::PKCS7.new(asn1)
267
assert_equal(:data, p7.type)
268
+ assert_equal(false, p7.detached)
269
assert_equal(false, p7.detached?)
270
# Not applicable
271
assert_nil(p7.certificates)
0 commit comments