Skip to content

Commit add42a2

Browse files
committed
fix: PEM_read_bio_CMS was replaced with SMIME_read_CMS
1 parent b965afd commit add42a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/openssl/ossl_cms.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "ossl.h"
1313

1414
#if !defined(OPENSSL_NO_CMS)
15+
1516
/*
1617
* The CMS_ContentInfo is the primary data structure which this module creates and maintains
1718
* Is is called OpenSSL::CMS::ContentInfo in ruby.
@@ -105,7 +106,7 @@ ossl_cmsci_to_pem(VALUE self)
105106
if (!(out = BIO_new(BIO_s_mem()))) {
106107
ossl_raise(eCMSError, NULL);
107108
}
108-
if (!PEM_write_bio_CMS(out, cmsci)) {
109+
if (!SMIME_write_CMS(out, cmsci, /* data */NULL, /*flags*/0)) {
109110
BIO_free(out);
110111
ossl_raise(eCMSError, NULL);
111112
}
@@ -175,7 +176,7 @@ ossl_cmsci_initialize(int argc, VALUE *argv, VALUE self)
175176
return self;
176177
arg = ossl_to_der_if_possible(arg);
177178
in = ossl_obj2bio(&arg);
178-
c1 = PEM_read_bio_CMS(in, &cms, NULL, NULL);
179+
c1 = SMIME_read_CMS(in, NULL);
179180
if (!c1) {
180181
OSSL_BIO_reset(in);
181182
c1 = d2i_CMS_bio(in, &cms);

0 commit comments

Comments
 (0)