summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-11 16:09:28 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-11 16:09:28 +0100
commitfd761d18b02686b9a39e3fcf4882ca40a1b5c6a3 (patch)
tree58408657143f191070985999fdfd195ce685bb50 /lib
parent4af592f48f98f54f96e9baeecf853cf1a67b9c86 (diff)
downloadabrt-fd761d18b02686b9a39e3fcf4882ca40a1b5c6a3.tar.gz
abrt-fd761d18b02686b9a39e3fcf4882ca40a1b5c6a3.tar.xz
abrt-fd761d18b02686b9a39e3fcf4882ca40a1b5c6a3.zip
*: remove nss dependencies
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/CCpp.cpp13
-rw-r--r--lib/Plugins/CCpp_sha1.h2
-rw-r--r--lib/Plugins/Makefile.am7
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 6455f44..6c200d0 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -24,9 +24,8 @@
#include <sstream>
#include <set>
#include <iomanip>
-#include <nss.h>
-#include <sechash.h>
-#include <sysexits.h>
+//#include <nss.h>
+//#include <sechash.h>
#include "abrtlib.h"
#include "CCpp.h"
#include "ABRTException.h"
@@ -56,12 +55,11 @@ CAnalyzerCCpp::CAnalyzerCCpp() :
static string CreateHash(const char *pInput)
{
- string ret;
- char hash_str[SHA1_LENGTH*2 + 1];
unsigned int len;
#if 0
{
+ char hash_str[SHA1_LENGTH*2 + 1];
unsigned char hash[SHA1_LENGTH];
HASHContext *hc;
hc = HASH_Create(HASH_AlgSHA1);
@@ -88,12 +86,13 @@ static string CreateHash(const char *pInput)
}
#endif
- unsigned char hash2[SHA1_LENGTH];
+ char hash_str[SHA1_RESULT_LEN*2 + 1];
+ unsigned char hash2[SHA1_RESULT_LEN];
sha1_ctx_t sha1ctx;
sha1_begin(&sha1ctx);
sha1_hash(pInput, strlen(pInput), &sha1ctx);
sha1_end(hash2, &sha1ctx);
- len = SHA1_LENGTH;
+ len = SHA1_RESULT_LEN;
char *d = hash_str;
unsigned char *s = hash2;
diff --git a/lib/Plugins/CCpp_sha1.h b/lib/Plugins/CCpp_sha1.h
index 8aad822..abadfd9 100644
--- a/lib/Plugins/CCpp_sha1.h
+++ b/lib/Plugins/CCpp_sha1.h
@@ -18,6 +18,8 @@
* ---------------------------------------------------------------------------
*/
+#define SHA1_RESULT_LEN (5 * 4)
+
typedef struct sha1_ctx_t {
uint32_t hash[8]; /* 5, +3 elements for sha256 */
uint64_t total64;
diff --git a/lib/Plugins/Makefile.am b/lib/Plugins/Makefile.am
index d70b024..f93f510 100644
--- a/lib/Plugins/Makefile.am
+++ b/lib/Plugins/Makefile.am
@@ -53,12 +53,11 @@ install-data-hook: $(DESTDIR)/$(DEBUG_INFO_DIR)
# CCpp
libCCpp_la_SOURCES = CCpp.cpp CCpp.h CCpp_sha1.cpp CCpp_sha1.h
libCCpp_la_LDFLAGS = -avoid-version
-libCCpp_la_LIBADD = $(NSS_LIBS)
+#libCCpp_la_LIBADD =
libCCpp_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils \
-DCCPP_HOOK_PATH=\"${libexecdir}/abrt-hook-ccpp\" \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
- -DLOCALSTATEDIR='"$(localstatedir)"' \
- $(NSS_CFLAGS)
+ -DLOCALSTATEDIR='"$(localstatedir)"'
# Firefox - disabled for now
@@ -133,7 +132,7 @@ libTicketUploader_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils $(CUR
libPython_la_SOURCES = Python.h Python.cpp
#libPython_la_LIBADD = $(NSS_LIBS)
libPython_la_LDFLAGS = -avoid-version
-libPython_la_CPPFLAGS = $(NSS_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils
+libPython_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils
# FileTrasfer
libFileTransfer_la_SOURCES = FileTransfer.cpp FileTransfer.h