* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.80 2001/08/15 18:42:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.81 2001/08/15 21:08:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "catalog/indexing.h"
#include "commands/user.h"
#include "libpq/crypt.h"
-#include "libpq/md5.h"
#include "miscadmin.h"
#include "utils/array.h"
#include "utils/builtins.h"
* Dec 17, 1997 - Todd A. Brandys
* Orignal Version Completed.
*
- * $Id: crypt.c,v 1.33 2001/08/15 18:42:14 momjian Exp $
+ * $Id: crypt.c,v 1.34 2001/08/15 21:08:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "libpq/crypt.h"
-#include "libpq/md5.h"
#include "miscadmin.h"
#include "storage/fd.h"
#include "utils/nabstime.h"
#include <errno.h>
#include "postgres.h"
-#include "libpq/md5.h"
+#include "libpq/crypt.h"
/*
* PRIVATE FUNCTIONS
*
* Calculates the MD5 sum of the bytes in a buffer.
*
- * SYNOPSIS #include "md5.h"
+ * SYNOPSIS #include "crypt.h"
* int md5_hash(const void *buff, size_t len, char *hexsum)
*
* INPUT buff the buffer containing the bytes that you want
extern int md5_crypt_verify(const Port *port, const char *user, const char *pgpass);
+extern bool md5_hash(const void *buff, size_t len, char *hexsum);
+extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed);
+extern bool EncryptMD5(const char *passwd, const char *salt, char *buf);
+
+#define MD5_PASSWD_LEN 35
+
+#define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
+ strlen(passwd) == MD5_PASSWD_LEN)
+
#endif
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * md5.h
- * Interface to hba.c
- *
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_MD5_H
-#define PG_MD5_H
-
-extern bool md5_hash(const void *buff, size_t len, char *hexsum);
-extern bool CheckMD5Pwd(char *passwd, char *storedpwd, char *seed);
-extern bool EncryptMD5(const char *passwd, const char *salt, char *buf);
-
-#define MD5_PASSWD_LEN 35
-
-#define isMD5(passwd) (strncmp((passwd),"md5",3) == 0 && \
- strlen(passwd) == MD5_PASSWD_LEN)
-
-#endif
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.54 2001/08/15 18:42:15 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.55 2001/08/15 21:08:21 momjian Exp $
#
#-------------------------------------------------------------------------
SHLIB_LINK += $(filter -L%, $(LDFLAGS)) $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS))
-all: md5.c md5.h all-lib
+all: md5.c all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
md5.c: $(backend_src)/libpq/md5.c
rm -f $@ && $(LN_S) $< .
-md5.h: $(backend_src)/../include/libpq/md5.h
- rm -f $@ && $(LN_S) $< .
-
# this only gets done if configure finds system doesn't have inet_aton()
inet_aton.c: $(backend_src)/port/inet_aton.c
rm -f $@ && $(LN_S) $< .
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.49 2001/08/15 18:42:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.50 2001/08/15 21:08:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "libpq-fe.h"
#include "libpq-int.h"
#include "fe-auth.h"
-#include "md5.h"
+#include "libpq/crypt.h"
#ifdef WIN32
#include "win32.h"