diff options
author | miod <> | 2015-02-08 22:22:13 +0000 |
---|---|---|
committer | miod <> | 2015-02-08 22:22:13 +0000 |
commit | 7d41edeab1a29aba3d0cd0334b1edefd62baa889 (patch) | |
tree | 2bb15798e22288241cf4debf73c6c7aa17b7bf31 /src | |
parent | 4410e930dcdbf09c5404c19a2f8a8b695aae8746 (diff) | |
download | openbsd-7d41edeab1a29aba3d0cd0334b1edefd62baa889.tar.gz openbsd-7d41edeab1a29aba3d0cd0334b1edefd62baa889.tar.bz2 openbsd-7d41edeab1a29aba3d0cd0334b1edefd62baa889.zip |
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@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 24 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/evp/evp.h | 24 |
2 files changed, 20 insertions, 28 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 107119883a..dd4d2245e6 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.41 2015/02/07 13:19:15 doug Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.42 2015/02/08 22:22:13 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -154,6 +154,13 @@ struct evp_pkey_st { | |||
154 | #define EVP_PKEY_MO_ENCRYPT 0x0004 | 154 | #define EVP_PKEY_MO_ENCRYPT 0x0004 |
155 | #define EVP_PKEY_MO_DECRYPT 0x0008 | 155 | #define EVP_PKEY_MO_DECRYPT 0x0008 |
156 | 156 | ||
157 | typedef int evp_sign_method(int type, const unsigned char *m, | ||
158 | unsigned int m_length, unsigned char *sigret, unsigned int *siglen, | ||
159 | void *key); | ||
160 | typedef int evp_verify_method(int type, const unsigned char *m, | ||
161 | unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, | ||
162 | void *key); | ||
163 | |||
157 | #ifndef EVP_MD | 164 | #ifndef EVP_MD |
158 | struct env_md_st { | 165 | struct env_md_st { |
159 | int type; | 166 | int type; |
@@ -166,12 +173,8 @@ struct env_md_st { | |||
166 | int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from); | 173 | int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from); |
167 | int (*cleanup)(EVP_MD_CTX *ctx); | 174 | int (*cleanup)(EVP_MD_CTX *ctx); |
168 | 175 | ||
169 | /* FIXME: prototype these some day */ | 176 | evp_sign_method *sign; |
170 | int (*sign)(int type, const unsigned char *m, unsigned int m_length, | 177 | evp_verify_method *verify; |
171 | unsigned char *sigret, unsigned int *siglen, void *key); | ||
172 | int (*verify)(int type, const unsigned char *m, unsigned int m_length, | ||
173 | const unsigned char *sigbuf, unsigned int siglen, | ||
174 | void *key); | ||
175 | int required_pkey_type[5]; /*EVP_PKEY_xxx */ | 178 | int required_pkey_type[5]; /*EVP_PKEY_xxx */ |
176 | int block_size; | 179 | int block_size; |
177 | int ctx_size; /* how big does the ctx->md_data need to be */ | 180 | int ctx_size; /* how big does the ctx->md_data need to be */ |
@@ -179,13 +182,6 @@ struct env_md_st { | |||
179 | int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); | 182 | int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); |
180 | } /* EVP_MD */; | 183 | } /* EVP_MD */; |
181 | 184 | ||
182 | typedef int evp_sign_method(int type, const unsigned char *m, | ||
183 | unsigned int m_length, unsigned char *sigret, unsigned int *siglen, | ||
184 | void *key); | ||
185 | typedef int evp_verify_method(int type, const unsigned char *m, | ||
186 | unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, | ||
187 | void *key); | ||
188 | |||
189 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single | 185 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single |
190 | * block */ | 186 | * block */ |
191 | 187 | ||
diff --git a/src/lib/libssl/src/crypto/evp/evp.h b/src/lib/libssl/src/crypto/evp/evp.h index 107119883a..dd4d2245e6 100644 --- a/src/lib/libssl/src/crypto/evp/evp.h +++ b/src/lib/libssl/src/crypto/evp/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.41 2015/02/07 13:19:15 doug Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.42 2015/02/08 22:22:13 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -154,6 +154,13 @@ struct evp_pkey_st { | |||
154 | #define EVP_PKEY_MO_ENCRYPT 0x0004 | 154 | #define EVP_PKEY_MO_ENCRYPT 0x0004 |
155 | #define EVP_PKEY_MO_DECRYPT 0x0008 | 155 | #define EVP_PKEY_MO_DECRYPT 0x0008 |
156 | 156 | ||
157 | typedef int evp_sign_method(int type, const unsigned char *m, | ||
158 | unsigned int m_length, unsigned char *sigret, unsigned int *siglen, | ||
159 | void *key); | ||
160 | typedef int evp_verify_method(int type, const unsigned char *m, | ||
161 | unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, | ||
162 | void *key); | ||
163 | |||
157 | #ifndef EVP_MD | 164 | #ifndef EVP_MD |
158 | struct env_md_st { | 165 | struct env_md_st { |
159 | int type; | 166 | int type; |
@@ -166,12 +173,8 @@ struct env_md_st { | |||
166 | int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from); | 173 | int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from); |
167 | int (*cleanup)(EVP_MD_CTX *ctx); | 174 | int (*cleanup)(EVP_MD_CTX *ctx); |
168 | 175 | ||
169 | /* FIXME: prototype these some day */ | 176 | evp_sign_method *sign; |
170 | int (*sign)(int type, const unsigned char *m, unsigned int m_length, | 177 | evp_verify_method *verify; |
171 | unsigned char *sigret, unsigned int *siglen, void *key); | ||
172 | int (*verify)(int type, const unsigned char *m, unsigned int m_length, | ||
173 | const unsigned char *sigbuf, unsigned int siglen, | ||
174 | void *key); | ||
175 | int required_pkey_type[5]; /*EVP_PKEY_xxx */ | 178 | int required_pkey_type[5]; /*EVP_PKEY_xxx */ |
176 | int block_size; | 179 | int block_size; |
177 | int ctx_size; /* how big does the ctx->md_data need to be */ | 180 | int ctx_size; /* how big does the ctx->md_data need to be */ |
@@ -179,13 +182,6 @@ struct env_md_st { | |||
179 | int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); | 182 | int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); |
180 | } /* EVP_MD */; | 183 | } /* EVP_MD */; |
181 | 184 | ||
182 | typedef int evp_sign_method(int type, const unsigned char *m, | ||
183 | unsigned int m_length, unsigned char *sigret, unsigned int *siglen, | ||
184 | void *key); | ||
185 | typedef int evp_verify_method(int type, const unsigned char *m, | ||
186 | unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, | ||
187 | void *key); | ||
188 | |||
189 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single | 185 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single |
190 | * block */ | 186 | * block */ |
191 | 187 | ||