am 158135f4: am 2317d8dd: Merge change 26055 into eclair

Merge commit '158135f49f5372f24557d9d1e0917fd746acf6f2'

* commit '158135f49f5372f24557d9d1e0917fd746acf6f2':
  Replaced an O(N) algorithm with an O(1) algorithm. This shaves off 2/3 of the server cert checking time or ~200ms on Sapphire. This is in preparation for tripling the number of certs in an upcoming change.