Index: nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c |
diff --git a/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c b/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c |
index d1499a7dc5f42d2b41bca4eb325180ce0e531aba..ebe37739fa5a6cac2dd97119b45ddbce6de30deb 100755 |
--- a/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c |
+++ b/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c |
@@ -137,7 +137,7 @@ pkix_RevocationChecker_RegisterSelf(void *plContext) |
PKIX_RETURN(REVOCATIONCHECKER); |
} |
-/* Sort methods by theirs priorities */ |
+/* Sort methods by their priorities (lower priority = higher preference) */ |
static PKIX_Error * |
pkix_RevocationChecker_SortComparator( |
PKIX_PL_Object *obj1, |
@@ -152,7 +152,13 @@ pkix_RevocationChecker_SortComparator( |
method1 = (pkix_RevocationMethod *)obj1; |
method2 = (pkix_RevocationMethod *)obj2; |
- *pResult = (method1->priority > method2->priority); |
+ if (method1->priority < method2->priority) { |
+ *pResult = -1; |
+ } else if (method1->priority > method2->priority) { |
+ *pResult = 1; |
+ } else { |
+ *pResult = 0; |
+ } |
PKIX_RETURN(BUILD); |
} |