summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Esser <besser82@fedoraproject.org>2018-11-03 12:03:17 +0100
committerBjörn Esser <besser82@fedoraproject.org>2018-11-03 12:16:24 +0100
commit08ef2ddaef094f573358eac38d43031174798b80 (patch)
treec3c2bb00e762244a6bca49f66a3c5568195837c3
parent00c7a9c7b8d38c86720a2a6f38ab5590181b74fc (diff)
downloadlibxcrypt-08ef2ddaef094f573358eac38d43031174798b80.tar.gz
libxcrypt-08ef2ddaef094f573358eac38d43031174798b80.tar.bz2
libxcrypt-08ef2ddaef094f573358eac38d43031174798b80.zip
Remove 'crypt-private.h' and merge it into 'crypt-port.h'.
-rw-r--r--LICENSING3
-rw-r--r--Makefile.am2
-rw-r--r--TODO.md4
-rw-r--r--crypt-bcrypt.c1
-rw-r--r--crypt-des.c1
-rw-r--r--crypt-gensalt.c1
-rw-r--r--crypt-gost-yescrypt.c1
-rw-r--r--crypt-md5.c1
-rw-r--r--crypt-nthash.c1
-rw-r--r--crypt-pbkdf1-sha1.c1
-rw-r--r--crypt-port.h17
-rw-r--r--crypt-private.h42
-rw-r--r--crypt-scrypt.c1
-rw-r--r--crypt-sha256.c1
-rw-r--r--crypt-sha512.c1
-rw-r--r--crypt-sunmd5.c1
-rw-r--r--crypt-yescrypt.c1
-rw-r--r--crypt.c1
-rw-r--r--randombytes.c1
-rw-r--r--test-crypt-badargs.c1
-rw-r--r--test-crypt-gost-yescrypt.c1
-rw-r--r--test-getrandom-fallbacks.c1
-rw-r--r--test-getrandom-interface.c1
23 files changed, 21 insertions, 65 deletions
diff --git a/LICENSING b/LICENSING
index a30cf94..39c66ce 100644
--- a/LICENSING
+++ b/LICENSING
@@ -12,8 +12,7 @@ source tree. For specific licensing terms consult the files themselves.
crypt.c, crypt-static.c, crypt-gensalt-static.c, crypt-port.h
* Copyright Free Software Foundation, Inc.; LGPL (v2.1 or later):
- crypt.h, crypt-obsolete.h, crypt-private.h
- crypt-md5.c,
+ crypt.h, crypt-obsolete.h, crypt-md5.c,
test-badsalt.c, test-crypt-nonnull.c
* Copyright David Burren et al.; 3-clause BSD:
diff --git a/Makefile.am b/Makefile.am
index fc14dff..4b8f22a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,7 @@ noinst_HEADERS = \
alg-gost3411-2012-ref.h alg-hmac-sha1.h alg-md4.h alg-md5.h \
alg-sha1.h alg-sha256.h alg-sha512.h alg-yescrypt.h \
alg-yescrypt-sysendian.h byteorder.h crypt-obsolete.h \
- crypt-private.h crypt-port.h test-des-cases.h
+ crypt-port.h test-des-cases.h
noinst_PROGRAMS = gen-des-tables
diff --git a/TODO.md b/TODO.md
index 5b8aa77..124a83f 100644
--- a/TODO.md
+++ b/TODO.md
@@ -93,8 +93,8 @@ It was last updated 20 October 2018.
* Replace crypt-md5.c with original md5crypt from FreeBSD?
* Other files subject to the (L)GPL are crypt.c, crypt-static.c,
crypt-gensalt-static.c, crypt-obsolete.h, crypt-port.h,
- crypt-private.h, test-badsalt.c. It is not clear to me how much
- material originally assigned to the FSF remains in these files.
+ test-badsalt.c. It is not clear to me how much material originally
+ assigned to the FSF remains in these files.
Several of them are API definitions and trivial wrappers that
could not be meaningfully changed without breaking them (so are
arguably uncopyrightable).
diff --git a/crypt-bcrypt.c b/crypt-bcrypt.c
index 0c4f41b..9dc10ed 100644
--- a/crypt-bcrypt.c
+++ b/crypt-bcrypt.c
@@ -44,7 +44,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "byteorder.h"
#include <errno.h>
diff --git a/crypt-des.c b/crypt-des.c
index 129074d..fa3e7f7 100644
--- a/crypt-des.c
+++ b/crypt-des.c
@@ -44,7 +44,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-des.h"
#include <errno.h>
diff --git a/crypt-gensalt.c b/crypt-gensalt.c
index b3a77c5..da427c8 100644
--- a/crypt-gensalt.c
+++ b/crypt-gensalt.c
@@ -9,7 +9,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include <errno.h>
#include <stdio.h>
diff --git a/crypt-gost-yescrypt.c b/crypt-gost-yescrypt.c
index 0505687..51009c7 100644
--- a/crypt-gost-yescrypt.c
+++ b/crypt-gost-yescrypt.c
@@ -26,7 +26,6 @@
#undef YESCRYPT_INTERNAL
#include "alg-gost3411-2012-hmac.h"
-#include "crypt-private.h"
#include <errno.h>
diff --git a/crypt-md5.c b/crypt-md5.c
index 6c1cc8a..abc7779 100644
--- a/crypt-md5.c
+++ b/crypt-md5.c
@@ -18,7 +18,6 @@
<https://www.gnu.org/licenses/>. */
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-md5.h"
#include <errno.h>
diff --git a/crypt-nthash.c b/crypt-nthash.c
index 616139a..78fdd63 100644
--- a/crypt-nthash.c
+++ b/crypt-nthash.c
@@ -35,7 +35,6 @@
#include "crypt-port.h"
#include "alg-md4.h"
-#include "crypt-private.h"
#include <errno.h>
#include <stdio.h>
diff --git a/crypt-pbkdf1-sha1.c b/crypt-pbkdf1-sha1.c
index 4d0d19c..cd83948 100644
--- a/crypt-pbkdf1-sha1.c
+++ b/crypt-pbkdf1-sha1.c
@@ -28,7 +28,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-hmac-sha1.h"
#include "byteorder.h"
diff --git a/crypt-port.h b/crypt-port.h
index 6b4b3ff..bef19e3 100644
--- a/crypt-port.h
+++ b/crypt-port.h
@@ -361,6 +361,23 @@ extern void crypt_yescrypt_rn (const char *, size_t, const char *,
size_t, uint8_t *, size_t, void *, size_t);
#endif
+/* Utility functions */
+bool get_random_bytes (void *buf, size_t buflen);
+
+extern void gensalt_sha_rn (char tag, size_t maxsalt, unsigned long defcount,
+ unsigned long mincount, unsigned long maxcount,
+ unsigned long count,
+ const uint8_t *rbytes, size_t nrbytes,
+ uint8_t *output, size_t output_size);
+
+/* Calculate the size of a base64 encoding of N bytes:
+ 6 bits per output byte, rounded up. */
+#define BASE64_LEN(bytes) ((((bytes) * 8) + 5) / 6)
+
+/* The "scratch" area passed to each of the individual hash functions is
+ this big. */
+#define ALG_SPECIFIC_SIZE 8192
+
#include "crypt.h"
#endif /* crypt-port.h */
diff --git a/crypt-private.h b/crypt-private.h
deleted file mode 100644
index 306879d..0000000
--- a/crypt-private.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 1991-2017 Free Software Foundation, Inc.
- *
- * The GNU C Library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * The GNU C Library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the GNU C Library; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307 USA.
- */
-
-#ifndef _CRYPT_PRIVATE_H
-#define _CRYPT_PRIVATE_H 1
-
-
-/* Utility functions */
-
-bool get_random_bytes (void *buf, size_t buflen);
-
-extern void gensalt_sha_rn (char tag, size_t maxsalt, unsigned long defcount,
- unsigned long mincount, unsigned long maxcount,
- unsigned long count,
- const uint8_t *rbytes, size_t nrbytes,
- uint8_t *output, size_t output_size);
-
-/* Calculate the size of a base64 encoding of N bytes:
- 6 bits per output byte, rounded up. */
-#define BASE64_LEN(bytes) ((((bytes) * 8) + 5) / 6)
-
-/* The "scratch" area passed to each of the individual hash functions is
- this big. */
-#define ALG_SPECIFIC_SIZE 8192
-
-#endif /* crypt-private.h */
diff --git a/crypt-scrypt.c b/crypt-scrypt.c
index 203045a..9900751 100644
--- a/crypt-scrypt.c
+++ b/crypt-scrypt.c
@@ -19,7 +19,6 @@
#include "crypt-port.h"
#include "crypt-hashes.h"
-#include "crypt-private.h"
#include <errno.h>
diff --git a/crypt-sha256.c b/crypt-sha256.c
index e88c61f..36f3bdc 100644
--- a/crypt-sha256.c
+++ b/crypt-sha256.c
@@ -16,7 +16,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-sha256.h"
#include <errno.h>
diff --git a/crypt-sha512.c b/crypt-sha512.c
index afdec8a..836b16d 100644
--- a/crypt-sha512.c
+++ b/crypt-sha512.c
@@ -16,7 +16,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-sha512.h"
#include <errno.h>
diff --git a/crypt-sunmd5.c b/crypt-sunmd5.c
index 7a30aae..701f5fd 100644
--- a/crypt-sunmd5.c
+++ b/crypt-sunmd5.c
@@ -29,7 +29,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-md5.h"
#include <errno.h>
diff --git a/crypt-yescrypt.c b/crypt-yescrypt.c
index 7f6d2d9..7a6851c 100644
--- a/crypt-yescrypt.c
+++ b/crypt-yescrypt.c
@@ -17,7 +17,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include "alg-yescrypt.h"
#include <errno.h>
diff --git a/crypt.c b/crypt.c
index ae42875..4f3da56 100644
--- a/crypt.c
+++ b/crypt.c
@@ -17,7 +17,6 @@
<https://www.gnu.org/licenses/>. */
#include "crypt-port.h"
-#include "crypt-private.h"
#include <errno.h>
#include <stdlib.h>
diff --git a/randombytes.c b/randombytes.c
index 8d95dcc..2c80bc7 100644
--- a/randombytes.c
+++ b/randombytes.c
@@ -15,7 +15,6 @@
*/
#include "crypt-port.h"
-#include "crypt-private.h"
#include <errno.h>
#include <stdlib.h>
diff --git a/test-crypt-badargs.c b/test-crypt-badargs.c
index b172f48..d2b4ac5 100644
--- a/test-crypt-badargs.c
+++ b/test-crypt-badargs.c
@@ -8,7 +8,6 @@
details. */
#include "crypt-port.h"
-#include "crypt-private.h"
#include <errno.h>
#include <setjmp.h>
diff --git a/test-crypt-gost-yescrypt.c b/test-crypt-gost-yescrypt.c
index 409ea40..766f950 100644
--- a/test-crypt-gost-yescrypt.c
+++ b/test-crypt-gost-yescrypt.c
@@ -21,7 +21,6 @@
#if INCLUDE_gost_yescrypt
-#include "crypt-private.h"
#include "alg-gost3411-2012-hmac.h"
#include <stdio.h>
diff --git a/test-getrandom-fallbacks.c b/test-getrandom-fallbacks.c
index 0642ef3..9f93cba 100644
--- a/test-getrandom-fallbacks.c
+++ b/test-getrandom-fallbacks.c
@@ -8,7 +8,6 @@
details. */
#include "crypt-port.h"
-#include "crypt-private.h"
#include <stdarg.h>
#include <stdio.h>
diff --git a/test-getrandom-interface.c b/test-getrandom-interface.c
index 16df6d0..82be78a 100644
--- a/test-getrandom-interface.c
+++ b/test-getrandom-interface.c
@@ -8,7 +8,6 @@
details. */
#include "crypt-port.h"
-#include "crypt-private.h"
#include <errno.h>
#include <setjmp.h>