Skip to content

Commit 59ca29f

Browse files
committed
scan_ext_flags(): There is no libctx in x509 anymore
Fixes a0945b6
1 parent 646bf5a commit 59ca29f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎crypto/x509/v3_purp.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,10 @@ static void scan_ext_flags(const X509 *x509, uint32_t *flags)
514514
* unsupported-critical check for this and every later extension.
515515
*/
516516
if (h == NULL) {
517-
if (RAND_bytes_ex(x509->libctx, (unsigned char *)k, sizeof(k), 0) <= 0
517+
OSSL_LIB_CTX *libctx = NULL;
518+
519+
ossl_x509_get0_libctx(x509, &libctx, NULL);
520+
if (RAND_bytes_ex(libctx, (unsigned char *)k, sizeof(k), 0) <= 0
518521
|| (arr = OPENSSL_malloc_array(count, sizeof(*arr))) == NULL
519522
|| (h = OPENSSL_LH_new(oid_hash, oid_cmp)) == NULL) {
520523
*flags |= EXFLAG_INVALID;

0 commit comments

Comments
 (0)