mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-16 03:44:58 -05:00
ITS#5151 fix CertificateListValidate
This commit is contained in:
parent
f1065e1780
commit
d322eb96c3
1 changed files with 10 additions and 8 deletions
|
|
@ -222,21 +222,23 @@ static int certificateListValidate( Syntax *syntax, struct berval *in )
|
|||
if ( tag != LBER_SEQUENCE ) return LDAP_INVALID_SYNTAX;
|
||||
ber_skip_data( ber, len );
|
||||
tag = ber_skip_tag( ber, &len ); /* thisUpdate */
|
||||
/* NOTE: in the certificates I'm playing with, the time is UTC.
|
||||
* maybe the tag is different from 0x17U for generalizedTime? */
|
||||
if ( tag != 0x17U ) return LDAP_INVALID_SYNTAX;
|
||||
/* Time is a CHOICE { UTCTime, GeneralizedTime } */
|
||||
if ( tag != 0x17U && tag != 0x18U ) return LDAP_INVALID_SYNTAX;
|
||||
ber_skip_data( ber, len );
|
||||
/* Optional nextUpdate */
|
||||
tag = ber_skip_tag( ber, &len );
|
||||
if ( tag == 0x17U ) {
|
||||
if ( tag == 0x17U || tag == 0x18U ) {
|
||||
ber_skip_data( ber, len );
|
||||
tag = ber_skip_tag( ber, &len );
|
||||
}
|
||||
/* Optional revokedCertificates */
|
||||
/* revokedCertificates - Sequence of Sequence, Optional */
|
||||
if ( tag == LBER_SEQUENCE ) {
|
||||
/* Should NOT be empty */
|
||||
ber_skip_data( ber, len );
|
||||
tag = ber_skip_tag( ber, &len );
|
||||
ber_len_t seqlen;
|
||||
if ( ber_peek_tag( ber, &seqlen ) == LBER_SEQUENCE ) {
|
||||
/* Should NOT be empty */
|
||||
ber_skip_data( ber, len );
|
||||
tag = ber_skip_tag( ber, &len );
|
||||
}
|
||||
}
|
||||
/* Optional Extensions */
|
||||
if ( tag == SLAP_X509_OPT_CL_CRLEXTENSIONS ) { /* ? */
|
||||
|
|
|
|||
Loading…
Reference in a new issue