diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-08 22:22:14 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-08 22:22:14 +0000 |
commit | c9ac39c749874ee3d90739e20fb2ebb2f02344a4 (patch) | |
tree | f545d56f3dd26acaa5bfce9c1cb55f7b0f082d02 | |
parent | 5a9746cd47dba933837fe20d29623f8536e7fefc (diff) |
Move a few typedef up in this file in order to be able to use them in env_md_st
and get rid of a silly FIXME comment.
ok doug@ jsing@
-rw-r--r-- | lib/libssl/src/crypto/evp/evp.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/libssl/src/crypto/evp/evp.h b/lib/libssl/src/crypto/evp/evp.h index 107119883a0..dd4d2245e64 100644 --- a/lib/libssl/src/crypto/evp/evp.h +++ b/lib/libssl/src/crypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.41 2015/02/07 13:19:15 doug Exp $ */ +/* $OpenBSD: evp.h,v 1.42 2015/02/08 22:22:13 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -154,6 +154,13 @@ struct evp_pkey_st { #define EVP_PKEY_MO_ENCRYPT 0x0004 #define EVP_PKEY_MO_DECRYPT 0x0008 +typedef int evp_sign_method(int type, const unsigned char *m, + unsigned int m_length, unsigned char *sigret, unsigned int *siglen, + void *key); +typedef int evp_verify_method(int type, const unsigned char *m, + unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, + void *key); + #ifndef EVP_MD struct env_md_st { int type; @@ -166,12 +173,8 @@ struct env_md_st { int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from); int (*cleanup)(EVP_MD_CTX *ctx); - /* FIXME: prototype these some day */ - int (*sign)(int type, const unsigned char *m, unsigned int m_length, - unsigned char *sigret, unsigned int *siglen, void *key); - int (*verify)(int type, const unsigned char *m, unsigned int m_length, - const unsigned char *sigbuf, unsigned int siglen, - void *key); + evp_sign_method *sign; + evp_verify_method *verify; int required_pkey_type[5]; /*EVP_PKEY_xxx */ int block_size; int ctx_size; /* how big does the ctx->md_data need to be */ @@ -179,13 +182,6 @@ struct env_md_st { int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); } /* EVP_MD */; -typedef int evp_sign_method(int type, const unsigned char *m, - unsigned int m_length, unsigned char *sigret, unsigned int *siglen, - void *key); -typedef int evp_verify_method(int type, const unsigned char *m, - unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, - void *key); - #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single * block */ |