2014-11-14 00:54:50 -05:00
|
|
|
diff --git a/.gitignore b/.gitignore
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000..e7707be
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/.gitignore
|
|
|
|
@@ -0,0 +1,4 @@
|
|
|
|
+*.o
|
|
|
|
+signify
|
|
|
|
+*.a
|
|
|
|
+*.so*
|
|
|
|
\ No newline at end of file
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
|
|
index c332dd4..6780617 100644
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
|
|
|
@@ -9,31 +9,37 @@ DESTDIR=
|
2014-10-31 01:28:37 -04:00
|
|
|
|
|
|
|
CC=gcc
|
2014-11-14 00:54:50 -05:00
|
|
|
AR=ar
|
|
|
|
-LIB=static
|
2014-10-31 01:28:37 -04:00
|
|
|
INSTALL=/usr/bin/install -c
|
|
|
|
|
2014-11-14 00:54:50 -05:00
|
|
|
-CFLAGS=-O2 -D_FORTIFY_SOURCE=2 -ftrapv -fPIE -fstack-protector-all \
|
|
|
|
+CFLAGS=-O2 -D_FORTIFY_SOURCE=2 -fPIC -ftrapv -fPIE -fstack-protector-all \
|
|
|
|
-Wno-attributes -Wno-unused-result -Ibsd-compat -I.
|
2014-10-31 01:28:37 -04:00
|
|
|
|
|
|
|
TARGET = signify
|
|
|
|
|
2014-11-14 00:54:50 -05:00
|
|
|
-TARGET_LIB = libsignify_$(LIB).a
|
|
|
|
+SIGNIFY_STATIC_LIB = libsignify_static.a
|
|
|
|
+SIGNIFY_SHARED_LIB = libsignify_shared.so
|
|
|
|
|
|
|
|
-SIGNIFY_OBJS = signify.o fe25519.o sc25519.o smult_curve25519_ref.o \
|
|
|
|
+SIGNIFY_OBJS = fe25519.o sc25519.o smult_curve25519_ref.o \
|
2014-10-31 01:28:37 -04:00
|
|
|
mod_ed25519.o mod_ge25519.o crypto_api.o base64.o bcrypt_pbkdf.o \
|
|
|
|
explicit_bzero.o arc4random.o timingsafe_bcmp.o sha2.o blowfish.o \
|
|
|
|
readpassphrase.o strlcpy.o helpers.o ohash.o
|
|
|
|
|
2014-11-14 00:54:50 -05:00
|
|
|
all: $(TARGET) $(TARGET_LIB)
|
2014-10-31 01:28:37 -04:00
|
|
|
|
2014-11-14 00:54:50 -05:00
|
|
|
-$(TARGET): $(SIGNIFY_OBJS)
|
|
|
|
- $(CC) $(CFLAGS) -o $(TARGET) $(SIGNIFY_OBJS)
|
|
|
|
+%.o: %.c
|
|
|
|
+ $(CC) $(CFLAGS) -c $<
|
2014-10-31 01:28:37 -04:00
|
|
|
|
2014-11-14 00:54:50 -05:00
|
|
|
-$(TARGET_LIB): $(SIGNIFY_OBJS)
|
|
|
|
- $(AR) crs $(TARGET_LIB) $(SIGNIFY_OBJS)
|
|
|
|
+$(SIGNIFY_STATIC_LIB): $(SIGNIFY_OBJS)
|
|
|
|
+ $(AR) crs $@ $(SIGNIFY_OBJS)
|
|
|
|
+
|
|
|
|
+$(SIGNIFY_SHARED_LIB): $(SIGNIFY_STATIC_LIB)
|
|
|
|
+ $(CC) -shared -o $@ $(SIGNIFY_STATIC_LIB)
|
2014-10-31 01:28:37 -04:00
|
|
|
+
|
2014-11-14 00:54:50 -05:00
|
|
|
+$(TARGET): $(SIGNIFY_STATIC_LIB) $(SIGNIFY_STATIC_LIB)
|
|
|
|
+ $(CC) $(CFLAGS) -o $(TARGET) signify.c $(SIGNIFY_STATIC_LIB)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
- @rm -f *.o signify $(TARGET_LIB)
|
|
|
|
+ rm -f *.o *.so *.a signify
|
2014-10-31 01:28:37 -04:00
|
|
|
|
|
|
|
install:
|
2014-11-14 00:54:50 -05:00
|
|
|
$(INSTALL) -c -D -m 0755 signify $(DESTDIR)/$(bindir)/signify
|
|
|
|
diff --git a/README b/README
|
|
|
|
index b999d28..b5cb832 100644
|
|
|
|
--- a/README
|
|
|
|
+++ b/README
|
|
|
|
@@ -14,3 +14,8 @@ OpenBSD but in no way undermines compatibility of keys and signatures.
|
|
|
|
HOWTO and the manpage contain sample usage.
|
|
|
|
|
|
|
|
mancha <mancha1 AT zoho DOT com>
|
|
|
|
+
|
|
|
|
+Based on http://sourceforge.net/projects/slackdepot/files/signify/,
|
|
|
|
+this fork builds libsignify additionally to be used with external tools
|
|
|
|
+
|
|
|
|
+Harshavardhana <harsha AT harshavardhana DOT net>
|
|
|
|
\ No newline at end of file
|
|
|
|
diff --git a/fe25519.h b/fe25519.h
|
|
|
|
index 41b3cbb..6d347c7 100644
|
|
|
|
--- a/fe25519.h
|
|
|
|
+++ b/fe25519.h
|
|
|
|
@@ -29,9 +29,9 @@
|
|
|
|
#define fe25519_invert crypto_sign_ed25519_ref_fe25519_invert
|
|
|
|
#define fe25519_pow2523 crypto_sign_ed25519_ref_fe25519_pow2523
|
|
|
|
|
|
|
|
-typedef struct
|
|
|
|
+typedef struct
|
|
|
|
{
|
|
|
|
- crypto_uint32 v[32];
|
|
|
|
+ crypto_uint32 v[32];
|
|
|
|
}
|
|
|
|
fe25519;
|
|
|
|
|