Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Manuel Wolfshant
3e0fc791ee initial EL-5 version; includes hmac patch enabling compilation with old gcc 2013-08-13 18:04:07 +03:00
2 changed files with 81 additions and 1 deletions

73
ucommon-6.0.7.hmac.patch Normal file
View file

@ -0,0 +1,73 @@
diff -up ucommon-6.0.7/openssl/hmac.cpp.orig ucommon-6.0.7/openssl/hmac.cpp
--- ucommon-6.0.7/openssl/hmac.cpp.orig 2013-08-12 15:51:09.945378677 +0300
+++ ucommon-6.0.7/openssl/hmac.cpp 2013-08-13 00:26:11.198421932 +0300
@@ -17,12 +17,12 @@
#include "local.h"
-bool HMAC::has(const char *id)
+bool ucommon::HMAC::has(const char *id)
{
return (EVP_get_digestbyname(id) != NULL);
}
-void HMAC::set(const char *digest, const char *key, size_t len)
+void ucommon::HMAC::set(const char *digest, const char *key, size_t len)
{
secure::init();
@@ -33,13 +33,13 @@ void HMAC::set(const char *digest, const
hmactype = EVP_get_digestbyname(digest);
if(hmactype && len) {
- context = new HMAC_CTX;
+ context = new ::HMAC_CTX;
HMAC_CTX_init((HMAC_CTX *)context);
HMAC_Init((HMAC_CTX *)context, key, len, (const EVP_MD *)hmactype);
}
}
-void HMAC::release(void)
+void ucommon::HMAC::release(void)
{
if(context)
HMAC_cleanup((HMAC_CTX *)context);
@@ -53,7 +53,7 @@ void HMAC::release(void)
textbuf[0] = 0;
}
-bool HMAC::put(const void *address, size_t size)
+bool ucommon::HMAC::put(const void *address, size_t size)
{
if(!context)
return false;
@@ -62,7 +62,7 @@ bool HMAC::put(const void *address, size
return true;
}
-const unsigned char *HMAC::get(void)
+const unsigned char * ucommon::HMAC::get(void)
{
unsigned count = 0;
unsigned size = 0;
@@ -74,7 +74,7 @@ const unsigned char *HMAC::get(void)
return NULL;
HMAC_Final((HMAC_CTX *)context, buffer, &size);
- release();
+ ucommon::HMAC::release();
if(!size)
return NULL;
diff -up ucommon-6.0.7/openssl/local.h.orig ucommon-6.0.7/openssl/local.h
--- ucommon-6.0.7/openssl/local.h.orig 2013-08-12 23:49:24.326050100 +0300
+++ ucommon-6.0.7/openssl/local.h 2013-08-13 00:08:18.334677496 +0300
@@ -20,7 +20,7 @@
#include <ucommon/export.h>
#include <ucommon/secure.h>
#include <openssl/ssl.h>
-#include <openssl/evp.h>
+#include <openssl/hmac.h>
#include <openssl/rand.h>
#ifdef _MSWINDOWS_

View file

@ -11,10 +11,11 @@
Name: ucommon
Summary: Portable C++ framework for threads and sockets
Version: 6.0.7
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv3+
URL: http://www.gnu.org/software/commoncpp
Source0: http://www.gnutelephony.org/dist/tarballs/ucommon-%{version}.tar.gz
Patch0: ucommon-6.0.7.hmac.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: doxygen graphviz-gd openssl-devel
Group: System Environment/Libraries
@ -62,6 +63,9 @@ html browsable.
%prep
%setup -q
%patch0 -p1 -b .hmac
%build
%configure --disable-static
@ -123,6 +127,9 @@ html browsable.
%postun -p /sbin/ldconfig
%changelog
* Mon Aug 12 2013 manuel wolfshant <wolfy@fedoraproject.org> 6.0.7-2
- patch for older gcc
* Sun Jul 28 2013 David Sugar <dyfet@gnutelephony.org> - 6.0.7-1
- Fix for fsys error state reset on file open