2 * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 * ECDSA low level APIs are deprecated for public use, but still ok for
14 #include "internal/deprecated.h"
16 #include <openssl/ec.h>
18 #include <openssl/err.h>
22 * 1: correct signature
23 * 0: incorrect signature
26 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
27 const ECDSA_SIG *sig, EC_KEY *eckey)
29 if (eckey->meth->verify_sig != NULL)
30 return eckey->meth->verify_sig(dgst, dgst_len, sig, eckey);
31 ECerr(EC_F_ECDSA_DO_VERIFY, EC_R_OPERATION_NOT_SUPPORTED);
37 * 1: correct signature
38 * 0: incorrect signature
41 int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len,
42 const unsigned char *sigbuf, int sig_len, EC_KEY *eckey)
44 if (eckey->meth->verify != NULL)
45 return eckey->meth->verify(type, dgst, dgst_len, sigbuf, sig_len,
47 ECerr(EC_F_ECDSA_VERIFY, EC_R_OPERATION_NOT_SUPPORTED);