keyop.c revision 30a5e8fa1253cb33980ee4514743cf683f584b4e
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <link.h>
#include <fcntl.h>
#include <ctype.h>
#include <ber_der.h>
#include <kmfapiP.h>
#include <libgen.h>
#include <cryptoutil.h>
int num_args,
{
sizeof (KMF_KEY_HANDLE)},
sizeof (KMF_KEY_HANDLE)},
};
int num_req_attrs = sizeof (required_attrs) /
sizeof (KMF_ATTRIBUTE_TESTER);
return (KMF_ERR_BAD_PARAMETER);
return (ret);
return (ret);
attrlist));
} else {
return (KMF_ERR_PLUGIN_NOTFOUND);
}
}
int num_args,
{
sizeof (KMF_KEY_HANDLE)},
};
int num_req_attrs = sizeof (required_attrs) /
sizeof (KMF_ATTRIBUTE_TESTER);
return (KMF_ERR_BAD_PARAMETER);
return (ret);
return (ret);
} else {
}
return (KMF_ERR_BAD_PARAMETER);
}
/* Else we don't know how to free the memory. */
}
}
return (ret);
}
int num_args,
{
sizeof (uint32_t)}
};
int num_req_attrs = sizeof (required_attrs) /
sizeof (KMF_ATTRIBUTE_TESTER);
return (KMF_ERR_BAD_PARAMETER);
return (ret);
return (ret);
}
return (KMF_ERR_PLUGIN_NOTFOUND);
}
int num_args,
{
sizeof (KMF_KEY_HANDLE)},
};
int num_req_attrs = sizeof (required_attrs) /
sizeof (KMF_ATTRIBUTE_TESTER);
return (KMF_ERR_BAD_PARAMETER);
return (ret);
return (ret);
attrlist));
} else {
return (KMF_ERR_PLUGIN_NOTFOUND);
}
}
{
return (ret);
return (KMF_ERR_BAD_PARAMETER);
} else {
return (KMF_ERR_PLUGIN_NOTFOUND);
}
}
int numattr,
{
};
int num_req_attrs = sizeof (required_attrs) /
sizeof (KMF_ATTRIBUTE_TESTER);
return (KMF_ERR_BAD_PARAMETER);
return (ret);
return (ret);
else
return (KMF_ERR_FUNCTION_NOT_FOUND);
}
return (KMF_ERR_PLUGIN_NOTFOUND);
}
/*
* The following are Phase 1 APIs still needed to maintain compat with elfsign.
*/
/*
* Name: KMF_SignDataWithKey
*
* Description:
* This function signs a block of data using the private key
* and returns the signature in output
*
* Parameters:
* handle(input) - opaque handle for KMF session
* key(input) - contains private key handle needed for signing
* AlgOID(input) - contains algorithm to be used for signing
* tobesigned(input) - pointer to a KMF_DATA structure containing
* the data to be signed
* output(output) - pointer to the KMF_DATA structure containing the
* signed data
*
* Returns:
* A KMF_RETURN value indicating success or specifying a particular
* error condition.
* The value KMF_OK indicates success. All other values represent
* an error condition.
*
*/
{
int i = 0;
return (KMF_ERR_BAD_PARAMETER);
i++;
i++;
i++;
i++;
i++;
}
{
int i = 0;
return (KMF_ERR_BAD_PARAMETER);
i++;
if (keys) {
i++;
}
i++;
i++;
i++;
i++;
i++;
}
i++;
}
sizeof (KMF_CREDENTIAL));
i++;
}
i++;
}
i++;
}
i++;
}
i++;
i++;
i++;
}
}
{
int i = 0;
return (KMF_ERR_BAD_PARAMETER);
i++;
i++;
i++;
i++;
}
sizeof (KMF_CREDENTIAL));
i++;
}
sizeof (KMF_BIGINT));
i++;
}
sizeof (KMF_KEY_HANDLE));
i++;
sizeof (KMF_KEY_HANDLE));
i++;
i++;
}
i++;
}
i++;
}
i++;
}
}