rpms/ldns/devel ldns-1.2.x-key2ds-SHA256.patch, NONE, 1.1 ldns.spec, 1.12, 1.13
Paul Wouters (pwouters)
fedora-extras-commits at redhat.com
Wed Aug 8 13:53:21 UTC 2007
Author: pwouters
Update of /cvs/extras/rpms/ldns/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2851
Modified Files:
ldns.spec
Added Files:
ldns-1.2.x-key2ds-SHA256.patch
Log Message:
* Mon Aug 8 2007 Paul Wouters <paul at xelerance.com> 1.2.0-3
- Added sha256 DS record patch to ldns-key2ds
ldns-1.2.x-key2ds-SHA256.patch:
--- NEW FILE ldns-1.2.x-key2ds-SHA256.patch ---
Index: dnssec.c
===================================================================
--- dnssec.c (revision 2398)
+++ dnssec.c (revision 2400)
@@ -718,8 +718,15 @@
}
break;
case LDNS_SHA256:
- ldns_rr_free(ds);
- return NULL; /* not implemented */
+ #ifdef SHA256_DIGEST_LENGTH
+ digest = LDNS_XMALLOC(uint8_t, SHA256_DIGEST_LENGTH);
+ if (!digest) {
+ ldns_rr_free(ds);
+ return NULL;
+ }
+ #else
+ return NULL;
+ #endif
break;
}
@@ -771,6 +778,14 @@
break;
case LDNS_SHA256:
+#ifdef SHA256_DIGEST_LENGTH
+ (void) SHA256((unsigned char *) ldns_buffer_begin(data_buf),
+ ldns_buffer_position(data_buf),
+ (unsigned char*) digest);
+ tmp = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_HEX, SHA256_DIGEST_LENGTH,
+ digest);
+ ldns_rr_push_rdf(ds, tmp);
+#endif
break;
}
Index: examples/ldns-key2ds.c
===================================================================
--- examples/ldns-key2ds.c (revision 2398)
+++ examples/ldns-key2ds.c (revision 2400)
@@ -9,6 +9,7 @@
#include "config.h"
#include <ldns/ldns.h>
+#include <openssl/ssl.h>
#include <errno.h>
@@ -45,6 +46,9 @@
h = LDNS_SHA1;
}
if (strcmp(argv[0], "-2") == 0) {
+ #ifndef SHA256_DIGEST_LENGTH
+ fprintf(stderr, "Error: Crypto library does not support SHA256 digests!");
+ #endif
h = LDNS_SHA256;
}
argv++, argc--;
@@ -73,7 +77,7 @@
owner = ldns_rdf2str(ldns_rr_owner(k));
alg = ldns_rdf2native_int8(ldns_rr_dnskey_algorithm(k));
- ds = ldns_key_rr2ds(k, LDNS_SHA1);
+ ds = ldns_key_rr2ds(k, h);
if (!ds) {
fprintf(stderr, "Conversion to a DS RR failed\n");
ldns_rr_free(k);
Index: ldns.spec
===================================================================
RCS file: /cvs/extras/rpms/ldns/devel/ldns.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ldns.spec 12 Sep 2006 00:05:47 -0000 1.12
+++ ldns.spec 8 Aug 2007 13:52:48 -0000 1.13
@@ -1,10 +1,11 @@
Summary: Lowlevel DNS(SEC) library with API
Name: ldns
-Version: 1.0.1
-Release: 4%{?dist}
+Version: 1.2.0
+Release: 3%{?dist}
License: BSD
Url: http://open.nlnetlabs.nl/%{name}/
Source: http://open.nlnetlabs.nl/downloads/%{name}-%{version}.tar.gz
+Patch0: ldns-1.2.x-key2ds-SHA256.patch
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool, autoconf, automake, gcc-c++, openssl-devel, doxygen
@@ -25,22 +26,22 @@
%prep
%setup -q
+%patch0
+# left by upstream
+rm config.guess config.sub ltmain.sh
+chmod a-x doc/doxyparse.pl
+#temp enable
+libtoolize
+autoreconf
-#libtoolize
-#autoreconf
-%configure
-
+%configure --disable-rpath
%build
make %{?_smp_mflags}
-# for 1.0.1
-make drill examples
-# below configure commands depend on ldns having been built already :(
-# for 1.1.0
-#(cd drill ; %%configure --with-ldns=../ldns/)
-#(cd examples ; %%configure --with-ldns=../ldns/)
-#( cd drill ; make %%{?_smp_mflags} )
-#( cd examples ; make %%{?_smp_mflags} )
+(cd drill ; %configure --disable-rpath --with-ldns=../ldns/)
+(cd examples ; %configure --disable-rpath --with-ldns=../ldns/)
+( cd drill ; make %{?_smp_mflags} )
+( cd examples ; make %{?_smp_mflags} )
make %{?_smp_mflags} doc
%install
@@ -55,11 +56,8 @@
rm -rf doc/man
# remove .la files
rm -rf %{buildroot}%{_libdir}/*.la
-# for 1.0.1
-make drill-install examples-install
-# for 1.1.0
-#( cd drill ; make install )
-#( cd examples ; make install )
+(cd drill ; make install)
+(cd examples; make install)
%clean
rm -rf %{buildroot}
@@ -69,20 +67,29 @@
%{_libdir}/libldns*so
%{_bindir}/drill
%{_bindir}/ldns-*
-%doc README LICENSE ROADMAP TODO
+%{_bindir}/ldnsd
+%doc README LICENSE
%{_mandir}/*/*
%files devel
%defattr(-,root,root,-)
%{_libdir}/libldns.a
%dir %{_includedir}/ldns/*
-%doc doc Changelog COMPILE
+%doc doc Changelog README
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog
+* Mon Aug 8 2007 Paul Wouters <paul at xelerance.com> 1.2.0-3
+- Added sha256 DS record patch to ldns-key2ds
+
+* Mon Aug 6 2007 Paul Wouters <paul at xelerance.com> 1.2.0-2
+- Own the /usr/include/ldns directory (bug #233858)
+- Removed obsoleted patch
+- Remove files form previous libtool run accidentally packages by upstream
+
* Mon Sep 11 2006 Paul Wouters <paul at xelerance.com> 1.0.1-4
- Commented out 1.1.0 make targets, put make 1.0.1 targets.
More information about the fedora-extras-commits
mailing list