/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include <stdlib.h>
#include <string.h>
#include <libintl.h>
#include <locale.h>
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
#include <syslog.h>
#include "ns_sldap.h"
#include "ns_internal.h"
#include <crypt.h>
static int
{
return (FALSE);
return (TRUE);
}
static char *
{
char *res;
int i = 0;
return (NULL);
}
for (;;) {
if (aLen < 1)
break;
i += 2;
aLen--;
aString++;
}
return (res);
}
static int
unhex(char c)
{
return (c >= '0' && c <= '9' ? c - '0'
: c >= 'A' && c <= 'F' ? c - 'A' + 10
: c - 'a' + 10);
}
static char *
{
int theLen = 0;
return (NULL);
if (++anHexaStr != '\0') {
anHexaStr++;
}
theLen++;
}
return (theRes);
}
static void
c_setup()
{
unsigned random;
int seed;
(void) mutex_lock(&ns_crypt_lock);
if (crypt_inited) {
(void) mutex_unlock(&ns_crypt_lock);
return;
}
seed = 123;
for (i = 0; i < 13; i++)
for (i = 0; i < ROTORSIZE; i++) {
t1[i] = i;
t3[i] = 0;
}
for (i = 0; i < ROTORSIZE; i++) {
k = ROTORSIZE-1 - i;
random >>= 8;
if (t3[k] != 0) continue;
}
for (i = 0; i < ROTORSIZE; i++)
(void) mutex_unlock(&ns_crypt_lock);
}
static char *
{
char *s;
if (!crypt_inited)
c_setup();
i = 0;
n1 = 0;
n2 = 0;
while (i < len) {
i++;
n1++;
n1 = 0;
n2++;
}
}
s[i] = '\0';
*mod_len = i;
}
return (s);
}
char *
{
int modv_len;
/*
* if not cleartext, return a copy of what ptr
* points to as that is what evalue does below.
*/
return (str);
}
return (NULL);
}
return (ev);
}
char *
{
int len;
/* if cleartext return NULL (error!) */
return (NULL);
sb++;
return (modv);
}