/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <syslog.h>
#include <string.h>
#include <cryptoutil.h>
/*PRINTFLIKE1*/
void
{
return;
if (_cryptodebug_prefix == NULL) {
} else {
}
if (_cryptodebug_syslog) {
} else {
}
}
/*
* cryptoerror
*
* This is intended to be used both by interactive commands like cryptoadm(1m)
* digest(1) etc, and by libraries libpkcs11, libelfsign etc.
*
* A library probably wants most (all?) of its errors going to syslog but
* commands are usually happy for them to go to stderr.
*
* If a syslog priority is passed we log on that priority. Otherwise we
* use LOG_STDERR to mean use stderr instead. LOG_STDERR is defined in
*/
/*PRINTFLIKE2*/
void
{
return;
if (_cryptodebug_prefix == NULL) {
} else {
}
} else {
}
}
void
{
_cryptoerror_enabled = 0;
}
void
{
_cryptoerror_enabled = 1;
}
void
{
}
if (_cryptodebug_enabled == -1) {
/*
* If unset or it isn't one of syslog or stderr
* disable debug.
*/
_cryptodebug_enabled = 0;
return;
_cryptodebug_enabled = 1;
_cryptodebug_enabled = 1;
}
}
}
#pragma fini(_cryptodebug_fini)
static void
_cryptodebug_fini(void)
{
if (_cryptodebug_prefix != NULL)
}