Am 05.02.2019 um 14:50 schrieb [email protected]:
This leads to a second point. The key to the certificates map (certificatesMap) is currently a BigInteger corresponding to the serial number of the certificate. This will work in most scenarios, however, nothing prevents certificates from different issuers to have equal serial numbers - issuers from Brazil often assign low integers to the serial numbers, meaning a high chance of serial number clash with certificates from other issuers. Therefore, changing the certificates map key to a String corresponding to the canonical Subject Name, followed by a separator character (e.g. colon ":"), followed by the Serial Number toString would be a handy improvement as well.
I have prepared something locally re: the key. I'm wondering why this is a map at all, a set could be used as well. Or is there a risk that locally identical certificates would not be equal? According to the javadoc the certificate is encoded and then compared. So I'm wondering why the original developer used a map and not a set. If it was about speed, that would probably be gone partly with the recent change.
Tilman --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
