mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Fix for gcc4
delete my bogus default password
This commit is contained in:
parent
f157c20c0b
commit
6f3932983a
2
configure
vendored
2
configure
vendored
@ -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"
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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 };
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user