зеркало из https://github.com/mozilla/gecko-dev.git
Remove usage of KeyDBHandle from the jar code.
This commit is contained in:
Родитель
b213eed507
Коммит
795b909758
|
@ -113,8 +113,6 @@ loser:
|
|||
|
||||
void PR_CALLBACK JAR_destroy (JAR *jar)
|
||||
{
|
||||
JAR *z;
|
||||
|
||||
PORT_Assert( jar != NULL );
|
||||
|
||||
if (jar == NULL)
|
||||
|
@ -394,7 +392,7 @@ void JAR_find_end (JAR_Context *ctx)
|
|||
int JAR_find_next (JAR_Context *ctx, JAR_Item **it)
|
||||
{
|
||||
JAR *jar;
|
||||
ZZList *list;
|
||||
ZZList *list = NULL;
|
||||
|
||||
int finding;
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
/* security includes */
|
||||
#include "cert.h"
|
||||
#include "hasht.h"
|
||||
|
||||
/* nspr 2.0 includes */
|
||||
#include "prio.h"
|
||||
|
|
|
@ -217,7 +217,6 @@ int JAR_extract
|
|||
{
|
||||
int result;
|
||||
|
||||
JAR_FILE fp;
|
||||
JAR_Physical *phy;
|
||||
|
||||
if (jar->fp == NULL && jar->filename)
|
||||
|
@ -744,6 +743,10 @@ static int jar_gen_index (JAR *jar, jarArch format, JAR_FILE fp)
|
|||
case jarArchTar:
|
||||
result = jar_listtar (jar, fp);
|
||||
break;
|
||||
|
||||
case jarArchGuess:
|
||||
case jarArchNone:
|
||||
return JAR_ERR_GENERAL;
|
||||
}
|
||||
|
||||
JAR_FSEEK (fp, 0, (PRSeekWhence)0);
|
||||
|
@ -982,8 +985,6 @@ static int jar_listtar (JAR *jar, JAR_FILE fp)
|
|||
|
||||
/* phy things */
|
||||
|
||||
ZZLink *ent;
|
||||
JAR_Item *it;
|
||||
JAR_Physical *phy;
|
||||
|
||||
while (1)
|
||||
|
|
|
@ -44,9 +44,9 @@ extern CERTCertDBHandle *JAR_open_database (void);
|
|||
|
||||
extern int JAR_close_database (CERTCertDBHandle *certdb);
|
||||
|
||||
extern int jar_close_key_database (SECKEYKeyDBHandle *keydb);
|
||||
extern int jar_close_key_database (void *keydb);
|
||||
|
||||
extern SECKEYKeyDBHandle *jar_open_key_database (void);
|
||||
extern void *jar_open_key_database (void);
|
||||
|
||||
extern JAR_Signer *JAR_new_signer (void);
|
||||
|
||||
|
@ -110,7 +110,7 @@ JAR_FOPEN_to_PR_Open(const char *name, const char *mode);
|
|||
#endif
|
||||
|
||||
int jar_create_pk7
|
||||
(CERTCertDBHandle *certdb, SECKEYKeyDBHandle *keydb,
|
||||
(CERTCertDBHandle *certdb, void *keydb,
|
||||
CERTCertificate *cert, char *password, JAR_FILE infp,
|
||||
JAR_FILE outfp);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ static SECStatus jar_list_cert_callback
|
|||
|
||||
char *JAR_JAR_list_certs (void)
|
||||
{
|
||||
SECStatus status;
|
||||
SECStatus status = SECFailure;
|
||||
CERTCertDBHandle *certdb;
|
||||
|
||||
char *ugly_list;
|
||||
|
@ -132,7 +132,7 @@ char *JAR_JAR_list_certs (void)
|
|||
|
||||
JAR_close_database (certdb);
|
||||
|
||||
return status ? NULL : ugly_list;
|
||||
return (status != SECSuccess) ? NULL : ugly_list;
|
||||
}
|
||||
|
||||
int JAR_JAR_validate_archive (char *filename)
|
||||
|
@ -312,7 +312,7 @@ int JAR_JAR_sign_archive
|
|||
JAR_FILE out_fp;
|
||||
|
||||
CERTCertDBHandle *certdb;
|
||||
SECKEYKeyDBHandle *keydb;
|
||||
void *keydb;
|
||||
|
||||
CERTCertificate *cert;
|
||||
|
||||
|
|
|
@ -225,19 +225,12 @@ int JAR_digest_file (char *filename, JAR_Digest *dig)
|
|||
*
|
||||
*/
|
||||
|
||||
SECKEYKeyDBHandle *jar_open_key_database (void)
|
||||
void* jar_open_key_database (void)
|
||||
{
|
||||
SECKEYKeyDBHandle *keydb;
|
||||
|
||||
keydb = SECKEY_GetDefaultKeyDB();
|
||||
|
||||
if (keydb == NULL)
|
||||
{ /* open by file if this fails, if jartool is to call this */ ; }
|
||||
|
||||
return keydb;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int jar_close_key_database (SECKEYKeyDBHandle *keydb)
|
||||
int jar_close_key_database (void *keydb)
|
||||
{
|
||||
/* We never do close it */
|
||||
return 0;
|
||||
|
@ -255,7 +248,7 @@ static void jar_pk7_out (void *arg, const char *buf, unsigned long len)
|
|||
}
|
||||
|
||||
int jar_create_pk7
|
||||
(CERTCertDBHandle *certdb, SECKEYKeyDBHandle *keydb,
|
||||
(CERTCertDBHandle *certdb, void *keydb,
|
||||
CERTCertificate *cert, char *password, JAR_FILE infp, JAR_FILE outfp)
|
||||
{
|
||||
int nb;
|
||||
|
|
|
@ -86,8 +86,6 @@ SECStatus SEC_TraversePermCerts
|
|||
static int jar_validate_pkcs7
|
||||
(JAR *jar, JAR_Signer *signer, char *data, long length);
|
||||
|
||||
static int jar_decode (JAR *jar, char *data, long length);
|
||||
|
||||
static void jar_catch_bytes
|
||||
(void *arg, const char *buf, unsigned long len);
|
||||
|
||||
|
@ -120,7 +118,9 @@ static char *jar_basename (const char *path);
|
|||
static int jar_signal
|
||||
(int status, JAR *jar, const char *metafile, char *pathname);
|
||||
|
||||
#ifdef DEBUG
|
||||
static int jar_insanity_check (char ZHUGEP *data, long length);
|
||||
#endif
|
||||
|
||||
int jar_parse_mf
|
||||
(JAR *jar, char ZHUGEP *raw_manifest,
|
||||
|
@ -1658,7 +1658,7 @@ static int jar_validate_pkcs7
|
|||
{
|
||||
SECItem detdig;
|
||||
|
||||
SEC_PKCS7ContentInfo *cinfo;
|
||||
SEC_PKCS7ContentInfo *cinfo = NULL;
|
||||
SEC_PKCS7DecoderContext *dcx;
|
||||
|
||||
int status = 0;
|
||||
|
@ -1870,7 +1870,7 @@ static CERTCertificate *jar_get_certificate
|
|||
int found = 0;
|
||||
|
||||
JAR_Item *it;
|
||||
JAR_Cert *fing;
|
||||
JAR_Cert *fing = NULL;
|
||||
|
||||
JAR_Context *ctx;
|
||||
|
||||
|
@ -1907,6 +1907,7 @@ static CERTCertificate *jar_get_certificate
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PORT_Assert(fing != NULL);
|
||||
*result = 0;
|
||||
return fing->cert;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче