summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-08-30 09:32:52 +0000
committerSimon Josefsson <simon@josefsson.org>2005-08-30 09:32:52 +0000
commit942c42fc418e899446810daa32dad1e327c2141e (patch)
tree25e7d79906e41950852bd412af69b21084fb924e
parent712c706a2b84cac5a0e2543ab680228bc6141ba9 (diff)
downloadgnutls-942c42fc418e899446810daa32dad1e327c2141e.tar.gz
(_gnutls_get_random): Removed, not used any more.
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/gnutls_random.c57
-rw-r--r--lib/gnutls_random.h31
3 files changed, 1 insertions, 89 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index c21f807e3d..e29aadfd08 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -58,7 +58,7 @@ COBJECTS = gnutls_record.c gnutls_compress.c debug.c gnutls_cipher.c \
gnutls_errors.c gnutls_algorithms.c gnutls_dh.c gnutls_kx.c \
gnutls_priority.c gnutls_hash_int.c gnutls_cipher_int.c \
gnutls_compress_int.c gnutls_session.c gnutls_db.c x509_b64.c \
- auth_anon.c gnutls_extensions.c gnutls_auth.c gnutls_random.c \
+ auth_anon.c gnutls_extensions.c gnutls_auth.c \
gnutls_v2_compat.c gnutls_datum.c auth_rsa.c \
gnutls_session_pack.c gnutls_mpi.c gnutls_pk.c gnutls_cert.c \
gnutls_global.c gnutls_constate.c gnutls_anon_cred.c \
diff --git a/lib/gnutls_random.c b/lib/gnutls_random.c
deleted file mode 100644
index 7810cf4163..0000000000
--- a/lib/gnutls_random.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation
- *
- * Author: Nikos Mavroyanopoulos
- *
- * This file is part of GNUTLS.
- *
- * The GNUTLS 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA
- *
- */
-
-/* Functions to return random bytes.
- */
-
-#include <gnutls_int.h>
-#include <gnutls_random.h>
-#include <gnutls_errors.h>
-
-/* fills the buffer 'res' with random bytes of 'bytes' long.
- * level is WEAK, STRONG, or VERY_STRONG (libgcrypt)
- */
-int _gnutls_get_random(opaque * res, int bytes, int level)
-{
- int err;
-
- switch (level) {
- case GNUTLS_WEAK_RANDOM:
- err = gc_nonce((char *) res, (size_t) bytes);
- break;
-
- case GNUTLS_STRONG_RANDOM:
- err = gc_pseudo_random((char *) res, (size_t) bytes);
- break;
-
- default: /* GNUTLS_VERY_STRONG_RANDOM */
- err = gc_random((char *) res, (size_t) bytes);
- break;
- }
-
- if (err != GC_OK)
- return GNUTLS_E_RANDOM_FAILED;
-
- return GNUTLS_E_SUCCESS;
-}
diff --git a/lib/gnutls_random.h b/lib/gnutls_random.h
deleted file mode 100644
index ed5d5f6e37..0000000000
--- a/lib/gnutls_random.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation
- *
- * Author: Nikos Mavroyanopoulos
- *
- * This file is part of GNUTLS.
- *
- * The GNUTLS 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.
- *
- * This 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 this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA
- *
- */
-
-#include "defines.h"
-
-#define GNUTLS_WEAK_RANDOM 0
-#define GNUTLS_STRONG_RANDOM 1
-#define GNUTLS_VERY_STRONG_RANDOM 2
-
-int _gnutls_get_random(opaque * res, int bytes, int);