Fix for gcc4

delete my bogus default password
This commit is contained in:
Christian Hohnstaedt 2006-11-28 13:12:22 +01:00 committed by Christian Hohnstaedt
parent f157c20c0b
commit 6f3932983a
7 changed files with 14 additions and 14 deletions

2
configure vendored
View File

@ -33,7 +33,7 @@ if test "$HOST" = "linux"; then
STDINC="-I/usr/include"
STDLIB="-L/usr/lib"
prefix=${prefix:=/usr/local}
CFLAGS=${CFLAGS:=-Wall -ggdb -O2}
CFLAGS=${CFLAGS:=-Wall -ggdb}
fi
if test "$HOST" = "w32"; then
LIBS="-lQtCore4 -lstdc++ -lqtmain -lws2_32 -lwsock32 -lgdi32"

View File

@ -73,7 +73,7 @@ class a1time
QString toPlain() const;
QString toSortable() const;
int ymdg(int *y, int *m, int *d, int *g) const;
int a1time::ymdg(int *y, int *m, int *d, int *h, int *M, int *s, int *g) const;
int ymdg(int *y, int *m, int *d, int *h, int *M, int *s, int *g) const;
ASN1_TIME *get() const;
ASN1_TIME *get_utc() const;
a1time &now(int delta = 0);

View File

@ -117,7 +117,7 @@ void db_crl::inToCont(pki_base *pki)
pki_base *db_crl::insert(pki_base *item)
{
pki_crl * crl = (pki_crl *)item;
pki_crl *crl = (pki_crl *)item;
pki_crl *oldcrl = (pki_crl *)getByReference(crl);
if (oldcrl) {
QMessageBox::information(NULL, XCA_TITLE,
@ -190,13 +190,12 @@ pki_crl *db_crl::newItem(pki_x509 *cert)
crl->createCrl(cert->getIntName(), cert);
list = mainwin->certs->getIssuedCerts(cert);
if (!list.isEmpty()) {
for (int i =0; i<list.size(); i++) {
if (list.at(i)->isRevoked() ) {
crl->addRev(list.at(i)->getRev());
}
for (int i =0; i<list.size(); i++) {
if (list.at(i)->isRevoked() ) {
crl->addRev(list.at(i)->getRev());
}
}
crl->addV3ext(e.create(NID_authority_key_identifier,
"keyid,issuer", &ext_ctx));
if (cert->hasExtension(NID_subject_alt_name)) {

View File

@ -59,7 +59,7 @@
#include <widgets/MainWindow.h>
char pki_key::passwd[40]={0,};
char pki_key::oldpasswd[40]={ 'p', 'a', 's', 's', 0,};
char pki_key::oldpasswd[40]={0,};
QString pki_key::passHash = QString();
QPixmap *pki_key::icon[2]= { NULL, NULL };

View File

@ -93,7 +93,7 @@ class pki_key: public pki_base
/* destructor */
~pki_key();
QString pki_key::getTypeString(void);
QString getTypeString(void);
QString getIntNameWithType(void);
static QString removeTypeFromIntName(QString n);
void fload(const QString fname);

View File

@ -384,7 +384,7 @@ void pki_temp::oldFromData(unsigned char *p, int size )
if (version >= 3) {
authInfAcc=db::stringFromData(&p1);
certPol=db::stringFromData(&p1);
validMidn=db::intFromData(&p1);
validMidn=db::boolFromData(&p1);
}
if (p1-p != size) {

View File

@ -120,21 +120,22 @@ void MainWindow::import_dbdump()
delete dlg;
}
pass_info p(tr("New Password"),
pass_info p(tr("Import password"),
tr("Please enter the password of the old database"));
if (passRead(buf, 50, 0, &p) <0)
return;
pass = buf;
try {
read_dump(CCHAR(file), dbl, buf);
printf("MD5:%s, r:%s\n", CCHAR(pki_key::md5passwd(CCHAR(pass))),buf);
if (pki_key::md5passwd("pass") != buf) {
//printf("MD5:%s, r:%s\n", CCHAR(pki_key::md5passwd(CCHAR(pass))),buf);
if (pki_key::md5passwd(CCHAR(pass)) != buf) {
int ret = QMessageBox::warning(this, tr(XCA_TITLE),
tr("Password verification error. Ignore keys ?"),
tr("Import anyway"), tr("Cancel"));
if (ret)
return;
}
strncpy(pki_key::oldpasswd, CCHAR(pass), 40);
read_dump(CCHAR(file), dbl, NULL);
} catch (errorEx &err) {
Error(err);