Cleanup the OID text files, remove senseless aia.txt

- Remove all aia.txt from the Code, Documentation and ToolTip
- Add an Operating system dependent help hint
- Replace unix LF by DOS CR-LF for windows installation
This commit is contained in:
Christian Hohnstaedt 2018-01-31 22:16:04 +01:00
parent 8333482eef
commit 3f35cdccf8
15 changed files with 47 additions and 31 deletions

View File

@ -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); \

Binary file not shown.

View File

@ -1417,7 +1417,6 @@ The files are:
<item><bf>oids.txt</bf> addidtional Object IDs
<item><bf>eku.txt</bf> Content of <tt>ExtendedKeyUsage</tt>
<item><bf>dn.txt</bf> Content of <tt>DistinguishedName</tt>
<item><bf>aia.txt</bf> Content of <tt>AuthorityInformationAccess</tt>
</itemize>
The search path for all the files is listed below.
@ -1441,11 +1440,23 @@ The <em>oids.txt</em> file is searched in reversed order and all
<bf>Windows</bf>
<itemize>
<item>CSIDL_APPDATA\xca, which is something like<newline>
C:\Documents and Settings\username\Application Data\xca<newline>
or C:\Users\username\AppData\Roaming\xca
<item>Installation directory <newline>e.g.: C:\Programs\xca
</itemize>
<p>
<bf>MacOSX</bf>
<itemize>
<item>$HOME/.xca/
<item>Application dir: xca.app/Resources
</itemize>
<p>
<sect1>New OIDs <label id="new_oids">
<p>
@ -1465,7 +1476,7 @@ Lines starting with a <bf>#</bf> are ignored.
<p>
The files containing OID lists (<tt>eku.txt, dn.txt, aia.txt</tt>)
The files containing OID lists (<tt>eku.txt, dn.txt</tt>)
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 <tt>1.3.6.1.5.5.8.2.2</tt>, the short name like

View File

@ -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

View File

@ -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

View File

@ -1,3 +0,0 @@
# Do not edit this file, rather use /etc/xca/aia.txt or $HOME/.xca/aia.txt
OCSP
caIssuers

View File

@ -1,4 +1,3 @@
# Do not edit this file, rather use /etc/xca/dn.txt or $HOME/.xca/dn.txt
C
ST
L

View File

@ -1,4 +1,3 @@
# Do not edit this file, rather use /etc/xca/eku.txt or $HOME/.xca/eku.txt
serverAuth
clientAuth
codeSigning

View File

@ -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

View File

@ -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

View File

@ -878,9 +878,6 @@
</item>
<item row="3" column="2">
<widget class="QComboBox" name="aiaOid">
<property name="toolTip">
<string>can be altered by the file &quot;aia.txt&quot;</string>
</property>
</widget>
</item>
<item row="3" column="3">

View File

@ -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");

View File

@ -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;

View File

@ -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));

View File

@ -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