25683 EC param parsing error not propagated correctly
r=andreas.
This commit is contained in:
rrelyea%redhat.com 2006-03-21 19:33:52 +00:00
Родитель 6a7da6374e
Коммит dd7e2a2cf6
4 изменённых файлов: 16 добавлений и 18 удалений

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

@ -34,7 +34,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: keydb.c,v 1.42 2006/03/21 19:30:10 rrelyea%redhat.com Exp $ */
/* $Id: keydb.c,v 1.43 2006/03/21 19:33:52 rrelyea%redhat.com Exp $ */
#include "lowkeyi.h"
#include "seccomon.h"
@ -52,12 +52,8 @@
#include "nsslocks.h"
#include "keydbi.h"
#include "softoken.h"
#ifdef NSS_ENABLE_ECC
extern SECStatus EC_FillParams(PRArenaPool *arena,
const SECItem *encodedParams,
ECParams *params);
#endif
/*
* Record keys for keydb
@ -2046,6 +2042,9 @@ seckey_decrypt_private_key(NSSLOWKEYEncryptedPrivateKeyInfo *epki,
rv = EC_FillParams(permarena, &pk->u.ec.ecParams.DEREncoding,
&pk->u.ec.ecParams);
if (rv != SECSuccess)
goto loser;
/*
* NOTE: Encoding of the publicValue is optional
* so we need to be able to regenerate the publicValue

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

@ -38,7 +38,7 @@
/*
* Certificate handling code
*
* $Id: lowcert.c,v 1.22 2006/03/21 19:30:10 rrelyea%redhat.com Exp $
* $Id: lowcert.c,v 1.23 2006/03/21 19:33:52 rrelyea%redhat.com Exp $
*/
#include "seccomon.h"
@ -51,12 +51,8 @@
#include "secasn1.h"
#include "secoid.h"
#include "secerr.h"
#include "softoken.h"
#ifdef NSS_ENABLE_ECC
extern SECStatus EC_FillParams(PRArenaPool *arena,
const SECItem *encodedParams,
ECParams *params);
#endif
static const SEC_ASN1Template nsslowcert_SubjectPublicKeyInfoTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWCERTSubjectPublicKeyInfo) },

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

@ -71,11 +71,6 @@
#include "cdbhdl.h"
#endif
#ifdef NSS_ENABLE_ECC
extern SECStatus EC_FillParams(PRArenaPool *arena,
const SECItem *encodedParams, ECParams *params);
#endif
/*
* ******************** Static data *******************************
*/

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

@ -36,7 +36,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: softoken.h,v 1.9 2006/03/21 19:30:10 rrelyea%redhat.com Exp $ */
/* $Id: softoken.h,v 1.10 2006/03/21 19:33:52 rrelyea%redhat.com Exp $ */
#ifndef _SOFTOKEN_H_
#define _SOFTOKEN_H_
@ -131,6 +131,14 @@ SECStatus RSA_DecryptRaw(NSSLOWKEYPrivateKey *key, unsigned char *output,
unsigned int *output_len,
unsigned int max_output_len,
unsigned char *input, unsigned int input_len);
#ifdef NSS_ENABLE_ECC
/*
** pepare an ECParam structure from DEREncoded params
*/
extern SECStatus EC_FillParams(PRArenaPool *arena,
const SECItem *encodedParams, ECParams *params);
#endif
/*
** Prepare a buffer for DES encryption, growing to the appropriate boundary,