diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-17 16:24:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-17 16:24:20 +0000 |
commit | d330f1554d3a99304e1965e3acf63c10ec34ce20 (patch) | |
tree | cfc3c1f1bf8a5fe14d7414e9591ff1cc650aa7dc /src/backend/libpq/crypt.c | |
parent | 8ffdcbf23b36b4f908724015e79aceff338e0539 (diff) | |
download | postgresql-d330f1554d3a99304e1965e3acf63c10ec34ce20.tar.gz |
Clean up libpq's pollution of application namespace by renaming the
exported routines of ip.c, md5.c, and fe-auth.c to begin with 'pg_'.
Also get rid of the vestigial fe_setauthsvc/fe_getauthsvc routines
altogether.
Diffstat (limited to 'src/backend/libpq/crypt.c')
-rw-r--r-- | src/backend/libpq/crypt.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index b0a17aea53..5e99cc6cdd 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/libpq/crypt.c,v 1.66 2005/10/15 02:49:17 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/libpq/crypt.c,v 1.67 2005/10/17 16:24:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -76,9 +76,9 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass) if (isMD5(shadow_pass)) { /* stored password already encrypted, only do salt */ - if (!EncryptMD5(shadow_pass + strlen("md5"), - (char *) port->md5Salt, - sizeof(port->md5Salt), crypt_pwd)) + if (!pg_md5_encrypt(shadow_pass + strlen("md5"), + (char *) port->md5Salt, + sizeof(port->md5Salt), crypt_pwd)) { pfree(crypt_pwd); return STATUS_ERROR; @@ -89,19 +89,19 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass) /* stored password is plain, double-encrypt */ char *crypt_pwd2 = palloc(MD5_PASSWD_LEN + 1); - if (!EncryptMD5(shadow_pass, - port->user_name, - strlen(port->user_name), - crypt_pwd2)) + if (!pg_md5_encrypt(shadow_pass, + port->user_name, + strlen(port->user_name), + crypt_pwd2)) { pfree(crypt_pwd); pfree(crypt_pwd2); return STATUS_ERROR; } - if (!EncryptMD5(crypt_pwd2 + strlen("md5"), - port->md5Salt, - sizeof(port->md5Salt), - crypt_pwd)) + if (!pg_md5_encrypt(crypt_pwd2 + strlen("md5"), + port->md5Salt, + sizeof(port->md5Salt), + crypt_pwd)) { pfree(crypt_pwd); pfree(crypt_pwd2); @@ -123,10 +123,10 @@ md5_crypt_verify(const Port *port, const char *role, char *client_pass) { /* Encrypt user-supplied password to match stored MD5 */ crypt_client_pass = palloc(MD5_PASSWD_LEN + 1); - if (!EncryptMD5(client_pass, - port->user_name, - strlen(port->user_name), - crypt_client_pass)) + if (!pg_md5_encrypt(client_pass, + port->user_name, + strlen(port->user_name), + crypt_client_pass)) { pfree(crypt_client_pass); return STATUS_ERROR; |