rpms/xca/devel xca-0.8.0-noec.patch, NONE, 1.1 xca.spec, 1.31, 1.32 sources, 1.9, 1.10 lastver, 1.2, 1.3 .cvsignore, 1.4, 1.5
ensc
ensc at fedoraproject.org
Sun Jan 3 12:46:09 UTC 2010
Author: ensc
Update of /cvs/extras/rpms/xca/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1663
Modified Files:
xca.spec sources lastver .cvsignore
Added Files:
xca-0.8.0-noec.patch
Log Message:
updated to 0.8.0
xca-0.8.0-noec.patch:
lib/pki_evp.cpp | 14 ++++++++++++++
lib/pki_evp.h | 2 ++
lib/pki_key.cpp | 2 ++
lib/pki_scard.cpp | 4 ++++
widgets/KeyDetail.cpp | 4 ++++
widgets/MainWindow.cpp | 2 ++
widgets/NewKey.cpp | 5 +++++
widgets/hashBox.cpp | 2 ++
8 files changed, 35 insertions(+)
--- NEW FILE xca-0.8.0-noec.patch ---
Index: xca-0.8.0/lib/pki_evp.cpp
===================================================================
--- xca-0.8.0.orig/lib/pki_evp.cpp
+++ xca-0.8.0/lib/pki_evp.cpp
@@ -25,9 +25,11 @@ QString pki_evp::passHash = QString();
QPixmap *pki_evp::icon[2]= { NULL, NULL };
+#ifndef DISABLE_EC
EC_builtin_curve *pki_evp::curves = NULL;
size_t pki_evp::num_curves = 0;
unsigned char *pki_evp::curve_flags = NULL;
+#endif
void pki_evp::erasePasswd()
{
@@ -107,7 +109,9 @@ void pki_evp::generate(int bits, int typ
{
RSA *rsakey;
DSA *dsakey;
+#ifndef DISABLE_EC
EC_KEY *eckey;
+#endif
progress->setMinimum(0);
progress->setMaximum(100);
@@ -127,6 +131,7 @@ void pki_evp::generate(int bits, int typ
if (dsakey)
EVP_PKEY_set1_DSA(key, dsakey);
break;
+#ifndef DISABLE_EC
case EVP_PKEY_EC:
EC_GROUP *group = EC_GROUP_new_by_curve_name(curve_nid);
if (!group)
@@ -147,6 +152,7 @@ void pki_evp::generate(int bits, int typ
EC_KEY_free(eckey);
EC_GROUP_free(group);
break;
+#endif
}
openssl_error();
encryptKey();
@@ -190,8 +196,10 @@ static bool EVP_PKEY_isPrivKey(EVP_PKEY
return key->pkey.rsa->d ? true: false;
case EVP_PKEY_DSA:
return key->pkey.dsa->priv_key ? true: false;
+#ifndef DISABLE_EC
case EVP_PKEY_EC:
return EC_KEY_get0_private_key(key->pkey.ec) ? true: false;
+#endif
}
return false;
}
@@ -236,6 +244,7 @@ void pki_evp::fromPEM_BIO(BIO *bio, QStr
openssl_error(name);
}
+#ifndef DISABLE_EC
static void search_ec_oid(EC_KEY *ec)
{
const EC_GROUP *ec_group = EC_KEY_get0_group(ec);
@@ -260,6 +269,7 @@ static void search_ec_oid(EC_KEY *ec)
}
}
}
+#endif
void pki_evp::fload(const QString fname)
{
@@ -301,8 +311,10 @@ void pki_evp::fload(const QString fname)
}
fclose(fp);
if (pkey){
+#ifndef DISABLE_EC
if (pkey->type == EVP_PKEY_EC)
search_ec_oid(pkey->pkey.ec);
+#endif
if (key)
EVP_PKEY_free(key);
key = pkey;
@@ -680,7 +692,9 @@ const EVP_MD *pki_evp::getDefaultMD()
switch (key->type) {
case EVP_PKEY_RSA: md = EVP_sha1(); break;
case EVP_PKEY_DSA: md = EVP_dss1(); break;
+#ifndef DISABLE_EC
case EVP_PKEY_EC: md = EVP_ecdsa(); break;
+#endif
default: md = NULL; break;
}
return md;
Index: xca-0.8.0/lib/pki_scard.cpp
===================================================================
--- xca-0.8.0.orig/lib/pki_scard.cpp
+++ xca-0.8.0/lib/pki_scard.cpp
@@ -178,6 +178,7 @@ EVP_PKEY *pki_scard::load_pubkey(pkcs11
EVP_PKEY_set1_DSA(pkey, dsa);
break;
}
+#ifndef DISABLE_EC
case CKK_EC: {
EC_KEY *ec = EC_KEY_new();
@@ -202,6 +203,7 @@ EVP_PKEY *pki_scard::load_pubkey(pkcs11
EVP_PKEY_set1_EC_KEY(pkey, ec);
break;
}
+#endif
default:
throw errorEx(QString("Unsupported CKA_KEY_TYPE: %1\n").arg(keytype));
}
@@ -304,8 +306,10 @@ const EVP_MD *pki_scard::getDefaultMD()
return EVP_sha1();
if (mech_list.contains(CKM_DSA_SHA1))
return EVP_dss1();
+#ifndef DISABLE_EC
if (mech_list.contains(CKM_ECDSA_SHA1))
return EVP_ecdsa();
+#endif
if (mech_list.contains(CKM_SHA512_RSA_PKCS))
return EVP_sha512();
if (mech_list.contains(CKM_SHA384_RSA_PKCS))
Index: xca-0.8.0/widgets/KeyDetail.cpp
===================================================================
--- xca-0.8.0.orig/widgets/KeyDetail.cpp
+++ xca-0.8.0/widgets/KeyDetail.cpp
@@ -25,6 +25,7 @@ KeyDetail::KeyDetail(QWidget *parent)
keyDesc->setReadOnly(true);
}
+#ifndef DISABLE_EC
static QString CurveComment(int nid)
{
for (size_t i=0; i<pki_evp::num_curves; i++) {
@@ -33,6 +34,7 @@ static QString CurveComment(int nid)
}
return QString();
}
+#endif
void KeyDetail::setKey(pki_key *key)
{
@@ -75,6 +77,7 @@ void KeyDetail::setKey(pki_key *key)
keyPubEx->setText(key->subprime());
keyModulus->setText(key->pubkey());
break;
+#ifndef DISABLE_EC
case EVP_PKEY_EC:
nid = key->ecParamNid();
tlModulus->setText(tr("Public key"));
@@ -84,6 +87,7 @@ void KeyDetail::setKey(pki_key *key)
keyPubEx->setToolTip(CurveComment(nid));
keyModulus->setText(key->ecPubKey());
break;
+#endif
default:
tlHeader->setText(tr("UNKNOWN Key"));
}
Index: xca-0.8.0/widgets/NewKey.cpp
===================================================================
--- xca-0.8.0.orig/widgets/NewKey.cpp
+++ xca-0.8.0/widgets/NewKey.cpp
@@ -23,7 +23,9 @@ struct typelist {
static const struct typelist typeList[] = {
{ "RSA", EVP_PKEY_RSA },
{ "DSA", EVP_PKEY_DSA },
+#ifndef DISABLE_EC
{ "EC", EVP_PKEY_EC },
+#endif
};
NewKey::NewKey(QWidget *parent, QString name)
@@ -48,6 +50,7 @@ NewKey::NewKey(QWidget *parent, QString
keyType->addItem(QString(typeList[i].name));
}
+#ifndef DISABLE_EC
for (i = 0; i<pki_evp::num_curves; i++) {
const char *desc = pki_evp::curves[i].comment;
const char *sn = OBJ_nid2sn(pki_evp::curves[i].nid);
@@ -65,6 +68,8 @@ NewKey::NewKey(QWidget *parent, QString
}
curveBox->addItems(curve_x962);
curveBox->addItems(curve_other);
+#endif
+
keyLength->setCurrentIndex(0);
keyDesc->setFocus();
}
Index: xca-0.8.0/widgets/hashBox.cpp
===================================================================
--- xca-0.8.0.orig/widgets/hashBox.cpp
+++ xca-0.8.0/widgets/hashBox.cpp
@@ -42,8 +42,10 @@ const EVP_MD *hashBox::currentHash()
switch(key_type) {
case EVP_PKEY_DSA:
return EVP_dss1();
+#ifndef DISABLE_EC
case EVP_PKEY_EC:
return EVP_ecdsa();
+#endif
default:
QString hash = currentText();
for (unsigned i=0; i<ARRAY_SIZE(hashalgos); i++) {
Index: xca-0.8.0/lib/pki_evp.h
===================================================================
--- xca-0.8.0.orig/lib/pki_evp.h
+++ xca-0.8.0/lib/pki_evp.h
@@ -40,9 +40,11 @@ class pki_evp: public pki_key
static void setOldPasswd(const char *pass);
static QString md5passwd(const char *pass);
static QString sha512passwd(QString pass, QString salt);
+#ifndef DISABLE_EC
static EC_builtin_curve *curves;
static size_t num_curves;
static unsigned char *curve_flags;
+#endif
void generate(int bits, int type, QProgressBar *progress);
void generate(int bits, int type, QProgressBar *progress,
Index: xca-0.8.0/lib/pki_key.cpp
===================================================================
--- xca-0.8.0.orig/lib/pki_key.cpp
+++ xca-0.8.0/lib/pki_key.cpp
@@ -138,6 +138,7 @@ QString pki_key::pubkey()
return QString();
}
+#ifndef DISABLE_EC
int pki_key::ecParamNid()
{
if (key->type != EVP_PKEY_EC)
@@ -160,6 +161,7 @@ QString pki_key::ecPubKey()
}
return pub;
}
+#endif
bool pki_key::compare(pki_base *ref)
{
Index: xca-0.8.0/widgets/MainWindow.cpp
===================================================================
--- xca-0.8.0.orig/widgets/MainWindow.cpp
+++ xca-0.8.0/widgets/MainWindow.cpp
@@ -97,6 +97,7 @@ static const int other_curve_nids[] = {
static void init_curves()
{
+#ifndef DISABLE_EC
pki_evp::num_curves = EC_get_builtin_curves(NULL, 0);
pki_evp::curves = (EC_builtin_curve*)OPENSSL_malloc(
(int)(sizeof(EC_builtin_curve) *pki_evp::num_curves));
@@ -125,6 +126,7 @@ static void init_curves()
}
}
}
+#endif
}
void MainWindow::load_engine()
Index: xca.spec
===================================================================
RCS file: /cvs/extras/rpms/xca/devel/xca.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- xca.spec 13 Sep 2009 11:21:17 -0000 1.31
+++ xca.spec 3 Jan 2010 12:46:09 -0000 1.32
@@ -1,9 +1,11 @@
%{!?release_func:%global release_func() %1%{?dist}}
+%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
+%nil}
Summary: Graphical X.509 certificate management tool
Name: xca
-Version: 0.7.0
-Release: %release_func 0
+Version: 0.8.0
+Release: %release_func 1300
License: BSD
Group: Applications/Productivity
@@ -14,6 +16,7 @@ Source4: xca.xml
Patch0: xca-0.7.0-locale.patch
Patch2: xca-0.6.4-includes.patch
Patch3: xca-0.6.4-openssl10.patch
+Patch4: xca-0.8.0-noec.patch
BuildRoot: %_tmppath/%name-%version-%release-buildroot
BuildRequires: qt4-devel openssl-devel
BuildRequires: db4-devel
@@ -38,14 +41,10 @@ PEM, DER, PKCS#8.
%prep
%setup -q
-%if 0
-quilt import %PATCH0 %PATCH2 %PATCH3
-quilt push -a
-%else
-%patch0 -p1
-%patch2 -p1
-%patch3 -p1
-%endif
+%apply -n0 -p1
+%apply -n2 -p1
+%apply -n3 -p1
+%apply -n4 -p1
mkdir -p _tmp_root/usr
ln -s /usr/%_lib _tmp_root/usr/lib
@@ -60,7 +59,7 @@ sed -i -e 's!xca\.xpm!fedora-xca!g;s!^Ex
%build
#test -n "$QTDIR" || . %_sysconfdir/profile.d/qt.sh
export QTDIR=%_libdir/qt4
-CC='%__cc' LD='%__ld' CFLAGS="$RPM_OPT_FLAGS -DXCA_DEFAULT_TRANSLATE=\\\"%_datadir/qt4/translations\\\"" STRIP=: prefix=%_prefix \
+CC='%__cc' LD='%__ld' CFLAGS="$RPM_OPT_FLAGS -DDISABLE_EC -DXCA_DEFAULT_TRANSLATE=\\\"%_datadir/qt4/translations\\\"" STRIP=: prefix=%_prefix \
./configure `pwd`/_tmp_root{,/usr}
make %{?_smp_mflags}
@@ -136,6 +135,11 @@ gtk-update-icon-cache %_datadir/icons/hi
%changelog
+* Sun Jan 3 2010 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.8.0-1300
+- updated to 0.8.0
+- added patch to disable elliptic curve code because these algorithms
+ are removed in Fedora's openssl
+
* Sun Sep 13 2009 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.7.0-0
- updated to 0.7.0; rediffed patches
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/xca/devel/sources,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- sources 13 Sep 2009 11:22:52 -0000 1.9
+++ sources 3 Jan 2010 12:46:09 -0000 1.10
@@ -1 +1 @@
-c6d6bfb1955aecdd2829db5bb1290d00 xca-0.7.0.tar.gz
+ecd9f7e61bd9a8fcb2ed1a26836a7ec7 xca-0.8.0.tar.gz
Index: lastver
===================================================================
RCS file: /cvs/extras/rpms/xca/devel/lastver,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- lastver 13 Sep 2009 11:22:52 -0000 1.2
+++ lastver 3 Jan 2010 12:46:09 -0000 1.3
@@ -1 +1 @@
-0.7.0
+0.8.0
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/xca/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- .cvsignore 13 Sep 2009 11:22:52 -0000 1.4
+++ .cvsignore 3 Jan 2010 12:46:09 -0000 1.5
@@ -1 +1 @@
-xca-0.7.0.tar.gz
+xca-0.8.0.tar.gz
More information about the fedora-extras-commits
mailing list