Index: stable/10/lib/libmd/md4.h =================================================================== --- stable/10/lib/libmd/md4.h (revision 314156) +++ stable/10/lib/libmd/md4.h (revision 314157) @@ -1,60 +1,76 @@ /* MD4.H - header file for MD4C.C * $FreeBSD$ */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD4 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. */ #ifndef _MD4_H_ #define _MD4_H_ /* MD4 context. */ typedef struct MD4Context { u_int32_t state[4]; /* state (ABCD) */ u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } MD4_CTX; #include __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef MD4Init #define MD4Init _libmd_MD4Init +#endif +#ifndef MD4Update #define MD4Update _libmd_MD4Update +#endif +#ifndef MD4Pad #define MD4Pad _libmd_MD4Pad +#endif +#ifndef MD4Final #define MD4Final _libmd_MD4Final +#endif +#ifndef MD4End #define MD4End _libmd_MD4End +#endif +#ifndef MD4File #define MD4File _libmd_MD4File +#endif +#ifndef MD4FileChunk #define MD4FileChunk _libmd_MD4FileChunk +#endif +#ifndef MD4Data #define MD4Data _libmd_MD4Data +#endif void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const void *, unsigned int); void MD4Pad(MD4_CTX *); void MD4Final(unsigned char [16], MD4_CTX *); char * MD4End(MD4_CTX *, char *); char * MD4File(const char *, char *); char * MD4FileChunk(const char *, char *, off_t, off_t); char * MD4Data(const void *, unsigned int, char *); __END_DECLS #endif /* _MD4_H_ */ Index: stable/10/lib/libmd/md5.h =================================================================== --- stable/10/lib/libmd/md5.h (revision 314156) +++ stable/10/lib/libmd/md5.h (revision 314157) @@ -1,23 +1,41 @@ /* $FreeBSD$ */ #ifndef _MD5_H_ #define _MD5_H_ #ifndef _KERNEL /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef MD5Init #define MD5Init _libmd_MD5Init +#endif +#ifndef MD5Update #define MD5Update _libmd_MD5Update +#endif +#ifndef MD5Pad #define MD5Pad _libmd_MD5Pad +#endif +#ifndef MD5Final #define MD5Final _libmd_MD5Final +#endif +#ifndef MD5Transform #define MD5Transform _libmd_MD5Transform +#endif +#ifndef MD5End #define MD5End _libmd_MD5End +#endif +#ifndef MD5File #define MD5File _libmd_MD5File +#endif +#ifndef MD5FileChunk #define MD5FileChunk _libmd_MD5FileChunk +#endif +#ifndef MD5Data #define MD5Data _libmd_MD5Data +#endif #endif #include #endif /* _MD5_H_ */ Index: stable/10/lib/libmd/ripemd.h =================================================================== --- stable/10/lib/libmd/ripemd.h (revision 314156) +++ stable/10/lib/libmd/ripemd.h (revision 314157) @@ -1,109 +1,129 @@ /* crypto/ripemd/ripemd.h */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ /* * $FreeBSD$ */ #ifndef HEADER_RIPEMD_H #define HEADER_RIPEMD_H #include #include /* XXX switch to machine/ansi.h and __ types */ #define RIPEMD160_CBLOCK 64 #define RIPEMD160_LBLOCK 16 #define RIPEMD160_BLOCK 16 #define RIPEMD160_LAST_BLOCK 56 #define RIPEMD160_LENGTH_BLOCK 8 #define RIPEMD160_DIGEST_LENGTH 20 typedef struct RIPEMD160state_st { u_int32_t A,B,C,D,E; u_int32_t Nl,Nh; u_int32_t data[RIPEMD160_LBLOCK]; int num; } RIPEMD160_CTX; __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef RIPEMD160_Init #define RIPEMD160_Init _libmd_RIPEMD160_Init +#endif +#ifndef RIPEMD160_Update #define RIPEMD160_Update _libmd_RIPEMD160_Update +#endif +#ifndef RIPEMD160_Final #define RIPEMD160_Final _libmd_RIPEMD160_Final +#endif +#ifndef RIPEMD160_End #define RIPEMD160_End _libmd_RIPEMD160_End +#endif +#ifndef RIPEMD160_File #define RIPEMD160_File _libmd_RIPEMD160_File +#endif +#ifndef RIPEMD160_FileChunk #define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk +#endif +#ifndef RIPEMD160_Data #define RIPEMD160_Data _libmd_RIPEMD160_Data +#endif +#ifndef RIPEMD160_Transform #define RIPEMD160_Transform _libmd_RIPEMD160_Transform +#endif +#ifndef RMD160_version #define RMD160_version _libmd_RMD160_version +#endif +#ifndef ripemd160_block #define ripemd160_block _libmd_ripemd160_block +#endif void RIPEMD160_Init(RIPEMD160_CTX *c); void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); char *RIPEMD160_End(RIPEMD160_CTX *, char *); char *RIPEMD160_File(const char *, char *); char *RIPEMD160_FileChunk(const char *, char *, off_t, off_t); char *RIPEMD160_Data(const void *, unsigned int, char *); __END_DECLS #endif Index: stable/10/lib/libmd/sha.h =================================================================== --- stable/10/lib/libmd/sha.h (revision 314156) +++ stable/10/lib/libmd/sha.h (revision 314157) @@ -1,126 +1,166 @@ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] * * $FreeBSD$ */ #ifndef _SHA_H_ #define _SHA_H_ 1 #include #include /* XXX switch to machine/ansi.h and __ types */ #define SHA_CBLOCK 64 #define SHA_LBLOCK 16 #define SHA_BLOCK 16 #define SHA_LAST_BLOCK 56 #define SHA_LENGTH_BLOCK 8 #define SHA_DIGEST_LENGTH 20 typedef struct SHAstate_st { u_int32_t h0, h1, h2, h3, h4; u_int32_t Nl, Nh; u_int32_t data[SHA_LBLOCK]; int num; } SHA_CTX; #define SHA1_CTX SHA_CTX __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA_Init #define SHA_Init _libmd_SHA_Init +#endif +#ifndef SHA_Update #define SHA_Update _libmd_SHA_Update +#endif +#ifndef SHA_Final #define SHA_Final _libmd_SHA_Final +#endif +#ifndef SHA_End #define SHA_End _libmd_SHA_End +#endif +#ifndef SHA_File #define SHA_File _libmd_SHA_File +#endif +#ifndef SHA_FileChunk #define SHA_FileChunk _libmd_SHA_FileChunk +#endif +#ifndef SHA_Data #define SHA_Data _libmd_SHA_Data +#endif +#ifndef SHA_Transform #define SHA_Transform _libmd_SHA_Transform +#endif +#ifndef SHA_version #define SHA_version _libmd_SHA_version +#endif +#ifndef sha_block #define sha_block _libmd_sha_block +#endif +#ifndef SHA1_Init #define SHA1_Init _libmd_SHA1_Init +#endif +#ifndef SHA1_Update #define SHA1_Update _libmd_SHA1_Update +#endif +#ifndef SHA1_Final #define SHA1_Final _libmd_SHA1_Final +#endif +#ifndef SHA1_End #define SHA1_End _libmd_SHA1_End +#endif +#ifndef SHA1_File #define SHA1_File _libmd_SHA1_File +#endif +#ifndef SHA1_FileChunk #define SHA1_FileChunk _libmd_SHA1_FileChunk +#endif +#ifndef SHA1_Data #define SHA1_Data _libmd_SHA1_Data +#endif +#ifndef SHA1_Transform #define SHA1_Transform _libmd_SHA1_Transform +#endif +#ifndef SHA1_version #define SHA1_version _libmd_SHA1_version +#endif +#ifndef sha1_block #define sha1_block _libmd_sha1_block +#endif void SHA_Init(SHA_CTX *c); void SHA_Update(SHA_CTX *c, const void *data, size_t len); void SHA_Final(unsigned char *md, SHA_CTX *c); char *SHA_End(SHA_CTX *, char *); char *SHA_File(const char *, char *); char *SHA_FileChunk(const char *, char *, off_t, off_t); char *SHA_Data(const void *, unsigned int, char *); void SHA1_Init(SHA_CTX *c); void SHA1_Update(SHA_CTX *c, const void *data, size_t len); void SHA1_Final(unsigned char *md, SHA_CTX *c); char *SHA1_End(SHA_CTX *, char *); char *SHA1_File(const char *, char *); char *SHA1_FileChunk(const char *, char *, off_t, off_t); char *SHA1_Data(const void *, unsigned int, char *); __END_DECLS #endif /* !_SHA_H_ */ Index: stable/10/lib/libmd/sha256.h =================================================================== --- stable/10/lib/libmd/sha256.h (revision 314156) +++ stable/10/lib/libmd/sha256.h (revision 314157) @@ -1,64 +1,82 @@ /*- * Copyright 2005 Colin Percival * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SHA256_H_ #define _SHA256_H_ #include typedef struct SHA256Context { uint32_t state[8]; uint32_t count[2]; unsigned char buf[64]; } SHA256_CTX; __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA256_Init #define SHA256_Init _libmd_SHA256_Init +#endif +#ifndef SHA256_Update #define SHA256_Update _libmd_SHA256_Update +#endif +#ifndef SHA256_Final #define SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End #define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File #define SHA256_File _libmd_SHA256_File +#endif +#ifndef SHA256_FileChunk #define SHA256_FileChunk _libmd_SHA256_FileChunk +#endif +#ifndef SHA256_Data #define SHA256_Data _libmd_SHA256_Data +#endif +#ifndef SHA256_Transform #define SHA256_Transform _libmd_SHA256_Transform +#endif +#ifndef SHA256_version #define SHA256_version _libmd_SHA256_version +#endif void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); void SHA256_Final(unsigned char [32], SHA256_CTX *); char *SHA256_End(SHA256_CTX *, char *); char *SHA256_File(const char *, char *); char *SHA256_FileChunk(const char *, char *, off_t, off_t); char *SHA256_Data(const void *, unsigned int, char *); __END_DECLS #endif /* !_SHA256_H_ */ Index: stable/10/lib/libmd/sha512.h =================================================================== --- stable/10/lib/libmd/sha512.h (revision 314156) +++ stable/10/lib/libmd/sha512.h (revision 314157) @@ -1,64 +1,82 @@ /*- * Copyright 2005 Colin Percival * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _SHA512_H_ #define _SHA512_H_ #include typedef struct SHA512Context { uint64_t state[8]; uint64_t count[2]; unsigned char buf[128]; } SHA512_CTX; __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA512_Init #define SHA512_Init _libmd_SHA512_Init +#endif +#ifndef SHA512_Update #define SHA512_Update _libmd_SHA512_Update +#endif +#ifndef SHA512_Final #define SHA512_Final _libmd_SHA512_Final +#endif +#ifndef SHA512_End #define SHA512_End _libmd_SHA512_End +#endif +#ifndef SHA512_File #define SHA512_File _libmd_SHA512_File +#endif +#ifndef SHA512_FileChunk #define SHA512_FileChunk _libmd_SHA512_FileChunk +#endif +#ifndef SHA512_Data #define SHA512_Data _libmd_SHA512_Data +#endif +#ifndef SHA512_Transform #define SHA512_Transform _libmd_SHA512_Transform +#endif +#ifndef SHA512_version #define SHA512_version _libmd_SHA512_version +#endif void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, const void *, size_t); void SHA512_Final(unsigned char [64], SHA512_CTX *); char *SHA512_End(SHA512_CTX *, char *); char *SHA512_File(const char *, char *); char *SHA512_FileChunk(const char *, char *, off_t, off_t); char *SHA512_Data(const void *, unsigned int, char *); __END_DECLS #endif /* !_SHA512_H_ */ Index: stable/10 =================================================================== --- stable/10 (revision 314156) +++ stable/10 (revision 314157) Property changes on: stable/10 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r282736