kifulprv.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* Copyright (C) RSA Data Security, Inc. created 1990, 1996. This is an
unpublished work protected as such under copyright law. This work
contains proprietary, confidential, and trade secret information of
RSA Data Security, Inc. Use, disclosure or reproduction without the
express written authorization of RSA Data Security, Inc. is
prohibited.
*/
#include "port_before.h"
#include "global.h"
#include "bsafe2.h"
#include "bkey.h"
#include "kinfotyp.h"
#include "kifulprv.h"
#include "port_after.h"
typedef struct {
static B_KeyInfoType KITFullPrivate =
/* Create a FULL_PRIVATE_KEY value and only copy inthe entries
that are not (ITEM *)NULL_PTR.
primes and primeExponents point to a 2 entry ITEM array.
*/
{
int status;
/* Allocate memory for FULL_PRIVATE_KEY value.
*/
if ((status = B_MemoryPoolAlloc
sizeof (FULL_PRIVATE_KEY))) != 0)
return (status);
/* Pre-zeroize and only copy in values that are not NULL.
*/
}
}
return (B_InfoCacheAddInfo
}
/* Select the key object's full private key and set all of the supplied
fields which are not (ITEM *)NULL_PTR.
primes and primeExponents point to a 2 entry ITEM array.
If one of the fields is not (ITEM *)NULL_PTR, but the full key's
field is null, return BE_WRONG_KEY_INFO.
*/
{
int status;
if ((status = B_KeyGetInfo
return (status);
return (BE_WRONG_KEY_INFO);
}
return (BE_WRONG_KEY_INFO);
}
return (BE_WRONG_KEY_INFO);
}
return (BE_WRONG_KEY_INFO);
}
return (BE_WRONG_KEY_INFO);
}
return (BE_WRONG_KEY_INFO);
}
return (0);
}
/* This is not intended to be called from B_SetKeyInfo.
Get returns BE_WRONG_KEY_INFO.
*/
{
return (BE_ALG_OPERATION_UNKNOWN);
}