forked from stoken-dev/stoken
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
- Loading branch information
0 parents
commit 14a3a26
Showing
32 changed files
with
4,009 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# autotools stuff | ||
Makefile | ||
Makefile.in | ||
aclocal.m4 | ||
compile | ||
config.h | ||
config.h.in | ||
config.log | ||
config.status | ||
configure | ||
depcomp | ||
install-sh | ||
missing | ||
src/.deps/ | ||
src/.dirstamp | ||
src/*.lo | ||
src/.libs/ | ||
stamp-h1 | ||
autom4te.cache/ | ||
.libs/ | ||
config.guess | ||
config.sub | ||
*.la | ||
m4/ | ||
ltmain.sh | ||
libtool | ||
|
||
# objects | ||
src/*.o | ||
stoken | ||
stoken-gui | ||
stoken-*.tar.gz | ||
stoken.pc | ||
|
||
# scratch files | ||
.*.sw* | ||
*~ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
AUTOMAKE_OPTIONS = foreign subdir-objects | ||
|
||
AM_CPPFLAGS = -DDATA_DIR=\"$(datadir)\" | ||
AM_CFLAGS = $(TOMCRYPT_CFLAGS) | ||
|
||
dist_man_MANS = stoken.1 | ||
|
||
lib_LTLIBRARIES = libstoken.la | ||
libstoken_la_SOURCES = src/library.c src/securid.c | ||
libstoken_la_LDFLAGS = -version-number @APIMAJOR@:@APIMINOR@ | ||
include_HEADERS = src/stoken.h | ||
noinst_HEADERS = src/common.h src/securid.h src/stoken-internal.h | ||
pkgconfig_DATA = stoken.pc | ||
|
||
bin_PROGRAMS = stoken | ||
stoken_SOURCES = src/cli.c src/common.c | ||
stoken_LDADD = $(LDADD) libstoken.la $(TOMCRYPT_LIBS) | ||
|
||
if ENABLE_GUI | ||
bin_PROGRAMS += stoken-gui | ||
stoken_gui_SOURCES = src/gui.c src/common.c | ||
stoken_gui_CFLAGS = $(AM_CFLAGS) $(GTK_CFLAGS) | ||
stoken_gui_LDADD = $(LDADD) libstoken.la $(GTK_LIBS) $(TOMCRYPT_LIBS) | ||
|
||
dist_man_MANS += stoken-gui.1 | ||
|
||
icondir = $(datadir)/pixmaps | ||
dist_icon_DATA = stoken-gui.png | ||
|
||
desktopdir = $(datadir)/applications | ||
dist_desktop_DATA = stoken-gui.desktop | ||
|
||
endif | ||
|
||
dist_noinst_SCRIPTS = autogen.sh | ||
|
||
EXTRA_DIST = .gitignore | ||
DISTCLEANFILES = *~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
stoken - Software Token for Linux/UNIX | ||
-------------------------------------- | ||
|
||
stoken is a tokencode generator compatible with RSA SecurID 128-bit (AES) | ||
tokens. It is a hobbyist project, not affiliated with or endorsed by | ||
RSA Security. | ||
|
||
Dependencies: | ||
|
||
libtomcrypt | ||
libgtk2.0 (required for stoken-gui only) | ||
|
||
Building: | ||
|
||
./configure | ||
make | ||
make install | ||
|
||
Basic usage - command-line interface: | ||
|
||
stoken import --token=224665249002742606314306156441436672025677510324121004644173122356414742716713323 | ||
stoken tokencode | ||
|
||
Basic usage - graphical (GTK+) interface: | ||
|
||
stoken import --token=224665249002742606314306156441436672025677510324121004644173122356414742716713323 | ||
stoken-gui & | ||
|
||
"stoken import" caches the token in ~/.stokenrc . | ||
|
||
Please substitute the token string provided by your administrator. | ||
|
||
See the man pages for additional details: stoken(1), stoken-gui(1) | ||
|
||
Author: Kevin Cernekee <cernekee@gmail.com> | ||
License: LGPLv2.1+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
autoreconf --force --install --verbose | ||
rm -rf autom4te*.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
ver=0.1 | ||
|
||
set -ex | ||
|
||
rm -rf tmp.deb | ||
mkdir -p tmp.deb | ||
|
||
make distclean || true | ||
./autogen.sh | ||
./configure | ||
make dist | ||
|
||
cd tmp.deb | ||
cp ../stoken-${ver}.tar.gz stoken_${ver}.orig.tar.gz | ||
tar zxf stoken_${ver}.orig.tar.gz | ||
cd stoken-${ver} | ||
cp -a ../../debian . | ||
debuild -us -uc | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
AC_PREREQ([2.61]) | ||
AC_INIT([stoken], [0.1], [cernekee@gmail.com], [stoken], [http://stoken.sf.net/]) | ||
AM_INIT_AUTOMAKE | ||
AC_CONFIG_HEADERS([config.h]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
AC_USE_SYSTEM_EXTENSIONS | ||
AC_PROG_LIBTOOL | ||
|
||
# Upstream's pkg.m4 (since 0.27) offers this now, but define our own | ||
# compatible version in case the local version of pkgconfig isn't new enough. | ||
# https://bugs.freedesktop.org/show_bug.cgi?id=48743 | ||
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], | ||
[AC_ARG_WITH([pkgconfigdir], | ||
[AS_HELP_STRING([--with-pkgconfigdir], | ||
[install directory for openconnect.pc pkg-config file])], | ||
[],[with_pkgconfigdir='$(libdir)/pkgconfig']) | ||
AC_SUBST([pkgconfigdir], [${with_pkgconfigdir}])]) | ||
|
||
: ${CFLAGS=""} | ||
|
||
AC_PROG_CC | ||
AM_PROG_CC_C_O | ||
AC_CONFIG_FILES([Makefile]) | ||
|
||
# --enable-debug | ||
|
||
AC_ARG_ENABLE( | ||
[debug], | ||
[AS_HELP_STRING([--enable-debug],[enable debugging code and output])], | ||
[], | ||
[enable_debug="no"] | ||
) | ||
|
||
if test "x$enable_debug" = xyes; then | ||
CFLAGS="$CFLAGS -O0 -ggdb" | ||
else | ||
CFLAGS="$CFLAGS -O2" | ||
LDFLAGS="$LDFLAGS -Wl,--strip-debug" | ||
fi | ||
|
||
# extra gcc flags (warnings and such) | ||
|
||
if test "x$GCC" = "xyes"; then | ||
CFLAGS="$CFLAGS -Wall" | ||
fi | ||
|
||
AC_MSG_CHECKING([for -Wno-pointer-sign]) | ||
saved_CFLAGS="$CFLAGS" | ||
ptrsign=yes | ||
CFLAGS="$CFLAGS -Wno-pointer-sign" | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [], ptrsign=no) | ||
if test $ptrsign = no; then | ||
CFLAGS="$saved_CFLAGS" | ||
AC_MSG_RESULT([no]) | ||
else | ||
AC_MSG_RESULT([yes]) | ||
fi | ||
|
||
# gtk / stoken-gui | ||
|
||
AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk], | ||
[build stoken-gui for gtk+ @<:@default=check@:>@])], | ||
[], | ||
[with_gtk=check]) | ||
|
||
PKG_PROG_PKG_CONFIG | ||
if test "x$PKG_CONFIG" = x; then | ||
if test "x$with_gtk" = xyes; then | ||
AC_MSG_FAILURE([--with-gtk requires pkg-config]) | ||
fi | ||
with_gtk=no | ||
fi | ||
|
||
enable_gui=no | ||
AS_IF([test "x$with_gtk" != xno], | ||
[PKG_CHECK_MODULES([GTK], [gtk+-2.0], | ||
[enable_gui=yes], | ||
[if test "x$with_gtk" != xcheck; then | ||
AC_MSG_FAILURE( | ||
[--with-gtk was given, but test for gtk failed]) | ||
fi | ||
]) | ||
] | ||
) | ||
|
||
if test $enable_gui = yes; then | ||
AC_MSG_CHECKING([if gtk+ is usable]) | ||
|
||
saved_LIBS="$LIBS" | ||
saved_CFLAGS="$CFLAGS" | ||
LIBS="$LIBS $GTK_LIBS" | ||
CFLAGS="$CFLAGS $GTK_CFLAGS" | ||
|
||
AC_TRY_LINK([#include <gtk/gtk.h>], [gtk_init(NULL,NULL);], | ||
[AC_MSG_RESULT([yes])], | ||
[AC_MSG_FAILURE([unable to link gtk+ test program])]) | ||
LIBS="$saved_LIBS" | ||
CFLAGS="$saved_CFLAGS" | ||
fi | ||
|
||
AM_CONDITIONAL([ENABLE_GUI], [test $enable_gui = yes]) | ||
|
||
# libtomcrypt | ||
|
||
tomcrypt_pkg=no | ||
|
||
if test "x$PKG_CONFIG" != x; then | ||
PKG_CHECK_MODULES([TOMCRYPT], libtomcrypt, | ||
[tomcrypt_pkg=yes], []) | ||
fi | ||
|
||
if test $tomcrypt_pkg = no; then | ||
AC_SUBST(TOMCRYPT_LIBS, [-ltomcrypt]) | ||
AC_SUBST(LIBTOMCRYPT_PC, []) | ||
else | ||
AC_SUBST(LIBTOMCRYPT_PC, [libtomcrypt]) | ||
fi | ||
|
||
saved_LIBS="$LIBS" | ||
saved_CFLAGS="$CFLAGS" | ||
LIBS="$LIBS $TOMCRYPT_LIBS" | ||
CFLAGS="$CFLAGS $TOMCRYPT_CFLAGS" | ||
|
||
AC_MSG_CHECKING([if libtomcrypt is usable]) | ||
AC_TRY_LINK([#include <tomcrypt.h>], | ||
[rijndael_ecb_encrypt(NULL,NULL,NULL);], | ||
[AC_MSG_RESULT([yes])], | ||
[AC_MSG_FAILURE([unable to link libtomcrypt test program])]) | ||
|
||
LIBS="$saved_LIBS" | ||
CFLAGS="$saved_CFLAGS" | ||
|
||
# library version | ||
|
||
libhdr=${srcdir}/src/stoken.h | ||
APIMAJOR="`awk '/#define STOKEN_API_VER_MAJOR/ {print $3}' ${libhdr}`" | ||
APIMINOR="`awk '/#define STOKEN_API_VER_MINOR/ {print $3}' ${libhdr}`" | ||
AC_SUBST(APIMAJOR) | ||
AC_SUBST(APIMINOR) | ||
|
||
AC_OUTPUT(stoken.pc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
stoken (0.1-1) UNRELEASED; urgency=low | ||
|
||
* Initial release. | ||
|
||
-- Kevin Cernekee <cernekee@gmail.com> Sat, 15 Sep 2012 15:24:34 -0700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Source: stoken | ||
Maintainer: Kevin Cernekee <cernekee@gmail.com> | ||
Section: utils | ||
Priority: optional | ||
Standards-Version: 3.9.1 | ||
Build-Depends: debhelper (>= 8), libgtk2.0-dev (>= 2.6.4), libtomcrypt-dev (>= 1.17) | ||
Homepage: http://stoken.sf.net/ | ||
|
||
Package: stoken | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: Software Token for cryptographic authentication | ||
stoken is a software token compatible with RSA SecurID 128-bit (AES) | ||
tokens. It generates one-time passwords through a scriptable command-line | ||
interface or a GTK+ GUI. | ||
|
||
Package: libstoken1 | ||
Section: libs | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: Software Token for cryptographic authentication - shared library | ||
stoken is a software token compatible with RSA SecurID 128-bit (AES) | ||
tokens. It generates one-time passwords through a scriptable command-line | ||
interface or a GTK+ GUI. | ||
. | ||
This package provides a shared library allowing other applications to | ||
generate tokencodes. | ||
|
||
Package: libstoken-dev | ||
Section: libdevel | ||
Architecture: any | ||
Depends: ${misc:Depends}, libstoken1 (= ${binary:Version}), libtomcrypt-dev (>= 1.17) | ||
Description: Software Token for cryptographic authentication - shared library | ||
stoken is a software token compatible with RSA SecurID 128-bit (AES) | ||
tokens. It generates one-time passwords through a scriptable command-line | ||
interface or a GTK+ GUI. | ||
. | ||
This package provides the header and development files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
This package was debianized by Kevin Cernekee cernekee@gmail.com on | ||
Sat Sep 15 16:09:53 PDT 2012. | ||
|
||
Copyright (c) 2012 Kevin Cernekee | ||
|
||
The upstream sources were obtained from http://stoken.sf.net/ | ||
|
||
License: | ||
|
||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
|
||
You should have received a copy of the GNU Lesser General Public | ||
License along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
On Debian GNU/Linux systems, the complete text of the GNU Lesser General | ||
Public License can be found in `/usr/share/common-licenses/LGPL-2.1'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
usr/lib/libstoken.so | ||
usr/lib/pkgconfig | ||
usr/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
usr/lib/libstoken.so.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/make -f | ||
%: | ||
dh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (quilt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
usr/bin | ||
usr/share/applications | ||
usr/share/man | ||
usr/share/pixmaps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.o | ||
libstoken-test |
Oops, something went wrong.