Since "geotrustglobalca" and "/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA" aren't really comparable.
I'll wander into the pool with an answer for "X.509 certificate equivalency" since its not readily apparent or easy to come by.
First, you should be careful comparing certificates for equality. If <certificate bits 1> == <certificate bits 2>
, then you can say they are the exact same certificate and equal. However, the converse does not hold.
To understand the converse, you need to know two things. First, CAs sometimes re-issue a certificate with nearly the same parameters. Based on the Subject Name, they are equivalent; but based on the bits they are not equal. Some CAs have done this in the past to bump from SHA-1 to SHA-256.
The second thing to understand is, what are the important bits so you can determine if certificates are equivalent. The IETF does not have an X.509 validation document. The closest is RFC 4158: Internet X.509 Public Key Infrastructure: Certification Path Building, mixed with some other docs, like Issuing rules (which are not the same as Validation rules).
According to RFC 4158, you can uniquely identify a certificate with either:
{Issuer DN, Serial Number}
pair
{Authority Key identifier (AKID), Subject Key identifier (SKID)}
pair
The corner case of a CA re-issuing a Root CA results in:
- the hash changes
- the serial number changes
- the public key remains
- the Distinguished Name remains
Item (3), the public key remains, is significant because it means neither the Authority Key identifier (AKID) nor the Subject Key identifier (SKID) changes. Item (4), the Distinguished Name remains, is significant because its what many people use for the comparison (and its been the cause of many security bugs over the years).
In this case, the Key Identifiers will be the same, so you should consider accepting even though the serial number changed. (The serial number must change according to IETF and CA/B rules).
A very odd corner case that came up in public key pinning recently is, a server presents a Elliptic Curve certificate using domain parameters (the full expansion of p
, g
, Q
, etc), but the client expects a named curve (like secp256r1
). Should this key be accepted as equivalent? (The IETF says the certificate must use the named curve).
Given the above information, this information is useless in your comparison:
And this information is incomplete for your comparison:
"/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA"
In this case, you should err on the side of caution and reject the comparison for equality or equivalence.