diff options
Diffstat (limited to 'crypto/asn1/x_algor.c')
-rw-r--r-- | crypto/asn1/x_algor.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/asn1/x_algor.c b/crypto/asn1/x_algor.c index 274e456..57cc956 100644 --- a/crypto/asn1/x_algor.c +++ b/crypto/asn1/x_algor.c @@ -142,3 +142,14 @@ void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md) X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); } + +int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) + { + int rv; + rv = OBJ_cmp(a->algorithm, b->algorithm); + if (rv) + return rv; + if (!a->parameter && !b->parameter) + return 0; + return ASN1_TYPE_cmp(a->parameter, b->parameter); + } |