typecast for AIX build proper way

This commit is contained in:
glen.beasley%sun.com 2002-07-17 01:14:58 +00:00
Родитель d1efe174ed
Коммит efe7cada73
2 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -49,6 +49,13 @@
#include <pk11func.h>
#include <secoid.h>
PBEBitGenContext *
PBE_CreateContext(SECOidTag hashAlgorithm, PBEBitGenID bitGenPurpose,
SECItem *pwitem, SECItem *salt, unsigned int bitsNeeded,
unsigned int iterations);
SECItem *
PBE_GenerateBits(PBEBitGenContext *context);
/***********************************************************************
*
* PK11KeyGenerator.generateNormal
@ -239,14 +246,14 @@ constructSHA1PBAKey(JNIEnv *env, SECItem *pwitem, SECItem *salt,
SECItem *keyBits=NULL;
PK11SymKey *key=NULL;
pbeCtxt = (PBEBitGenContext*) PBE_CreateContext( SEC_OID_SHA1, pbeBitGenIntegrityKey,
pbeCtxt = PBE_CreateContext( SEC_OID_SHA1, pbeBitGenIntegrityKey,
pwitem, salt, 160 /* SHA1 key length */, iterationCount);
if( pbeCtxt == NULL ) {
JSS_throwMsg(env, TOKEN_EXCEPTION, "Failed to create PBE context");
goto finish;
}
keyBits = (SECItem*) pBE_GenerateBits(pbeCtxt);
keyBits = PBE_GenerateBits(pbeCtxt);
if( keyBits == NULL ) {
JSS_throwMsg(env, TOKEN_EXCEPTION, "Failed to generate bits from"
"PBE context");

Просмотреть файл

@ -41,6 +41,7 @@
#include <key.h>
#include <secitem.h>
#include <jss_bigint.h>
#include <jssutil.h>
#include <jss_exceptions.h>
@ -640,9 +641,9 @@ Java_org_mozilla_jss_pkcs11_PK11PrivKey_getDSAParamsNative
/*
* Now turn them into byte arrays
*/
if( !(jP = (jobject) JSS_OctetStringToByteArray(env, &P)) ||
!(jQ = (jobject) JSS_OctetStringToByteArray(env, &Q)) ||
!(jG = (jobject) JSS_OctetStringToByteArray(env, &G)) )
if( !(jP = JSS_OctetStringToByteArray(env, &P)) ||
!(jQ = JSS_OctetStringToByteArray(env, &Q)) ||
!(jG = JSS_OctetStringToByteArray(env, &G)) )
{
goto finish;
}