crypto_util.c revision ff0e937b36dcde1a47ff7b00aa76a491c0dc07a8
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <pwd.h>
#include <nss_dbdefs.h>
#include <auth_attr.h>
#include "crypto_util.h"
/* init kmf handle and pkcs11 handle, for cc creation */
int
const char *pktoken,
const char *tokendir)
{
int numattr;
/* change default softtoken directory */
return (-1);
}
/* init kmf */
return (-1);
}
numattr = 0;
return (-1);
}
/* get pkcs11 handle from kmf */
return (-1);
}
return (0);
}
void
{
(void) kmf_finalize(kmfhandle);
}
/* random generation, for cc creation */
int
{
return (-1);
}
} else {
return (-1);
}
}
return (-1);
}
return (0);
}
/* conver mac address to label string */
void
{
int i;
for (i = 0; i < WUSB_DEV_MAC_LENGTH; i++) {
}
}
/* ARGSUSED */
/* For debug only, print an array of byte */
void
{
#ifdef DEBUG
int i;
for (i = 0; i < len; i++) {
}
#endif
}
/* Check if a uid has auths */
int
{
char buf[NSS_LINELEN_PASSWD];
return (-1);
}
/* get user name */
return (-1);
}
/* check the auths */
return (-1);
}
return (0);
}