зеркало из https://github.com/mozilla/gecko-dev.git
Fix compiler errors on HP, Linux, AIX, and Solaris
This commit is contained in:
Родитель
ce8cca241b
Коммит
9db1cb7b94
|
@ -40,10 +40,9 @@
|
|||
#include "cert.h"
|
||||
#include "secitem.h"
|
||||
#include "secmod.h"
|
||||
#include "secmodi.h"
|
||||
#include "keyhi.h"
|
||||
|
||||
static SECStatus
|
||||
static int
|
||||
cmmf_create_witness_and_challenge(PRArenaPool *poolp,
|
||||
CMMFChallenge *challenge,
|
||||
long inRandom,
|
||||
|
@ -53,7 +52,6 @@ cmmf_create_witness_and_challenge(PRArenaPool *poolp,
|
|||
{
|
||||
SECItem *encodedRandNum;
|
||||
SECItem encodedRandStr = {siBuffer, NULL, 0};
|
||||
SECItem encryptBlock = {siBuffer, NULL, 0};
|
||||
SECItem *dummy;
|
||||
unsigned char *randHash, *senderHash, *encChal=NULL;
|
||||
unsigned modulusLen = 0;
|
||||
|
@ -216,7 +214,6 @@ CMMF_POPODecKeyChallContentSetNextChallenge
|
|||
SECStatus rv;
|
||||
SECItem *genNameDER;
|
||||
void *mark;
|
||||
SECItem senderDER = {siBuffer, NULL, 0};
|
||||
|
||||
PORT_Assert (inDecKeyChall != NULL &&
|
||||
inSender != NULL &&
|
||||
|
|
|
@ -73,7 +73,7 @@ cmmf_CertOrEncCertSetCertificate(CMMFCertOrEncCert *certOrEncCert,
|
|||
CERTCertificate *inCert)
|
||||
{
|
||||
SECItem *derDest = NULL;
|
||||
SECStatus rv;
|
||||
SECStatus rv = SECFailure;
|
||||
|
||||
if (inCert->derCert.data == NULL) {
|
||||
derDest = SEC_ASN1EncodeItem(NULL, NULL, inCert,
|
||||
|
|
|
@ -260,7 +260,7 @@ crmf_copy_encryptedkey(PRArenaPool *poolp,
|
|||
CRMFEncryptedKey *destEncrKey)
|
||||
{
|
||||
SECStatus rv;
|
||||
void *mark;
|
||||
void *mark = NULL;
|
||||
|
||||
if (poolp != NULL) {
|
||||
mark = PORT_ArenaMark(poolp);
|
||||
|
@ -285,13 +285,13 @@ crmf_copy_encryptedkey(PRArenaPool *poolp,
|
|||
goto loser;
|
||||
}
|
||||
destEncrKey->encKeyChoice = srcEncrKey->encKeyChoice;
|
||||
if (poolp != NULL) {
|
||||
if (mark) {
|
||||
PORT_ArenaUnmark(poolp, mark);
|
||||
}
|
||||
return SECSuccess;
|
||||
|
||||
loser:
|
||||
if (poolp != NULL) {
|
||||
if (mark) {
|
||||
PORT_ArenaRelease(poolp, mark);
|
||||
}
|
||||
return SECFailure;
|
||||
|
@ -660,12 +660,12 @@ crmf_encrypted_value_unwrap_priv_key(PRArenaPool *poolp,
|
|||
SECItem *params = NULL, *publicValue = NULL;
|
||||
int keySize, origLen;
|
||||
CK_KEY_TYPE keyType;
|
||||
CK_ATTRIBUTE_TYPE *usage;
|
||||
CK_ATTRIBUTE_TYPE *usage = NULL;
|
||||
CK_ATTRIBUTE_TYPE rsaUsage[] = {
|
||||
CKA_UNWRAP, CKA_DECRYPT, CKA_SIGN, CKA_SIGN_RECOVER };
|
||||
CK_ATTRIBUTE_TYPE dsaUsage[] = { CKA_SIGN };
|
||||
CK_ATTRIBUTE_TYPE dhUsage[] = { CKA_DERIVE };
|
||||
int usageCount;
|
||||
int usageCount = 0;
|
||||
|
||||
oidTag = SECOID_GetAlgorithmTag(encValue->symmAlg);
|
||||
wrapMechType = crmf_get_pad_mech_from_tag(oidTag);
|
||||
|
@ -711,6 +711,8 @@ crmf_encrypted_value_unwrap_priv_key(PRArenaPool *poolp,
|
|||
usageCount = sizeof(dsaUsage)/sizeof(dsaUsage[0]);
|
||||
break;
|
||||
}
|
||||
PORT_Assert(usage != NULL);
|
||||
PORT_Assert(usageCount != 0);
|
||||
*unWrappedKey = PK11_UnwrapPrivKey(slot, wrappingKey, wrapMechType, params,
|
||||
&encValue->encValue, nickname,
|
||||
publicValue, PR_TRUE,PR_TRUE,
|
||||
|
@ -1018,7 +1020,6 @@ static SECStatus
|
|||
crmf_encode_pkiarchiveoptions(PRArenaPool *poolp, CRMFControl *inControl)
|
||||
{
|
||||
const SEC_ASN1Template *asn1Template;
|
||||
SECStatus rv;
|
||||
|
||||
asn1Template = crmf_get_pkiarchiveoptions_subtemplate(inControl);
|
||||
/* We've got a union, so passing a pointer to one element of the
|
||||
|
|
|
@ -171,7 +171,7 @@ crmf_template_copy_secalg (PRArenaPool *poolp, SECAlgorithmID **dest,
|
|||
SECAlgorithmID* src)
|
||||
{
|
||||
SECStatus rv;
|
||||
void *mark;
|
||||
void *mark = NULL;
|
||||
SECAlgorithmID *mySecAlg;
|
||||
|
||||
if (poolp != NULL) {
|
||||
|
@ -185,14 +185,14 @@ crmf_template_copy_secalg (PRArenaPool *poolp, SECAlgorithmID **dest,
|
|||
if (rv != SECSuccess) {
|
||||
goto loser;
|
||||
}
|
||||
if (poolp != NULL) {
|
||||
if (mark) {
|
||||
PORT_ArenaUnmark(poolp, mark);
|
||||
}
|
||||
return SECSuccess;
|
||||
|
||||
loser:
|
||||
*dest = NULL;
|
||||
if (poolp != NULL) {
|
||||
if (mark) {
|
||||
PORT_ArenaRelease(poolp, mark);
|
||||
}
|
||||
return SECFailure;
|
||||
|
|
Загрузка…
Ссылка в новой задаче