diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-29 15:51:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-29 15:51:17 +0000 |
commit | c082379018832e72c95068e938deaf79530a9458 (patch) | |
tree | 6e16bfb642f94adfe14efc18774aaa5d0ae628d0 /include | |
parent | bd5f9653f2399919b0aefeb32085ba80116ed969 (diff) |
Undo some recent prototype changes; it is legal to pass the helper
functions can take a NULL buf pointer. They will malloc memory as
needed in this case.
Diffstat (limited to 'include')
-rw-r--r-- | include/md4.h | 8 | ||||
-rw-r--r-- | include/md5.h | 8 | ||||
-rw-r--r-- | include/rmd160.h | 8 | ||||
-rw-r--r-- | include/sha1.h | 24 | ||||
-rw-r--r-- | include/sha2.h | 26 |
5 files changed, 37 insertions, 37 deletions
diff --git a/include/md4.h b/include/md4.h index 5f43cdba2ed..27538c241df 100644 --- a/include/md4.h +++ b/include/md4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md4.h,v 1.12 2004/04/28 16:54:00 millert Exp $ */ +/* $OpenBSD: md4.h,v 1.13 2004/04/29 15:51:16 millert Exp $ */ /* * This code implements the MD4 message-digest algorithm. @@ -37,11 +37,11 @@ void MD4Final(u_int8_t [MD4_DIGEST_LENGTH], MD4_CTX *) void MD4Transform(u_int32_t [4], const u_int8_t [MD4_BLOCK_LENGTH]) __attribute__((__bounded__(__minbytes__,1,4))) __attribute__((__bounded__(__minbytes__,2,MD4_BLOCK_LENGTH))); -char *MD4End(MD4_CTX *, char [MD4_DIGEST_STRING_LENGTH]) +char *MD4End(MD4_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH))); -char *MD4File(char *, char [MD4_DIGEST_STRING_LENGTH]) +char *MD4File(char *, char *) __attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH))); -char *MD4Data(const u_int8_t *, size_t, char [MD4_DIGEST_STRING_LENGTH]) +char *MD4Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,MD4_DIGEST_STRING_LENGTH))); __END_DECLS diff --git a/include/md5.h b/include/md5.h index 533db75a421..cc4a2d93652 100644 --- a/include/md5.h +++ b/include/md5.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.h,v 1.13 2004/04/28 16:52:08 millert Exp $ */ +/* $OpenBSD: md5.h,v 1.14 2004/04/29 15:51:16 millert Exp $ */ /* * This code implements the MD5 message-digest algorithm. @@ -36,11 +36,11 @@ void MD5Final(u_int8_t [MD5_DIGEST_LENGTH], MD5_CTX *) void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]) __attribute__((__bounded__(__minbytes__,1,4))) __attribute__((__bounded__(__minbytes__,2,MD5_BLOCK_LENGTH))); -char *MD5End(MD5_CTX *, char [MD5_DIGEST_STRING_LENGTH]) +char *MD5End(MD5_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH))); -char *MD5File(char *, char [MD5_DIGEST_STRING_LENGTH]) +char *MD5File(char *, char *) __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH))); -char *MD5Data(const u_int8_t *, size_t, char [MD5_DIGEST_STRING_LENGTH]) +char *MD5Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH))); __END_DECLS diff --git a/include/rmd160.h b/include/rmd160.h index f80327355e8..e9b2603baf2 100644 --- a/include/rmd160.h +++ b/include/rmd160.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rmd160.h,v 1.13 2004/04/26 19:38:12 millert Exp $ */ +/* $OpenBSD: rmd160.h,v 1.14 2004/04/29 15:51:16 millert Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -47,11 +47,11 @@ void RMD160Update(RMD160_CTX *, const u_int8_t *, u_int32_t) __attribute__((__bounded__(__string__,2,3))); void RMD160Final(u_int8_t [RMD160_DIGEST_LENGTH], RMD160_CTX *) __attribute__((__bounded__(__minbytes__,1,RMD160_DIGEST_LENGTH))); -char *RMD160End(RMD160_CTX *, char [RMD160_DIGEST_STRING_LENGTH]) +char *RMD160End(RMD160_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH))); -char *RMD160File(char *, char [RMD160_DIGEST_STRING_LENGTH]) +char *RMD160File(char *, char *) __attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH))); -char *RMD160Data(const u_int8_t *, size_t, char [RMD160_DIGEST_STRING_LENGTH]) +char *RMD160Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,RMD160_DIGEST_STRING_LENGTH))); __END_DECLS diff --git a/include/sha1.h b/include/sha1.h index 7fbeeb4fbea..1187fb9dffb 100644 --- a/include/sha1.h +++ b/include/sha1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sha1.h,v 1.18 2004/04/27 15:54:56 millert Exp $ */ +/* $OpenBSD: sha1.h,v 1.19 2004/04/29 15:51:16 millert Exp $ */ /* * SHA-1 in C @@ -24,19 +24,19 @@ typedef struct { __BEGIN_DECLS void SHA1Init(SHA1_CTX *); void SHA1Transform(u_int32_t [5], const u_int8_t [SHA1_BLOCK_LENGTH]) - __attribute__((__bounded__(__minbytes__,1,5))) - __attribute__((__bounded__(__minbytes__,2,SHA1_BLOCK_LENGTH))); + __attribute__((__bounded__(__minbytes__,1,5))) + __attribute__((__bounded__(__minbytes__,2,SHA1_BLOCK_LENGTH))); void SHA1Update(SHA1_CTX *, const u_int8_t *, unsigned int) - __attribute__((__bounded__(__string__,2,3))); + __attribute__((__bounded__(__string__,2,3))); void SHA1Final(u_int8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *) - __attribute__((__bounded__(__minbytes__,1,SHA1_DIGEST_LENGTH))); -char *SHA1End(SHA1_CTX *, char [SHA1_DIGEST_STRING_LENGTH]) - __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH))); -char *SHA1File(char *, char [SHA1_DIGEST_STRING_LENGTH]) - __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH))); -char *SHA1Data(const u_int8_t *, size_t, char [SHA1_DIGEST_STRING_LENGTH]) - __attribute__((__bounded__(__string__,1,2))) - __attribute__((__bounded__(__minbytes__,3,SHA1_DIGEST_STRING_LENGTH))); + __attribute__((__bounded__(__minbytes__,1,SHA1_DIGEST_LENGTH))); +char *SHA1End(SHA1_CTX *, char *) + __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH))); +char *SHA1File(char *, char *) + __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH))); +char *SHA1Data(const u_int8_t *, size_t, char *) + __attribute__((__bounded__(__string__,1,2))) + __attribute__((__bounded__(__minbytes__,3,SHA1_DIGEST_STRING_LENGTH))); __END_DECLS #define HTONDIGEST(x) do { \ diff --git a/include/sha2.h b/include/sha2.h index cb5749d37c5..a03bbc49c73 100644 --- a/include/sha2.h +++ b/include/sha2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sha2.h,v 1.2 2004/04/27 17:50:36 millert Exp $ */ +/* $OpenBSD: sha2.h,v 1.3 2004/04/29 15:51:16 millert Exp $ */ /* * FILE: sha2.h @@ -70,39 +70,39 @@ __BEGIN_DECLS void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const u_int8_t *, size_t) __attribute__((__bounded__(__string__,2,3))); -void SHA256_Final(u_int8_t[SHA256_DIGEST_LENGTH], SHA256_CTX *) +void SHA256_Final(u_int8_t [SHA256_DIGEST_LENGTH], SHA256_CTX *) __attribute__((__bounded__(__minbytes__,1,SHA256_DIGEST_LENGTH))); -char *SHA256_End(SHA256_CTX *, char[SHA256_DIGEST_STRING_LENGTH]) +char *SHA256_End(SHA256_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH))); -char *SHA256_File(char *, char [SHA256_DIGEST_STRING_LENGTH]) +char *SHA256_File(char *, char *) __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH))); -char *SHA256_Data(const u_int8_t *, size_t, char[SHA256_DIGEST_STRING_LENGTH]) +char *SHA256_Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,SHA256_DIGEST_STRING_LENGTH))); void SHA384_Init(SHA384_CTX *); void SHA384_Update(SHA384_CTX *, const u_int8_t *, size_t) __attribute__((__bounded__(__string__,2,3))); -void SHA384_Final(u_int8_t[SHA384_DIGEST_LENGTH], SHA384_CTX *) +void SHA384_Final(u_int8_t [SHA384_DIGEST_LENGTH], SHA384_CTX *) __attribute__((__bounded__(__minbytes__,1,SHA384_DIGEST_LENGTH))); -char *SHA384_End(SHA384_CTX *, char[SHA384_DIGEST_STRING_LENGTH]) +char *SHA384_End(SHA384_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH))); -char *SHA384_File(char *, char [SHA384_DIGEST_STRING_LENGTH]) +char *SHA384_File(char *, char *) __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH))); -char *SHA384_Data(const u_int8_t *, size_t, char[SHA384_DIGEST_STRING_LENGTH]) +char *SHA384_Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,SHA384_DIGEST_STRING_LENGTH))); void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, const u_int8_t *, size_t) __attribute__((__bounded__(__string__,2,3))); -void SHA512_Final(u_int8_t[SHA512_DIGEST_LENGTH], SHA512_CTX *) +void SHA512_Final(u_int8_t [SHA512_DIGEST_LENGTH], SHA512_CTX *) __attribute__((__bounded__(__minbytes__,1,SHA512_DIGEST_LENGTH))); -char *SHA512_End(SHA512_CTX *, char[SHA512_DIGEST_STRING_LENGTH]) +char *SHA512_End(SHA512_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH))); -char *SHA512_File(char *, char [SHA512_DIGEST_STRING_LENGTH]) +char *SHA512_File(char *, char *) __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH))); -char *SHA512_Data(const u_int8_t *, size_t, char[SHA512_DIGEST_STRING_LENGTH]) +char *SHA512_Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH))); __END_DECLS |