+/* $OpenLDAP$ */\r
/*\r
* This file is derived from OpenLDAP Software. All of the modifications to\r
* OpenLDAP Software represented in the following file were developed by\r
* notice:\r
*\r
* Copyright 2011 Devin J. Pohly\r
+ * Portions Copyright 2011 Howard Chu\r
* Redistribution and use in source and binary forms, with or without\r
* modification, are permitted only as authorized by the OpenLDAP Public\r
* License. \r
*\r
* A portion of this code is used in accordance with the Beer-ware License,\r
* revision 42, as noted.\r
+ *\r
*/\r
#include <lber.h>\r
#include <lber_pvt.h>\r
}\r
\r
static int chk_phk(\r
- const struct berval *scheme,\r
const struct berval *magic,\r
const struct berval *passwd,\r
const struct berval *cred,\r
salt.bv_val = (char *) &orig_pass[sizeof(digest)];\r
salt.bv_len = rc - sizeof(digest);\r
\r
- /* the only difference between this and straight PHK is the magic */\r
do_phk_hash(cred, magic, &salt, digest);\r
\r
if (text)\r
const struct berval *cred,\r
const char **text)\r
{\r
- return chk_phk(scheme, &magic_apr1, passwd, cred, text);\r
+ return chk_phk(&magic_apr1, passwd, cred, text);\r
}\r
\r
static int chk_bsdmd5(\r
const struct berval *cred,\r
const char **text)\r
{\r
- return chk_phk(scheme, &magic_bsdmd5, passwd, cred, text);\r
+ return chk_phk(&magic_bsdmd5, passwd, cred, text);\r
}\r
\r
static int hash_phk(\r