KMSAgentPKICommon.cpp revision 4f14b0f29aa144cc03efdde5508ae126ae197acf
/*
* 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
*/
/*
*/
/**
* \file KMSAgentPKICommon.cpp
*/
#include <stdio.h>
#include "SYSCommon.h"
#include "KMSAgentPKICommon.h"
#include "KMSAgentStringUtilities.h"
#include "KMSAgent_direct.h"
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
{
// used for CA
}
// BEN - make these
// global lengths
int iLength1 = 0;
int iLength2 = 0;
// THIS CAN'T BE STACK DATA - TOO BIG
#ifdef METAWARE
static char aNotherTempBuffer[50];
#endif
// used by StoreAgentPKI - KMSAgentStorage.cpp
bool CPKI::ExportCertAndKeyToFile(
CCertificate* const i_pCertificate,
CPrivateKey* const i_pPrivateKey,
const char* const i_pcFileName,
const char* const i_sPassphrase,
{
#ifdef KMSUSERPKCS12
if ( i_eFileFormat == FILE_FORMAT_PKCS12 )
{
&iLength1,
(char*)i_sPassphrase ) )
{
return false;
}
} else {
#endif
// Overloaded Save method implemented in KMSAgentPKICert.cpp
// this method saves Certificate to the temporary buffer, not a file
// but a side effect is to get the actual file length
&iLength1, /* returned - actual length
written */
{
return false;
}
// Overloaded Save method implemented in KMSAgentPKIKey.cpp
// this method saves keys to the temporary buffer, not a file,
// but a side effect is to get the actual file length
&iLength2, /* returned - actual length
written */
{
return false;
}
#ifdef KMSUSERPKCS12
}
#endif
// now write the temporary buffer to a file
{
return false;
}
#ifdef KMSUSERPKCS12
#ifdef K_SOLARIS_PLATFORM
#endif
#endif
#ifdef METAWARE
// write out the two file lengths
#endif
1, // size
pFile ); // to-file
}
{
// empty
}