Fix various incorrect error function codes.
[openssl.git] / crypto / ecdsa / ecdsa.h
index a57ba0f14f2065d227d9f380da0ade762c829595..c59b35cee91346be76240bfa82919ed34451cf84 100644 (file)
 #error ECDSA is disabled.
 #endif
 
-#include <openssl/bn.h>
 #include <openssl/ec.h>
 #include <openssl/ossl_typ.h>
+#ifndef OPENSSL_NO_DEPRECATED
+#include <openssl/bn.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -90,7 +92,7 @@ struct ecdsa_method
        int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, 
                        BIGNUM **r);
        int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, 
-                       ECDSA_SIG *sig, EC_KEY *eckey);
+                       const ECDSA_SIG *sig, EC_KEY *eckey);
 #if 0
        int (*init)(EC_KEY *eckey);
        int (*finish)(EC_KEY *eckey);
@@ -189,8 +191,8 @@ ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,int dgst_len,EC_KEY *eckey);
  * \param eckey pointer to the EC_KEY object containing a public EC key
  * \return 1 if the signature is valid, 0 if the signature is invalid and -1 on error
  */
-int      ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG 
-               *sig, EC_KEY* eckey);
+int      ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
+               const ECDSA_SIG *sig, EC_KEY* eckey);
 
 const ECDSA_METHOD *ECDSA_OpenSSL(void);
 
@@ -278,7 +280,7 @@ void ERR_load_ECDSA_strings(void);
 /* Error codes for the ECDSA functions. */
 
 /* Function codes. */
-#define ECDSA_F_ECDSA_DATA_NEW                          100
+#define ECDSA_F_ECDSA_DATA_NEW_METHOD                   100
 #define ECDSA_F_ECDSA_DO_SIGN                           101
 #define ECDSA_F_ECDSA_DO_VERIFY                                 102
 #define ECDSA_F_ECDSA_SIGN_SETUP                        103