Check ASN1_TYPE structure type is a SEQUENCE in PKCS7_get_smimecap().
This commit is contained in:
parent
ffa8e7b74c
commit
d06db8ad9e
@ -3,7 +3,7 @@
|
|||||||
* project 2001.
|
* project 2001.
|
||||||
*/
|
*/
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 2001 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 2001-2004 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -98,7 +98,8 @@ STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si)
|
|||||||
ASN1_TYPE *cap;
|
ASN1_TYPE *cap;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities);
|
cap = PKCS7_get_signed_attribute(si, NID_SMIMECapabilities);
|
||||||
if (!cap) return NULL;
|
if (!cap || (cap->type != V_ASN1_SEQUENCE))
|
||||||
|
return NULL;
|
||||||
p = cap->value.sequence->data;
|
p = cap->value.sequence->data;
|
||||||
return d2i_ASN1_SET_OF_X509_ALGOR(NULL, &p,
|
return d2i_ASN1_SET_OF_X509_ALGOR(NULL, &p,
|
||||||
cap->value.sequence->length,
|
cap->value.sequence->length,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user