bool X509_Certificate::operator<(const X509_Certificate& other) const { /* If signature values are not equal, sort by lexicographic ordering of that */ if(this->signature() != other.signature()) { return (this->signature() < other.signature()); } // Then compare the signed contents return this->signed_body() < other.signed_body(); }
/* * Compare two certificates for equality */ bool X509_Certificate::operator==(const X509_Certificate& other) const { return (this->signature() == other.signature() && this->signature_algorithm() == other.signature_algorithm() && this->signed_body() == other.signed_body()); }