[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suspected typo in CRL_hash.cpp



A colleague noticed that certificate revoked with reason
privilegeWithdrawn were still being reported as valid (while other
reasons were correctly being regarded as revoked).  I think this is due
to a typo in cml/crl/srv_dll/src/CRL_hash.cpp:

@@ -245,7 +245,7 @@ bool CRLInsert (HashTable *table, Revocation *element, ulong hash_value)
                        element->GetRevocation()->exts &&
                        element->GetRevocation()->exts->reasonCode &&
                        element->GetRevocation()->exts->reasonCode->value &&
-                       (*(short *)element->GetRevocation()->exts->reasonCode->value & CM_CRL_REMOVE_FROM_CRL))
+                       (*(short *)element->GetRevocation()->exts->reasonCode->value == CM_CRL_REMOVE_FROM_CRL))
                {
                        // Remove the entry
                        delete element;

(privilegeWithdrawn is 9, and CM_CRL_REMOVE_FROM_CRL is 8.)