diff --git a/Makefile b/Makefile index b0dda520..d63f0912 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ xca$(SUFFIX): $(OBJECTS) @$(PRINT) " LINK $@" $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(patsubst %,@%, $^) $(LIBS) -o $@ -do.ui do.doc do.lang: do.%: +do.ui do.doc do.lang do.misc: do.%: mkdir -p $* $(MAKE) -C $* -f $(TOPDIR)/$*/Makefile VPATH=$(TOPDIR)/$* $* @@ -100,7 +100,7 @@ clean: -o -name ".depend" \ -o -name "moc_*.cpp" | xargs rm -f rm -f ui/ui_*.h lang/xca_*.qm doc/*.html doc/xca.1.gz doc/xca_db_stat.1.gz img/imgres.cpp - rm -f lang/*.xml lang/.build-stamp + rm -f lang/*.xml lang/.build-stamp misc/dn.txt misc/eku.txt misc/oids.txt rm -f xca$(SUFFIX) setup_xca*.exe xca_db_stat$(SUFFIX) lib/xca_db_stat$(SUFFIX) *.dmg rm -rf xca-$(VERSION)* @@ -133,7 +133,7 @@ install: xca$(SUFFIX) xca_db_stat$(SUFFIX) $(INSTTARGET) $(STRIP) $(destdir)$(bindir)/xca setup.exe: setup_xca-$(VERSION).exe -setup_xca-$(VERSION).exe: xca$(SUFFIX) xca_db_stat$(SUFFIX) do.doc do.lang +setup_xca-$(VERSION).exe: xca$(SUFFIX) xca_db_stat$(SUFFIX) do.doc do.lang do.misc setup_xca-$(VERSION).exe: misc/xca.nsi for binary in xca$(SUFFIX) xca_db_stat$(SUFFIX); do \ $(STRIP) xca$(SUFFIX); \ diff --git a/doc/xca-doc.tgz b/doc/xca-doc.tgz index 92ab36bf..a9f57dd7 100644 Binary files a/doc/xca-doc.tgz and b/doc/xca-doc.tgz differ diff --git a/doc/xca.sgml b/doc/xca.sgml index 5f4fe251..9469c5e0 100644 --- a/doc/xca.sgml +++ b/doc/xca.sgml @@ -1417,7 +1417,6 @@ The files are: oids.txt addidtional Object IDs eku.txt Content of ExtendedKeyUsage dn.txt Content of DistinguishedName - aia.txt Content of AuthorityInformationAccess The search path for all the files is listed below. @@ -1441,11 +1440,23 @@ The oids.txt file is searched in reversed order and all Windows + CSIDL_APPDATA\xca, which is something like + C:\Documents and Settings\username\Application Data\xca + or C:\Users\username\AppData\Roaming\xca Installation directory e.g.: C:\Programs\xca

+MacOSX + + + $HOME/.xca/ + Application dir: xca.app/Resources + + +

+ New OIDs

@@ -1465,7 +1476,7 @@ Lines starting with a # are ignored.

-The files containing OID lists (eku.txt, dn.txt, aia.txt) +The files containing OID lists (eku.txt, dn.txt) are handled in a different way, only the first one found is used. The format of this files is one entry per line. The entry can be either the numerical OID like 1.3.6.1.5.5.8.2.2, the short name like diff --git a/lib/oid.cpp b/lib/oid.cpp index 138b9be7..cc434f03 100644 --- a/lib/oid.cpp +++ b/lib/oid.cpp @@ -112,8 +112,8 @@ void initOIDs() #if !defined(Q_OS_MAC) readOIDs(QString(ETC) + oids); #endif - readOIDs(getUserSettingsDir() + oids); #endif + readOIDs(getUserSettingsDir() + oids); } /* reads a list of OIDs/SNs from a file and turns them into a QValueList diff --git a/misc/Makefile b/misc/Makefile index 683c14b0..3be588f5 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -1,15 +1,34 @@ SRCPATH=$(VPATH)/ - -all: +ifeq ($(TOPDIR),) +TOPDIR=.. +BUILD=.. +endif include $(TOPDIR)/Rules.mak +CONFIG_OBJ = dn.txt oids.txt eku.txt + +misc all: $(CONFIG_OBJ) + +MSG := \# Do not edit this file, rather use + +%.txt: %.text + @$(PRINT) " GEN [$(BASENAME)] $@" +ifeq ($(HOST), w32) + (echo "$(MSG) PROFILE\Application Data\xca\$@" && cat $^) | sed 's/$$/\r/' > $@ +else ifneq ($(DARWIN),) + (echo "$(MSG) HOME/Library/Preferences/xca/$@" && cat $^) > $@ +else + (echo "$(MSG) /etc/xca/$@ or HOME/.xca/$@" && cat $^) > $@ +endif + + install: install -m 755 -d $(destdir)$(xca_prefix) \ $(destdir)$(datarootdir)/applications \ $(destdir)$(datarootdir)/mime/packages - install -m 644 $(SRCPATH)*.txt $(SRCPATH)*.xca \ + install -m 644 $(CONFIG_OBJ) $(SRCPATH)*.xca \ $(destdir)$(xca_prefix) install -m 644 $(SRCPATH)xca.desktop $(destdir)$(datarootdir)/applications install -m 644 $(SRCPATH)xca.xml $(destdir)$(datarootdir)/mime/packages diff --git a/misc/aia.txt b/misc/aia.txt deleted file mode 100644 index 1bcad0b5..00000000 --- a/misc/aia.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Do not edit this file, rather use /etc/xca/aia.txt or $HOME/.xca/aia.txt -OCSP -caIssuers diff --git a/misc/dn.txt b/misc/dn.text similarity index 74% rename from misc/dn.txt rename to misc/dn.text index d3f0fcb7..6bea5cd0 100644 --- a/misc/dn.txt +++ b/misc/dn.text @@ -1,4 +1,3 @@ -# Do not edit this file, rather use /etc/xca/dn.txt or $HOME/.xca/dn.txt C ST L diff --git a/misc/eku.txt b/misc/eku.text similarity index 76% rename from misc/eku.txt rename to misc/eku.text index ba3ccdc6..988ef517 100644 --- a/misc/eku.txt +++ b/misc/eku.text @@ -1,4 +1,3 @@ -# Do not edit this file, rather use /etc/xca/eku.txt or $HOME/.xca/eku.txt serverAuth clientAuth codeSigning diff --git a/misc/oids.txt b/misc/oids.text similarity index 91% rename from misc/oids.txt rename to misc/oids.text index 7a1ee741..d1939eff 100644 --- a/misc/oids.txt +++ b/misc/oids.text @@ -1,5 +1,3 @@ -# Do not edit this file, add your own OIDs in /etc/xca/oids.txt -# or $HOME/.xca # OID short name long name 1.3.6.1.4.1.311.20.2: dom: Domain Controller diff --git a/misc/xca.nsi b/misc/xca.nsi index 3fb4b8c2..c20a0aa0 100755 --- a/misc/xca.nsi +++ b/misc/xca.nsi @@ -68,10 +68,9 @@ Section "xca (required)" SecMain ; Put files there File "xca.exe" File "xca_db_stat.exe" - File "${TOPDIR}/misc\dn.txt" - File "${TOPDIR}/misc\eku.txt" - File "${TOPDIR}/misc\oids.txt" - File "${TOPDIR}/misc\aia.txt" + File "misc\dn.txt" + File "misc\eku.txt" + File "misc\oids.txt" File "${TOPDIR}/misc\*.xca" File "doc\*.html" @@ -96,6 +95,7 @@ Section "xca (required)" SecMain Delete "$INSTDIR\QtGui4.dll" Delete "$INSTDIR\QtCore4.dll" Delete "$INSTDIR\mingwm10.dll" + Delete "$INSTDIR\aia.txt" ; remove old images ; Write the installation path into the registry diff --git a/ui/NewX509.ui b/ui/NewX509.ui index 94fdeba1..d3d82068 100644 --- a/ui/NewX509.ui +++ b/ui/NewX509.ui @@ -878,9 +878,6 @@ - - can be altered by the file "aia.txt" - diff --git a/widgets/MainWindow.cpp b/widgets/MainWindow.cpp index c068c58b..452f8109 100644 --- a/widgets/MainWindow.cpp +++ b/widgets/MainWindow.cpp @@ -55,7 +55,6 @@ db_crl *MainWindow::crls = NULL; NIDlist *MainWindow::eku_nid = NULL; NIDlist *MainWindow::dn_nid = NULL; -NIDlist *MainWindow::aia_nid = NULL; QString MainWindow::mandatory_dn; QString MainWindow::explicit_dn; @@ -141,7 +140,6 @@ MainWindow::MainWindow(QWidget *parent) eku_nid = read_nidlist("eku.txt"); dn_nid = read_nidlist("dn.txt"); - aia_nid = read_nidlist("aia.txt"); setAcceptDrops(true); @@ -218,9 +216,9 @@ NIDlist *MainWindow::read_nidlist(QString name) NIDlist nl; name = QDir::separator() + name; -#if !defined(Q_OS_WIN32) /* first try $HOME/xca/ */ nl = readNIDlist(getUserSettingsDir() + name); +#if !defined(Q_OS_WIN32) #if !defined(Q_OS_MAC) if (nl.count() == 0){ /* next is /etx/xca/... */ @@ -580,8 +578,6 @@ MainWindow::~MainWindow() delete eku_nid; if (dn_nid) delete dn_nid; - if (aia_nid) - delete aia_nid; delete dbindex; #ifdef MDEBUG fprintf(stderr, "Memdebug:\n"); diff --git a/widgets/MainWindow.h b/widgets/MainWindow.h index 8a30d4e4..9f728c9e 100644 --- a/widgets/MainWindow.h +++ b/widgets/MainWindow.h @@ -110,7 +110,7 @@ class MainWindow: public QMainWindow, public Ui::MainWindow static QPixmap *keyImg, *csrImg, *certImg, *tempImg, *nsImg, *revImg, *appIco, *scardImg, *doneIco, *warnIco; - static NIDlist *eku_nid, *dn_nid, *aia_nid; + static NIDlist *eku_nid, *dn_nid; static QString mandatory_dn; static QString explicit_dn; static QString explicit_dn_default; diff --git a/widgets/NewX509.cpp b/widgets/NewX509.cpp index 3dba87e5..844eb42c 100644 --- a/widgets/NewX509.cpp +++ b/widgets/NewX509.cpp @@ -32,7 +32,7 @@ NewX509::NewX509(QWidget *parent) int i; eku_nid = *MainWindow::eku_nid; dn_nid = *MainWindow::dn_nid; - aia_nid = *MainWindow::aia_nid; + aia_nid << OBJ_sn2nid("OCSP") << OBJ_sn2nid("caIssuers"); attr_nid << NID_pkcs9_unstructuredName << NID_pkcs9_challengePassword; foreach(QString dn, MainWindow::explicit_dn.split(",")) expl_dn_nid << OBJ_sn2nid(CCHAR(dn)); diff --git a/xca.pro b/xca.pro index 23b11607..ab2ed139 100644 --- a/xca.pro +++ b/xca.pro @@ -12,7 +12,7 @@ RC_FILE = img/w32res.rc macx { ICON = img/xca-mac-icon.icns CONFIG += release_and_debug - XCA_RESOURCES.files = misc/oids.txt misc/aia.txt misc/CA.xca misc/dn.txt misc/eku.txt misc/HTTPS_client.xca misc/HTTPS_server.xca + XCA_RESOURCES.files = misc/oids.txt misc/CA.xca misc/dn.txt misc/eku.txt misc/HTTPS_client.xca misc/HTTPS_server.xca XCA_RESOURCES.files += lang/xca_de.qm lang/xca_es.qm lang/xca_ru.qm lang/xca_fr.qm lang/xca_hr.qm XCA_RESOURCES.path = Contents/Resources QMAKE_BUNDLE_DATA += XCA_RESOURCES