Mercurial > gnulib
annotate m4/sha1.m4 @ 37245:135e82dafbea
md5, sha1, sha256, sha512: use openssl routines if available
--with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256
routines will be used if available, requiring apps to link @LIB_CRYPTO@
* lib/gl_openssl.h: Provide wrappers for specified openssl hash.
* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto
in the standard system location.
* m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1.
* m4/sha256.m4: Likewise with SHA256.
* m4/sha512.m4: Likewise with SHA512.
* m4/md5.m4: Likewise with MD5.
* m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests.
* lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1.
* lib/sha256.h: Likewise with SHA256.
* lib/sha512.h: Likewise with SHA512.
* lib/md5.h: Likewise with MD5.
* lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1.
* lib/sha256.c: Likewise with SHA256.
* lib/sha512.c: Likewise with SHA512.
* lib/md5.c: Likewise with MD5.
* modules/crypto/sha1 (Link:): Add the new optional lib.
(Depends-on:): Add dependency on extern-inline.
* modules/crypto/sha256: Likewise.
* modules/crypto/sha512: Likewise.
* modules/crypto/md5: Likewise.
* modules/crypto/sha1-tests: Reference the lib here too.
* modules/crypto/md5-tests: Likewise.
* modules/crypto/gc-des-tests: Likewise.
* modules/crypto/gc-hmac-md5-tests: Likewise.
* modules/crypto/gc-hmac-sha1-tests: Likewise.
* modules/crypto/gc-hmac-sha256-tests: Likewise.
* modules/crypto/gc-hmac-sha512-tests: Likewise.
* modules/crypto/gc-md5-tests: Likewise.
* modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
* modules/crypto/gc-sha1-tests: Likewise.
* modules/crypto/gc-tests: Likewise.
* modules/crypto/hmac-md5-tests: Likewise.
* modules/crypto/hmac-sha1-tests: Likewise.
* modules/crypto/hmac-sha256-tests: Likewise.
* modules/crypto/hmac-sha512-tests: Likewise.
author | Pádraig Brady <P@draigBrady.com> |
---|---|
date | Sat, 30 Nov 2013 05:19:32 +0000 |
parents | c741bc27922a |
children | 344018b6e5d7 |
rev | line source |
---|---|
37245
135e82dafbea
md5, sha1, sha256, sha512: use openssl routines if available
Pádraig Brady <P@draigBrady.com>
parents:
36940
diff
changeset
|
1 # sha1.m4 serial 12 |
36940
c741bc27922a
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
36874
diff
changeset
|
2 dnl Copyright (C) 2002-2006, 2008-2013 Free Software Foundation, Inc. |
25302
15c495e03a92
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
24856
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
15c495e03a92
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
24856
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
15c495e03a92
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
24856
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
24856
d1bd730b77d7
Add uint32_t.m4, uintptr_t.m4, and finish renaming sha->sha1.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff
changeset
|
6 |
d1bd730b77d7
Add uint32_t.m4, uintptr_t.m4, and finish renaming sha->sha1.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff
changeset
|
7 AC_DEFUN([gl_SHA1], |
d1bd730b77d7
Add uint32_t.m4, uintptr_t.m4, and finish renaming sha->sha1.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff
changeset
|
8 [ |
d1bd730b77d7
Add uint32_t.m4, uintptr_t.m4, and finish renaming sha->sha1.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff
changeset
|
9 dnl Prerequisites of lib/sha1.c. |
30744
4a697a760175
Don't use AC_REQUIRE([AC_C_BIGENDIAN]).
Bruno Haible <bruno@clisp.org>
parents:
29358
diff
changeset
|
10 AC_REQUIRE([gl_BIGENDIAN]) |
37245
135e82dafbea
md5, sha1, sha256, sha512: use openssl routines if available
Pádraig Brady <P@draigBrady.com>
parents:
36940
diff
changeset
|
11 |
135e82dafbea
md5, sha1, sha256, sha512: use openssl routines if available
Pádraig Brady <P@draigBrady.com>
parents:
36940
diff
changeset
|
12 dnl Determine HAVE_OPENSSL_SHA1 and LIB_CRYPTO |
135e82dafbea
md5, sha1, sha256, sha512: use openssl routines if available
Pádraig Brady <P@draigBrady.com>
parents:
36940
diff
changeset
|
13 gl_CRYPTO_CHECK([SHA1]) |
24856
d1bd730b77d7
Add uint32_t.m4, uintptr_t.m4, and finish renaming sha->sha1.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff
changeset
|
14 ]) |