Skip to content

Commit 0941ebb

Browse files
committed
Convert ossl_ns_spki.c to opaque ASN1_STRING
1 parent ba3d1cc commit 0941ebb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/openssl/ossl_ns_spki.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,12 @@ ossl_spki_get_challenge(VALUE self)
230230
NETSCAPE_SPKI *spki;
231231

232232
GetSPKI(self, spki);
233-
if (spki->spkac->challenge->length <= 0) {
233+
if (ASN1_STRING_length(spki->spkac->challenge) <= 0) {
234234
OSSL_Debug("Challenge.length <= 0?");
235235
return rb_str_new(0, 0);
236236
}
237237

238-
return rb_str_new((const char *)spki->spkac->challenge->data,
239-
spki->spkac->challenge->length);
238+
return asn1str_to_str(spki->spkac->challenge);
240239
}
241240

242241
/*

0 commit comments

Comments
 (0)