Hi Richard,
Richard Levitte wrote:
...
> +int EVP_PKEY_cmp(EVP_PKEY *a, EVP_PKEY *b)
Wouldn't be EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
more appropriate ?
> + {
> + if (a->type != b->type)
> + return -1;
> +
> + switch (a->type)
> + {
> +#ifndef OPENSSL_NO_RSA
> + case EVP_PKEY_RSA:
> + if (BN_cmp(b->pkey.rsa->n,a->pkey.rsa->n) != 0
> + || BN_cmp(b->pkey.rsa->e,a->pkey.rsa->e) != 0)
> + return 0;
> + break;
> +#endif
> +#ifndef OPENSSL_NO_DSA
> + case EVP_PKEY_DSA:
> + if (BN_cmp(b->pkey.dsa->pub_key,a->pkey.dsa->pub_key) != 0)
> + return 0;
Shouldn't we compare the parameters as well (I don't know if it's really
necessary for the intended usage) ?
Regards,
Nils
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]