pax_global_header00006660000000000000000000000064144024240330014506gustar00rootroot0000000000000052 comment=bc25aa48922064881f17201c6302ab2640e36763 stoken-dev-stoken-bc25aa4/000077500000000000000000000000001440242403300155515ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/.github/000077500000000000000000000000001440242403300171115ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/.github/workflows/000077500000000000000000000000001440242403300211465ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/.github/workflows/c-cpp.yml000066400000000000000000000011461440242403300226750ustar00rootroot00000000000000name: C/C++ CI on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install nettle run: | sudo apt-get -y install nettle-dev - name: autogen.sh run: ./autogen.sh - name: configure run: ./configure - name: make run: make - name: make check run: make check - name: make distcheck run: make distcheck - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: tarball path: ./*.tar.* stoken-dev-stoken-bc25aa4/.gitignore000066400000000000000000000006171440242403300175450ustar00rootroot00000000000000# autotools stuff Makefile Makefile.in aclocal.m4 config.h config.h.in config.log config.status configure install-sh src/.deps/ src/.dirstamp src/*.lo src/.libs/ stamp-h1 autom4te.cache/ .libs/ *.la build-aux/ libtool test-suite.log # objects /src/*.o /stoken /stoken-gui /stoken-*.tar.gz /stoken.pc # scratch files .*.sw* *~ # Debian ppa/changelog tmp.debian # Windows winpkg/ winpkg.zip *.exe stoken-dev-stoken-bc25aa4/.travis.yml000066400000000000000000000017161440242403300176670ustar00rootroot00000000000000os: - linux - osx language: c compiler: - gcc - clang notifications: email: on_success: change on_failure: always before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew bundle --file=misc/Brewfile-travis; else sudo apt-get update -qq && sudo apt-get install -qq autoconf automake libtool debhelper libgtk-3-dev libtomcrypt-dev libxml2-dev dh-autoreconf devscripts fakeroot git-core valgrind nettle-dev; fi - if [ -e .git/shallow ]; then git fetch --unshallow; fi script: - ./autogen.sh - misc/build-one.sh nettle - if [ "$TRAVIS_OS_NAME" != "osx" ]; then case "$CC" in clang*) export CPPFLAGS=-DLTC_NO_ROLC ;; *) ;; esac; misc/build-one.sh tomcrypt && ./release.sh && misc/build-debian.sh && sudo dpkg -i *.deb && stoken import --random --new-password="" && stoken --pin=0000; fi stoken-dev-stoken-bc25aa4/CHANGES000066400000000000000000000076651440242403300165620ustar00rootroot00000000000000V0.93 - 2023/03/09 - Drop support for versions of nettle older than 2014 (Soren Hansen) - Add automatic tests using Github Actions (Soren Hansen) - Add automatic tests using Github Actions (Soren Hansen) - Fix build on (at least) MacOS (Soren Hansen) - Further v4 token work (David Southgate) - Document --next option in README (@almostbeef) - Add accessibility item in README (James Cordell) - Add --both option to print current and next token (Paulo Diovani) - Support for v4 token decode (Dmitry Ilyin) - Delete duplicate libtomcrypt-dev in README (Kevin Cernekee) - Fix OSX travis builds (Kevin Cernekee) - Fix compile for Java 1.8 (Kevin Cernekee) - Remove bashisms (Alon Bar-Lev) V0.92 - 2017/11/12 - Update MinGW dependencies to work with Fedora 25 (bug #31) - Fix compatibility with libtomcrypt 1.18 (bug #38) - Invoke locally-generated libtool binary instead of assuming there is one in the $PATH (bug #37) - Use $USERPROFILE instead of $HOME on Windows 7 (bug #22) V0.91 - 2017/01/08 - Fix segfault if ~/.stokenrc is empty and another program invokes libstoken - Squash extraneous newline from `stoken tokencode` if stdin isn't a tty (bug #29) V0.90 - 2015/08/09 - Change version number from v0.9 -> v0.90 to make life easier for packagers V0.9 - 2015/07/25 - Fix corner case in SDTID reader (bug #21) - Support Nettle 3.x (bug #20) - Other minor fixes V0.81 - 2014/12/08 - Fix "make check" failures in GMT+xx timezones (xx >= 1) V0.8 - 2014/12/07 - Update GUI from GTK+2 to GTK+3; use glade to define the layouts - Add next tokencode and other information to the full GUI (stoken-gui). The "stoken-gui --small" layout is unchanged. - Add a list of known GUIDs used to bind tokens to specific device classes (i.e. tokens can be bound to "any BlackBerry 10"). stoken will now try each one of these IDs when importing a new bound token. - Add new --qr and --show-qr export options to make it easy to pass tokens to a mobile device - Add "stoken --next" option to show the next tokencode - Support using nettle+gmp as an alternative to libtomcrypt - Generate valid TKNTrailer BatchSignature sections in .sdtid output files, allowing use with RSA's official TokenConverter utility - Fix parsing of RSA-supplied hard token seed files - Add "make check" and several test cases - Fix build errors on Mac OSX, enable OSX Travis builds, and submit a Homebrew formula - Fix build errors when using uClibc instead of glibc - Add experimental Windows build using MinGW (see README for instructions) - Relicense the JNI wrapper (BSD-3-clause) so that it is easier to incorporate into non-free Android apps - Various fixes for minor bugs, memory leaks, etc. v0.6 - 2014/06/21 - Add support for reading and writing v3 (base64-encoded) Android tokens - Add support for 30-second tokens. Library users should call stoken_get_info() to check the token interval. - Add "stoken-gui --small" mode to conserve desktop space - Enable Alt-C and Alt-Q keyboard shortcuts in stoken-gui - Fix handling of cached PINs for library callers - Fix JNI symbol exports - Fix "stoken issue" if no token is imported - Add new stoken_get_info() API to query the S/N and expiration date - Minor documentation updates v0.5 - 2014/03/15 - Add support for importing/exporting sdtid XML files. The library now depends on libxml. - Add JNI code for integration into Android apps - Add support for 6-digit tokencodes - Fix problems decrypting some device-ID-bound tokens (bug #3) - Fix build failures on kfreebsd and Android - Fix handling of PIN-less tokens - Fix out-of-tree builds - Don't strip stoken / stoken-gui binaries by default v0.2 - 2013/05/18 - Fix a couple of problems seen when manipulating tokens tied to a device ID, particularly if the token was intended for a smartphone (bug #1) - Clean up pkg-config dependencies - Other minor cleanups v0.1 - 2012/11/17 - Initial public release stoken-dev-stoken-bc25aa4/COPYING.LIB000066400000000000000000000635021440242403300172170ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library 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 library 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 library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! stoken-dev-stoken-bc25aa4/Makefile.am000066400000000000000000000064471440242403300176200ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign subdir-objects ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -DDATA_DIR=\"$(datadir)\" AM_CFLAGS = $(CRYPTO_CFLAGS) $(LIBXML2_CFLAGS) $(WFLAGS) dist_man_MANS = stoken.1 lib_LTLIBRARIES = libstoken.la libstoken_la_SOURCES = src/library.c src/securid.c src/sdtid.c \ src/compat.c src/stc-@CRYPTO_BACKEND@.c libstoken_la_CFLAGS = $(AM_CFLAGS) -DLIBSTOKEN_BUILD libstoken_la_LDFLAGS = -version-number @APIMAJOR@:@APIMINOR@ \ -no-undefined if HAVE_VSCRIPT_COMPLEX libstoken_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libstoken.map endif libstoken_la_LIBADD = $(CRYPTO_LIBS) $(LIBXML2_LIBS) libstoken_la_DEPENDENCIES = libstoken.map include_HEADERS = src/stoken.h noinst_HEADERS = src/common.h src/securid.h src/stoken-internal.h \ src/sdtid.h pkgconfig_DATA = stoken.pc if USE_JNI if JNI_STANDALONE libstoken_la_SOURCES += src/jni.c libstoken_la_CFLAGS += $(JNI_CFLAGS) else lib_LTLIBRARIES += libstoken-wrapper.la libstoken_wrapper_la_SOURCES = src/jni.c libstoken_wrapper_la_CFLAGS = $(AM_CFLAGS) $(JNI_CFLAGS) libstoken_wrapper_la_LIBADD = libstoken.la endif endif bin_PROGRAMS = stoken stoken_SOURCES = src/cli.c src/common.c stoken_LDADD = $(LDADD) $(CRYPTO_LIBS) libstoken.la 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_CPPFLAGS = $(AM_CPPFLAGS) -DUIDIR=\"$(uidir)\" stoken_gui_LDADD = $(LDADD) $(CRYPTO_LIBS) libstoken.la $(GTK_LIBS) dist_man_MANS += stoken-gui.1 icondir = $(datadir)/pixmaps dist_icon_DATA = gui/stoken-gui.png desktopdir = $(datadir)/applications dist_desktop_DATA = gui/stoken-gui.desktop \ gui/stoken-gui-small.desktop uidir = $(datadir)/stoken ui_DATA = gui/tokencode-small.ui \ gui/tokencode-detail.ui \ gui/password-dialog.ui \ gui/pin-dialog.ui endif dist_doc_DATA = examples/libstoken-test.c examples/sdtid-test.pl \ README.md dist_noinst_SCRIPTS = autogen.sh EXTRA_DIST = .gitignore libstoken.map CHANGES $(ui_DATA) # package both variants explicitly, because @CRYPTO_BACKEND@ only picks one EXTRA_DIST += src/stc-nettle.c src/stc-tomcrypt.c GIT_EXTRA_DIST = examples/ java/ tests/ EXTRA_DIST += $(shell cd "$(top_srcdir)" && \ git ls-tree HEAD -r --name-only -- $(GIT_EXTRA_DIST) 2>/dev/null) TEST_EXTENSIONS = .pipe TESTS = tests/export-android-v2.pipe \ tests/export-iphone-password.pipe \ tests/export-read-v3.pipe \ tests/export-sdtid-devid-password.pipe \ tests/export-v3-sdtid.pipe \ tests/tokencode-v2.pipe \ tests/tokencode-v3.pipe \ tests/tokencode-v4.pipe \ tests/tokencode-sdtid.pipe \ tests/mac-align.pipe PIPE_LOG_COMPILER = $(srcdir)/tests/pipe-wrapper.sh dist_check_SCRIPTS = $(TESTS) $(PIPE_LOG_COMPILER) TESTS_ENVIRONMENT = STOKEN=./stoken \ LIBTOOL="${LIBTOOL}" \ TESTDIR="$(srcdir)/tests" if ENABLE_VALGRIND TESTS_ENVIRONMENT += VALGRIND="valgrind --error-exitcode=1" endif DISTCLEANFILES = *~ .PHONY: winpkg winpkg: $(bin_PROGRAMS) rm -rf winpkg mkdir winpkg cp .libs/stoken.exe winpkg/ if ENABLE_GUI cp .libs/stoken-gui.exe winpkg/ cp `./win32deps.pl .libs/stoken-gui.exe` winpkg/ cp gui/*.{ui,png} winpkg/ else cp .libs/stoken.exe winpkg/ cp `./win32deps.pl .libs/stoken.exe` winpkg/ endif rm -f winpkg.zip zip -r winpkg.zip winpkg/ stoken-dev-stoken-bc25aa4/README.md000066400000000000000000000110111440242403300170220ustar00rootroot00000000000000Based on [original work by Kevin Cernekee](https://github.com/cernekee/stoken). stoken - Software Token for Linux/UNIX ====================================== stoken is a tokencode generator compatible with RSA SecurID 128-bit (AES) tokens. The project includes several components: * A simple command line interface (CLI) used to manage and manipulate tokens * A GTK+ GUI with cut&paste functionality * A shared library allowing other software to generate tokencodes on demand * Also permits the blind or other disabled people to jump these hurdles or systems. ## Building on Linux ### Dependencies * libtomcrypt or nettle * libxml2 * libgtk3.0 (required for stoken-gui only) If you are building from Git, you'll need to install autoconf / automake / libtool, and run autogen.sh first. This is not necessary if building from a released source tarball. On Debian or Ubuntu, this should satisfy most/all dependencies: sudo apt-get install libgtk-3-dev libtomcrypt-dev libxml2-dev autoconf automake libtool build-essential ### Compile instructions ./autogen.sh # from Git only; not necessary if building from tarball ./configure make make check make install ## Usage First, import a token from a raw string or an "sdtid" XML file: stoken import --token 2000123456... stoken import --token com.rsa.securid.iphone://ctf?ctfData=2000123456... stoken import --file mytoken.sdtid This will prompt for an optional password, so that your seed is encrypted on disk. Next, use the CLI or GUI to show the current tokencode: stoken tokencode stoken-gui & You can view the next-tokencode using the following: stoken tokencode --next If your token requires a PIN, stoken will prompt for it. You can use stoken setpin to cache your PIN in ~/.stokenrc. This is much less secure, but may be useful for automation. Modern versions of OpenConnect link against libstoken and can send an autogenerated tokencode as the password. Import your token using the above instructions, then: openconnect -u USERNAME --token-mode=rsa HOSTNAME See the man pages for additional details: stoken(1), stoken-gui(1) See examples/ and src/stoken.h for information on using the shared library interface (libstoken) to generate tokencodes from other applications. ## Screenshots
stoken-gui stoken-gui --small
## Building on other platforms ### Mac OS X #### Initial setup The following configuration was tested under Mavericks 10.9.5; other variants may work too: * Install gcc/make/headers: xcode-select --install * Install [Homebrew](http://brew.sh/) * Install [XQuartz](http://xquartz.macosforge.org/) to support GTK+3 * Use Homebrew to satisfy dependencies: brew install git autoconf automake libtool nettle pkg-config gtk+3 gnome-icon-theme hicolor-icon-theme * Use OSX's builtin libxml2 (no action needed) #### Compiling Note that GNU libtool is called glibtool to avoid collisions with Apple's libtool program: export LIBTOOL=glibtool git clone git://github.com/cernekee/stoken cd stoken ./autogen.sh ./configure make make check make install ### Experimental Windows build As of v0.8, stoken can be built for Windows using the [MinGW cross toolchain on Fedora](http://fedoraproject.org/wiki/MinGW). This is not tested or maintained regularly. #### Initial setup On a Fedora 20 PC (other versions may work as well), install the build dependencies: yum groupinstall "Development Tools" yum install git autoconf automake libtool mingw32-gnutls mingw32-libxml2 mingw32-gtk3 #### Compiling git clone git://github.com/cernekee/stoken cd stoken ./autogen.sh mingw32-configure make winpkg If all goes well, you should be able to copy winpkg.zip to a Windows PC and run stoken.exe or stoken-gui.exe. #### TODO Several items are known to be missing or broken on the Windows build: * Default home directory is probably incorrect * No installer * The GUI requires its assets to be in the current directory * Password entry is not masked * stoken --random flag * No charset translation on filenames ## Misc Author: Kevin Cernekee <cernekee@gmail.com> License: LGPLv2.1+ stoken is a hobbyist project, not affiliated with or endorsed by RSA Security. stoken-dev-stoken-bc25aa4/TODO000066400000000000000000000004671440242403300162500ustar00rootroot00000000000000TODO list: Library functions probably need man pages. Consider sanitizing memory, and figure out how to avoid leaking key material. Fix alpha channel on the icon. Make better use of the public library functions from cli/gui. vpnc integration. Add hotkeys, import/about dialogs, other features to the GUI. stoken-dev-stoken-bc25aa4/autogen.sh000077500000000000000000000001221440242403300175450ustar00rootroot00000000000000#!/bin/sh set -ex autoreconf --force --install --verbose rm -rf autom4te*.cache stoken-dev-stoken-bc25aa4/configure.ac000066400000000000000000000164371440242403300200520ustar00rootroot00000000000000AC_PREREQ([2.61]) AC_INIT([stoken], [0.93], [sorenisanerd@gmail.com], [stoken], [http://github.com/stoken-dev/stoken]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.11 parallel-tests]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_USE_SYSTEM_EXTENSIONS AC_PROG_LIBTOOL AC_GNU_SOURCE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) LT_INIT([win32-dll]) # 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 stoken.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 [default=no]])], [enable_debug=$enableval], [enable_debug="no"] ) if test "x$enable_debug" = xyes; then CFLAGS="$CFLAGS -O0 -ggdb -fno-inline" fi # --enable-valgrind AC_ARG_ENABLE([valgrind], [AS_HELP_STRING([--enable-valgrind], [use valgrind when running 'make check' [default=no]])], [enable_valgrind=$enableval], [enable_valgrind=no]) AM_CONDITIONAL([ENABLE_VALGRIND], [test $enable_valgrind != no]) EXTRA_PC_LIBS="" AS_COMPILER_FLAGS(WFLAGS, "-Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-pointer-sign -Wno-unused-parameter -Wno-unused-const-variable -Werror=pointer-to-int-cast -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wformat-security -Winit-self -Wno-missing-declarations -Wmissing-include-dirs -Wnested-externs -Wpointer-arith -Wwrite-strings") AC_SUBST(WFLAGS, [$WFLAGS]) # mlockall() is missing on Bionic (Android) AC_CHECK_FUNCS([mlockall]) # mkstemps is missing on uClibc AC_CHECK_FUNCS([mkstemps]) # TODO: see if compatibility functions are needed to build on Darwin AC_CHECK_FUNCS([strcasestr asprintf]) # time functions are slightly different on Windows AC_CHECK_FUNCS([gmtime_r timegm]) # 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+-3.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 #include ], [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]) # libxml2 support for sdtid file parsing PKG_CHECK_MODULES([LIBXML2], [libxml-2.0]) # crypto library (prefer tomcrypt if unspecified) AC_ARG_WITH([tomcrypt], [AS_HELP_STRING([--with-tomcrypt], [use libtomcrypt for crypto @<:@default=check@:>@])], [with_tomcrypt=$withval], [with_tomcrypt=check]) AC_ARG_WITH([nettle], [AS_HELP_STRING([--with-nettle], [use nettle for crypto @<:@default=check@:>@])], [with_nettle=$withval], [with_nettle=check]) CRYPTO_BACKEND="" if test "$with_tomcrypt" != no -a "$with_nettle" != yes; then # libtomcrypt # Some distributions add a libtomcrypt.pc file, but it isn't in the # upstream libtomcrypt distribution so we can't count on it. tomcrypt_pkg=no if test "x$PKG_CONFIG" != x; then PKG_CHECK_EXISTS([libtomcrypt], [tomcrypt_pkg=yes], []) fi if test $tomcrypt_pkg = no; then AC_SUBST(TOMCRYPT_LIBS, [-ltomcrypt]) AC_SUBST(DEPS_PC, []) TOMCRYPT_PC_LIBS="-ltomcrypt" else AC_SUBST(DEPS_PC, [libtomcrypt]) PKG_CHECK_MODULES([TOMCRYPT], libtomcrypt) TOMCRYPT_PC_LIBS= fi CRYPTO_LIBS="$TOMCRYPT_LIBS" CRYPTO_CFLAGS="-DLTM_DESC" saved_LIBS="$LIBS" saved_CFLAGS="$CFLAGS" LIBS="$LIBS $CRYPTO_LIBS" CFLAGS="$CFLAGS $CRYPTO_CFLAGS" AC_MSG_CHECKING([if libtomcrypt is usable]) AC_TRY_LINK([#include #include ], [rijndael_ecb_encrypt(NULL,NULL,NULL); ltc_mp = ltm_desc; register_hash(&sha1_desc);], [AC_MSG_RESULT([yes]) CRYPTO_BACKEND="tomcrypt" EXTRA_PC_LIBS="$EXTRA_PC_LIBS $TOMCRYPT_PC_LIBS"], [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([whether libtomcrypt uses newer LTC_PKCS_1_V1_5 naming convention]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [int padding = LTC_PKCS_1_V1_5;])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_DEFINE([LIBTOMCRYPT_OLD_PKCS_NAMES], [1], [libtomcrypt uses the pre-1.18 PKCS #1 constant naming convention])]) LIBS="$saved_LIBS" CFLAGS="$saved_CFLAGS" fi if test -z "$CRYPTO_BACKEND" -a "$with_nettle" != no -a "$with_tomcrypt" != yes; then PKG_CHECK_MODULES(NETTLE, [nettle >= 2.4]) PKG_CHECK_MODULES(HOGWEED, [hogweed >= 2.4]) PKG_CHECK_MODULES(GMP, [gmp >= 6.0]) deps="nettle, hogweed, gmp" AC_SUBST(DEPS_PC, [$deps]) CRYPTO_CFLAGS="$NETTLE_CFLAGS $HOGWEED_CFLAGS $GMP_CFLAGS" # gmp is added since we directly use GMP functions # unfortunately it doesn't show up in pkg-config CRYPTO_LIBS="$NETTLE_LIBS $HOGWEED_LIBS $GMP_LIBS" CRYPTO_BACKEND="nettle" fi if test -z "$CRYPTO_BACKEND"; then AC_MSG_ERROR([Cannot find a suitable crypto library]) fi AC_SUBST(EXTRA_PC_LIBS, [$EXTRA_PC_LIBS]) AC_SUBST(CRYPTO_CFLAGS, [$CRYPTO_CFLAGS]) AC_SUBST(CRYPTO_LIBS, [$CRYPTO_LIBS]) AC_SUBST(CRYPTO_BACKEND, [$CRYPTO_BACKEND]) # JNI AC_ARG_WITH([java], AS_HELP_STRING([--with-java(=DIR)], [Build JNI bindings using jni.h from DIR [default=no]]), [], [with_java=no]) if test "$with_java" = "yes"; then AX_JNI_INCLUDE_DIR for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS; do JNI_CFLAGS="$JNI_CFLAGS -I$JNI_INCLUDE_DIR" done elif test "$with_java" = "no"; then JNI_CFLAGS="" else JNI_CFLAGS="-I$with_java" fi if test "x$JNI_CFLAGS" != "x"; then oldCFLAGS="$CFLAGS" CFLAGS="$CFLAGS $JNI_CFLAGS" AC_MSG_CHECKING([jni.h usability]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [jint foo = 0; (void)foo;])], AC_MSG_RESULT([yes]), [AC_MSG_RESULT([no]) AC_MSG_ERROR([unable to compile JNI test program])]) CFLAGS="$oldCFLAGS" AC_SUBST(JNI_CFLAGS, [$JNI_CFLAGS]) fi AM_CONDITIONAL(USE_JNI, [test "$JNI_CFLAGS" != ""]) AC_ARG_ENABLE([jni-standalone], AS_HELP_STRING([--enable-jni-standalone], [build JNI stubs directly into libstoken.so [default=no]]), [jni_standalone=$enableval], [jni_standalone=no]) AM_CONDITIONAL(JNI_STANDALONE, [test $jni_standalone = yes]) # library version AX_CHECK_VSCRIPT 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_CONFIG_FILES(stoken.pc) AC_OUTPUT stoken-dev-stoken-bc25aa4/examples/000077500000000000000000000000001440242403300173675ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/examples/.gitignore000066400000000000000000000000231440242403300213520ustar00rootroot00000000000000*.o libstoken-test stoken-dev-stoken-bc25aa4/examples/libstoken-test.c000066400000000000000000000101001440242403300224720ustar00rootroot00000000000000/* * libstoken-test.c - example program illustrating the use of libstoken * * Copyright 2012 Kevin Cernekee * * 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 * * Build instructions: * * CFLAGS=`pkg-config --cflags stoken` * LIBS=`pkg-config --libs stoken` * gcc -c libstoken-test.c -o libstoken-test.o $CFLAGS * gcc libstoken-test.o -o libstoken-test $LIBS * * Usage: * * # generate tokencode from ~/.stokenrc (if present) * ./libstoken-test * * # generate tokencode from a different stokenrc file * ./libstoken-test /tmp/stokenrc * * # generate tokencode from a token string provided on the command line * ./libstoken-test 252503079680743142131101346153112272336172670304467711744173124152503452716757206 * * # generate tokencode from an sdtid XML file * ./libstoken-test "`cat foo.sdtid`" */ #include #include #include #include #include #include #include #include #define BUFLEN 64 static void die(const char *fmt, ...) { va_list ap; va_start(ap, fmt); fflush(stdout); vfprintf(stderr, fmt, ap); va_end(ap); exit(1); } static int raw_read_user_input(char *out, int max_len) { char *p; fflush(stdout); fflush(stderr); if (fgets(out, max_len, stdin) == NULL) { *out = 0; return 0; } p = strchr(out, '\n'); if (p) *p = 0; return strlen(out); } static struct termios oldtio; static void stdin_echo(int enable_echo); static void restore_tio(int sig) { stdin_echo(1); puts(""); exit(1); } static void stdin_echo(int enable_echo) { struct termios tio; struct sigaction sa; const int fd = 0; if (!enable_echo) { /* ripped from busybox bb_ask() */ tcgetattr(fd, &oldtio); tcflush(fd, TCIFLUSH); tio = oldtio; tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL); tcsetattr(fd, TCSANOW, &tio); /* restore a sane terminal state if interrupted */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = &restore_tio; sigaction(SIGINT, &sa, NULL); sigaction(SIGTERM, &sa, NULL); sigaction(SIGHUP, &sa, NULL); } else tcsetattr(fd, TCSANOW, &oldtio); } static void prompt(const char *msg, char *out, int max_len) { int rc; printf("%s", msg); stdin_echo(0); rc = raw_read_user_input(out, max_len); stdin_echo(1); puts(""); if (rc == 0) die("Aborting...\n"); } int main(int argc, char **argv) { struct stoken_ctx *ctx = stoken_new(); char devid[BUFLEN] = { 0 }, pass[BUFLEN] = { 0 }, pin[BUFLEN] = { 0 }; char out[STOKEN_MAX_TOKENCODE + 1]; int rc; if (argc >= 2) { char *s = argv[1]; if (*s == '1' || *s == '2' || *s == '<') { rc = stoken_import_string(ctx, s); if (rc) die("stoken_import_string returned %d\n", rc); } else { rc = stoken_import_rcfile(ctx, s); if (rc) die("stoken_import_rcfile returned %d\n", rc); } } else { rc = stoken_import_rcfile(ctx, NULL); if (rc) die("stoken_import_rcfile returned %d\n", rc); } if (stoken_devid_required(ctx)) prompt("Device ID: ", devid, BUFLEN); if (stoken_pass_required(ctx)) prompt("Password: ", pass, BUFLEN); rc = stoken_decrypt_seed(ctx, pass, devid); if (rc) die("stoken_decrypt_seed returned %d\n", rc); if (stoken_pin_required(ctx)) prompt("PIN: ", pin, BUFLEN); rc = stoken_compute_tokencode(ctx, time(NULL), pin, out); if (rc) die("stoken_compute_tokencode returned %d\n", rc); printf("Tokencode: %s\n", out); stoken_destroy(ctx); return 0; } stoken-dev-stoken-bc25aa4/examples/sdtid-test.pl000077500000000000000000000064031440242403300220160ustar00rootroot00000000000000#!/usr/bin/perl -w use strict; use XML::LibXML; my $stoken = "stoken"; my $tc = "TokenConverter"; # --once means exit after the first try, leaving a sample sdtid file in cwd my $once = 0; sub add_str_node($$$) { my ($parent, $name, $value) = @_; my $doc = $parent->ownerDocument; my $node = $doc->createElement($name); $node->appendChild($doc->createTextNode($value)); $parent->appendChild($node); } sub rand_str { my ($len) = @_; my $max_rand = 28; if (!defined($len)) { $len = int(rand() * $max_rand) + 5; } my $ret = ""; while (1) { my $c = chr(32 + int(rand() * 95)); # these expand to 2-byte sequences. see mangle_encoding() if ($c eq '&' || $c eq '<' || $c eq '>') { $len -= 2; } else { $len--; } if ($len <= 0) { last; } $ret .= $c; } return $ret; } sub rand_bool() { return int(rand() * 2); } sub random_doc() { my $doc = XML::LibXML::Document->new('1.0'); my $root = $doc->createElement("TKNBatch"); $doc->setDocumentElement($root); my $node = $doc->createElement("TKNHeader"); $root->appendChild($node); add_str_node($node, "Version", "0"); add_str_node($node, "Origin", rand_str()); add_str_node($node, "Dest", rand_str()); add_str_node($node, "Name", rand_str(16)); add_str_node($node, "FirstToken", rand_str()); add_str_node($node, "LastToken", rand_str()); # NumTokens: default add_str_node($node, "DefAddPIN", rand_bool()); add_str_node($node, "DefLocalPIN", rand_bool()); add_str_node($node, "DefCopyProtection", rand_bool()); add_str_node($node, "DefPinType", rand_bool()); add_str_node($node, "DefKeypad", rand_bool()); add_str_node($node, "DefProtLevel", rand_bool()); add_str_node($node, "DefRevision", rand_bool()); add_str_node($node, "DefTimeDerivedSeeds", rand_bool()); add_str_node($node, "DefAppDerivedSeeds", rand_bool()); # DefFormFactor: default # HeaderMAC: computed my $tkn = $doc->createElement("TKN"); $root->appendChild($tkn); # SN: random # Seed: random add_str_node($tkn, "UserFirstName", rand_str()); add_str_node($tkn, "UserLastName", rand_str()); add_str_node($tkn, "UserLogin", rand_str()); $node = $doc->createElement("TokenAttributes"); $tkn->appendChild($node); # DeviceSerialNumber: blank add_str_node($node, "Nickname", rand_str()); # TokenMAC: computed $node = $doc->createElement("TKNTrailer"); $root->appendChild($node); add_str_node($node, "BatchSignature", rand_str(100)); add_str_node($node, "BatchCertificate", rand_str(500)); return $doc; } # # MAIN # # allow running from the source dir if (-x "../stoken") { $ENV{'PATH'} = "..:".$ENV{'PATH'}; } while (@ARGV != 0) { my $a = $ARGV[0]; shift @ARGV; if ($a eq "--once") { $once = 1; } else { die "unknown arg: '$a'"; } } do { my $doc = random_doc(); open(F, ">tpl.xml") or die; print F $doc->toString(1); close(F); system("$stoken export --random --template tpl.xml --sdtid > out.sdtid") == 0 or die "can't run stoken"; system("$tc out.sdtid > ctf.txt") == 0 or die "TokenConverter failed"; system("$stoken show --file ctf.txt --seed | head -n 2 > seed.txt") == 0 or die "can't read seed from ctf"; system("$stoken show --file out.sdtid --seed | head -n 2 > seed-test.txt") == 0 or die "can't read seed from sdtid"; system("cmp seed.txt seed-test.txt") == 0 or die "seed mismatch"; } while (!$once); exit 0; stoken-dev-stoken-bc25aa4/gui/000077500000000000000000000000001440242403300163355ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/gui/password-dialog.ui000066400000000000000000000152331440242403300217770ustar00rootroot00000000000000 False 10 Software Token dialog False vertical 2 False end gtk-ok True True True True True True False True 0 gtk-quit True True False True 0.62000000476837158 False True 1 False True end 0 True False vertical True False True False gtk-dialog-authentication False True 0 True False 10 10 10 10 <span size="xx-large">Password required</span> True False True 1 False True 0 True False start Please enter the password to unlock this software token. False True 1 True True True True 10 10 10 10 False True False True 2 False True 1 ok_button neg_button stoken-dev-stoken-bc25aa4/gui/pin-dialog.ui000066400000000000000000000150651440242403300207260ustar00rootroot00000000000000 False 10 Software Token dialog False vertical 2 False end gtk-ok True True True True True True False True 0 Skip True True False 0.62000000476837158 False True 1 False True end 0 True False vertical True False True False gtk-dialog-authentication False True 0 True False 10 10 10 10 <span size="xx-large">PIN required</span> True False True 1 False True 0 True False start Please enter your PIN. False True 1 True True True True 10 10 10 10 False True False True 2 False True 1 ok_button neg_button stoken-dev-stoken-bc25aa4/gui/stoken-gui-small.desktop000066400000000000000000000004021440242403300231170ustar00rootroot00000000000000[Desktop Entry] Name=Software Token (small) GenericName=Software Token Comment=RSA SecurID-compatible software token Exec=stoken-gui --small Icon=stoken-gui Terminal=false Type=Application Categories=Security;GTK;Utility; Keywords=RSA;SecurID;Authenticator; stoken-dev-stoken-bc25aa4/gui/stoken-gui.desktop000066400000000000000000000003621440242403300220160ustar00rootroot00000000000000[Desktop Entry] Name=Software Token GenericName=Software Token Comment=RSA SecurID-compatible software token Exec=stoken-gui Icon=stoken-gui Terminal=false Type=Application Categories=Security;GTK;Utility; Keywords=RSA;SecurID;Authenticator; stoken-dev-stoken-bc25aa4/gui/stoken-gui.png000066400000000000000000000034661440242403300211410ustar00rootroot00000000000000‰PNG  IHDR20S÷)ºsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÜ  0ä©¶IDAThÞí˜Ilçdzqf8’¢(‹‹åE‹-ËQbwIk8‰à¤hS(jôÐK{à 4…aøbÀ‡†äSq}h{É¥è’KÓÒ"‰§Š‚F±¤8†mY”DÛâh!9\féA#ŠP,K^Ðàøða¾õýßûÞûÞ|ÐB -´ÐB -´ÐB -üŸAxŒ9÷›ë¯«ÿ'‰A‘ß{ï﯅TU*—Ê‚ãzŽ("‘°ç¹®0ô ?ùOÚ*1(! ò»ßÿáE5lü`vêæ~UU÷ÝoÂŽÝ=£q3òñ¡Cß<ñäô7SаE2Úþü曯+µtÑš? Š¢<1‘%+ãû`Û!B!‡l¶€(ú8ŽóÑÀþAM–E{³íA| #¬5÷뚦‚/ÆãñÙT*ud#Bò,&&v^ÿ⋯™¦™E‘ÉÉ |ÐÏgŸuQ«ÉÄb6ÞàÀôôä‘eùÙÏ'ÇŸÈÑñ<Ï) £‰DâУ èöþú7¿ý…€Ÿ¸u+Éobzº½1¸P0¸r¥‡r9„aTH§Å'ã&¾ïÇfçòf \3"ë#’Ä€.`Ÿ€ÿ¬¡ßÊ]¸ÉŽÐ5ju…ùƒì¦øFé#þ2vŒ|>ΉQÕ:]Ý{ð||¿QK’´‘ö}‚ 0u}I’²¹ÜtŲ¬WÛÚÚÎoDDh:FR&“é¸páÂ÷ÇÇÇgÊåòs¶mw5´0?ápñ}‹—0ÅE2RŽš§pÏOÒç^ãdé—¼]û.·o?Koï—ÿ9ÊÝÒ‚( ‰"…™öfÒ_Þ=Þ8Lu¯KgiM®ç¢„BÑñ€:àáV?wîÜ_n`çÑ£G¬…}ßþýeÀ¼ÅädŠ¡¡«ŒŽîayyeSIòØ»wší]yb…Ü-…ÖOo¶QG@’$jµ?®~BWLåíO'^~±1®V«Úªª.mDÄÂêqjÀ€‹/º@×è‡VΟ?ß®ªªxìØ®^Í21‘ÁóVB»iVèì\à™§slï*lùŽp½%4EÆs= Eä¦í`-{°£·1F ‡©Öêñh,ZÞŒÈrÐVˆè‘;@uÕR33³wvïÞ•’$ÁÁÛT« õºŒãˆtt,‹•H&‹(Š»e"º]`m|…>*AvÚ¸à\CÓ•=ýý¯n–’¯:ýjQ‚ú€¯@Çððð€¦if$Q6R•$"I”¿…|||ÏCE\oMlOZÉ%<ÏE$â‰ÄëG¾õÒÏ€Jà&BS›(ÅnöƒÀW€]@|dddŸ¡Z¼=©T+E¦^wð=#l8ŸOÎ O False 10 Software Token 300 True False vertical True False <span size="xx-large" weight="bold">0000 0000</span> True False True 0 10 True False 5 5 False True 1 True False True _Copy True True True True none True False True 1 False True 2 True False 10 5 False True 3 True False True False Click to copy to clipboard True False vertical True False start Next tokencode: False True 0 True False start False True 1 False True 0 True False True vertical False True 2 True False vertical True False end Using PIN: False True 0 True False end False True 1 False True 3 False True 4 True False 5 5 False True 5 True False True False Click to copy to clipboard True False vertical True False start Token S/N: False True 0 True False start False True 1 False True 0 True False True vertical False True 2 True False vertical True False end Expiration date: False True 0 True False end False True 1 False True 3 False True 6 stoken-dev-stoken-bc25aa4/gui/tokencode-small.ui000066400000000000000000000070251440242403300217610ustar00rootroot00000000000000 False 10 Software Token False False True False Click to copy to clipboard True False 0 in True False 10 10 10 10 True False vertical True False <span size="xx-large" weight="bold">0000 0000</span> True False True 0 10 True False False True 1 True False Tokencode stoken-dev-stoken-bc25aa4/java/000077500000000000000000000000001440242403300164725ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/java/.gitignore000066400000000000000000000000151440242403300204560ustar00rootroot00000000000000build/ dist/ stoken-dev-stoken-bc25aa4/java/README000066400000000000000000000006421440242403300173540ustar00rootroot00000000000000Description: This directory contains a JNI interface layer for libstoken, and a demo program to show how it can be used. Build instructions: From the top level, run: ./configure --with-java make cd java ant java -Djava.library.path=../.libs -jar dist/example.jar \ { | } Test/demo code is in src/com/example/ LibStoken wrapper library is in src/org/stoken/ stoken-dev-stoken-bc25aa4/java/build.xml000066400000000000000000000016141440242403300203150ustar00rootroot00000000000000 stoken-dev-stoken-bc25aa4/java/src/000077500000000000000000000000001440242403300172615ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/java/src/com/000077500000000000000000000000001440242403300200375ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/java/src/com/example/000077500000000000000000000000001440242403300214725ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/java/src/com/example/LibTest.java000066400000000000000000000066471440242403300237200ustar00rootroot00000000000000/* * LibTest.java - stoken Java test program * * Copyright 2014 Kevin Cernekee * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.example; import java.io.*; import java.util.*; import java.text.*; import org.stoken.LibStoken; public final class LibTest { private static void die(String msg) { System.out.println(msg); System.exit(1); } private static void die(String msg, int error) { String errors[] = { "SUCCESS", "INVALID_FORMAT", "IO_ERROR", "FILE_NOT_FOUND" }; error = -error; if (error < errors.length) { die(msg + ": " + errors[error]); } else { die(msg + ": unknown error"); } } private static String getline(String prompt) { System.out.print(prompt); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String line = br.readLine(); return line; } catch (IOException e) { die("\nI/O error"); } return ""; } public static void main(String argv[]) { System.loadLibrary("stoken-wrapper"); LibStoken lib = new LibStoken(); if (argv.length != 1) { die("usage: LibTest { | }"); } int ret = lib.importRCFile(argv[0]); if (ret != LibStoken.SUCCESS) { ret = lib.importString(argv[0]); if (ret != LibStoken.SUCCESS) { die("Can't parse token string", ret); } } String devID = null; if (lib.isDevIDRequired()) { devID = getline("Enter Device ID: "); } if (!lib.checkDevID(devID)) { die("Device ID does not match token"); } String pass = null; if (lib.isPassRequired()) { pass = getline("Enter password: "); } ret = lib.decryptSeed(pass, devID); if (ret != LibStoken.SUCCESS) { die("Unable to decrypt seed", ret); } LibStoken.StokenInfo info = lib.getInfo(); System.out.println("SN: " + info.serial); Date d = new Date(info.unixExpDate * 1000); System.out.println("Exp: " + new SimpleDateFormat("yyyy-MM-dd").format(d)); String PIN = null; if (lib.isPINRequired()) { PIN = getline("Enter PIN: "); } if (!lib.checkPIN(PIN)) { die("Invalid PIN format"); } String tokencode = lib.computeTokencode(0, PIN); if (tokencode == null) { die("Unable to compute tokencode"); } System.out.println("TOKENCODE: " + tokencode); lib.destroy(); } } stoken-dev-stoken-bc25aa4/java/src/org/000077500000000000000000000000001440242403300200505ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/java/src/org/stoken/000077500000000000000000000000001440242403300213535ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/java/src/org/stoken/LibStoken.java000066400000000000000000000060031440242403300241070ustar00rootroot00000000000000/* * LibStoken.java - Java wrapper for libstoken.so * * Copyright 2014 Kevin Cernekee * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.stoken; public class LibStoken { /* constants */ public static final int SUCCESS = 0; public static final int INVALID_FORMAT = -1; public static final int IO_ERROR = -2; public static final int FILE_NOT_FOUND = -3; /* create/destroy library instances */ public LibStoken() { libctx = init(); } public synchronized void destroy() { if (libctx != 0) { free(); libctx = 0; } } public static class StokenInfo { public String serial; public long unixExpDate; public int interval; public int tokenVersion; public boolean usesPin; }; public static class StokenGUID { public String tag; public String longName; public String GUID; } /* public APIs */ public synchronized native int importRCFile(String path); public synchronized native int importString(String str); public synchronized native StokenInfo getInfo(); public synchronized native int getMinPIN(); public synchronized native int getMaxPIN(); public synchronized native boolean isPINRequired(); public synchronized native boolean isPassRequired(); public synchronized native boolean isDevIDRequired(); public synchronized native boolean checkPIN(String PIN); public synchronized native boolean checkDevID(String DevID); public synchronized native StokenGUID[] getGUIDList(); public synchronized native int decryptSeed(String pass, String devID); public synchronized native String encryptSeed(String pass, String devID); public synchronized native String computeTokencode(long when, String PIN); public synchronized native String formatTokencode(String tokencode); /* LibStoken internals */ long libctx; synchronized native long init(); synchronized native void free(); } stoken-dev-stoken-bc25aa4/libstoken.map000066400000000000000000000022411440242403300202410ustar00rootroot00000000000000STOKEN_1.0 { global: stoken_new; stoken_destroy; stoken_import_rcfile; stoken_import_string; stoken_pin_range; stoken_pin_required; stoken_pass_required; stoken_devid_required; stoken_check_pin; stoken_decrypt_seed; stoken_compute_tokencode; }; STOKEN_1.1 { global: stoken_check_devid; stoken_encrypt_seed; } STOKEN_1.0; STOKEN_1.2 { global: stoken_get_info; } STOKEN_1.1; STOKEN_1.3 { global: stoken_format_tokencode; stoken_get_guid_list; } STOKEN_1.2; STOKEN_PRIVATE { global: securid_check_devid; securid_check_exp; securid_compute_tokencode; securid_decode_token; securid_decrypt_pin; securid_decrypt_seed; securid_devid_required; securid_encode_token; securid_encrypt_pin; securid_pass_required; securid_pin_format_ok; securid_pin_required; securid_random_token; securid_token_info; securid_token_interval; securid_unix_exp_date; sdtid_decode; sdtid_decrypt; sdtid_issue; sdtid_export; sdtid_free; stc_standalone_init; __stoken_parse_and_decode_token; __stoken_read_rcfile; __stoken_write_rcfile; __stoken_zap_rcfile_data; stoken__strcasestr; stoken__mkstemps; /* NOTE: this can break non-GNU toolchains */ Java_*; local: *; }; stoken-dev-stoken-bc25aa4/m4/000077500000000000000000000000001440242403300160715ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/m4/.gitignore000066400000000000000000000000221440242403300200530ustar00rootroot00000000000000libtool.m4 lt*.m4 stoken-dev-stoken-bc25aa4/m4/as-compiler-flag.m4000066400000000000000000000030551440242403300214600ustar00rootroot00000000000000dnl dnl http://cgit.freedesktop.org/swfdec/swfdec/plain/m4/as-compiler-flag.m4 dnl as-compiler-flag.m4 0.1.0 dnl autostars m4 macro for detection of compiler flags dnl David Schleef dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $ dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_COMPILER_FLAG], [ AC_MSG_CHECKING([to see if compiler understands $1]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then m4_ifvaln([$2],[$2]) true else m4_ifvaln([$3],[$3]) true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_COMPILER_FLAGS(VAR, FLAGS) dnl Tries to compile with the given CFLAGS. AC_DEFUN([AS_COMPILER_FLAGS], [ list=$2 flags_supported="" flags_unsupported="" AC_MSG_CHECKING([for supported compiler flags]) for each in $list do save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $each" AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then flags_supported="$flags_supported $each" else flags_unsupported="$flags_unsupported $each" fi done AC_MSG_RESULT([$flags_supported]) if test "X$flags_unsupported" != X ; then AC_MSG_WARN([unsupported compiler flags: $flags_unsupported]) fi $1="$$1 $flags_supported" ]) stoken-dev-stoken-bc25aa4/m4/ax_check_vscript.m4000066400000000000000000000111521440242403300216520ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_vscript.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_VSCRIPT # # DESCRIPTION # # Check whether the linker supports version scripts. Version scripts are # used when building shared libraries to bind symbols to version nodes # (helping to detect incompatibilities) or to limit the visibility of # non-public symbols. # # Output: # # If version scripts are supported, VSCRIPT_LDFLAGS will contain the # appropriate flag to pass to the linker. On GNU systems this would # typically be "-Wl,--version-script", and on Solaris it would # typically be "-Wl,-M". # # Two Automake conditionals are also set: # # HAVE_VSCRIPT is true if the linker supports version scripts with # entries that use simple wildcards, like "local: *". # # HAVE_VSCRIPT_COMPLEX is true if the linker supports version scripts with # pattern matching wildcards, like "global: Java_*". # # On systems that do not support symbol versioning, such as Mac OS X, both # conditionals will be false. They will also be false if the user passes # "--disable-symvers" on the configure command line. # # Example: # # configure.ac: # # AX_CHECK_VSCRIPT # # Makefile.am: # # if HAVE_VSCRIPT # libfoo_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libfoo.map # endif # # if HAVE_VSCRIPT_COMPLEX # libbar_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libbar.map # endif # # LICENSE # # Copyright (c) 2014 Kevin Cernekee # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 1 # _AX_CHECK_VSCRIPT(flag, global-sym, action-if-link-succeeds, [junk-file=no]) AC_DEFUN([_AX_CHECK_VSCRIPT], [ AC_LANG_PUSH([C]) ax_check_vscript_save_flags="$LDFLAGS" echo "V1 { global: $2; local: *; };" > conftest.map AS_IF([test x$4 = xyes], [ echo "{" >> conftest.map ]) LDFLAGS="$LDFLAGS -Wl,$1,conftest.map" AC_LINK_IFELSE([AC_LANG_PROGRAM([[int show, hide;]], [])], [$3]) LDFLAGS="$ax_check_vscript_save_flags" rm -f conftest.map AC_LANG_POP([C]) ]) dnl _AX_CHECK_VSCRIPT AC_DEFUN([AX_CHECK_VSCRIPT], [ AC_ARG_ENABLE([symvers], AS_HELP_STRING([--disable-symvers], [disable library symbol versioning [default=auto]]), [want_symvers=$enableval], [want_symvers=yes] ) AS_IF([test x$want_symvers = xyes], [ dnl First test --version-script and -M with a simple wildcard. AC_CACHE_CHECK([linker version script flag], ax_cv_check_vscript_flag, [ ax_cv_check_vscript_flag=unsupported _AX_CHECK_VSCRIPT([--version-script], [show], [ ax_cv_check_vscript_flag=--version-script ]) AS_IF([test x$ax_cv_check_vscript_flag = xunsupported], [ _AX_CHECK_VSCRIPT([-M], [show], [ax_cv_check_vscript_flag=-M]) ]) dnl The linker may interpret -M (no argument) as "produce a load map." dnl If "-M conftest.map" doesn't fail when conftest.map contains dnl obvious syntax errors, assume this is the case. AS_IF([test x$ax_cv_check_vscript_flag != xunsupported], [ _AX_CHECK_VSCRIPT([$ax_cv_check_vscript_flag], [show], [ax_cv_check_vscript_flag=unsupported], [yes]) ]) ]) dnl If the simple wildcard worked, retest with a complex wildcard. AS_IF([test x$ax_cv_check_vscript_flag != xunsupported], [ ax_check_vscript_flag=$ax_cv_check_vscript_flag AC_CACHE_CHECK([if version scripts can use complex wildcards], ax_cv_check_vscript_complex_wildcards, [ ax_cv_check_vscript_complex_wildcards=no _AX_CHECK_VSCRIPT([$ax_cv_check_vscript_flag], [sh*], [ ax_cv_check_vscript_complex_wildcards=yes]) ]) ax_check_vscript_complex_wildcards="$ax_cv_check_vscript_complex_wildcards" ], [ ax_check_vscript_flag= ax_check_vscript_complex_wildcards=no ]) ], [ AC_MSG_CHECKING([linker version script flag]) AC_MSG_RESULT([disabled]) ax_check_vscript_flag= ax_check_vscript_complex_wildcards=no ]) AS_IF([test x$ax_check_vscript_flag != x], [ VSCRIPT_LDFLAGS="-Wl,$ax_check_vscript_flag" AC_SUBST([VSCRIPT_LDFLAGS]) ]) AM_CONDITIONAL([HAVE_VSCRIPT], [test x$ax_check_vscript_flag != x]) AM_CONDITIONAL([HAVE_VSCRIPT_COMPLEX], [test x$ax_check_vscript_complex_wildcards = xyes]) ]) dnl AX_CHECK_VSCRIPT stoken-dev-stoken-bc25aa4/m4/ax_jni_include_dir.m4000066400000000000000000000104101440242403300221400ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html # =========================================================================== # # SYNOPSIS # # AX_JNI_INCLUDE_DIR # # DESCRIPTION # # AX_JNI_INCLUDE_DIR finds include directories needed for compiling # programs using the JNI interface. # # JNI include directories are usually in the Java distribution. This is # deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in # that order. When this macro completes, a list of directories is left in # the variable JNI_INCLUDE_DIRS. # # Example usage follows: # # AX_JNI_INCLUDE_DIR # # for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS # do # CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" # done # # If you want to force a specific compiler: # # - at the configure.in level, set JAVAC=yourcompiler before calling # AX_JNI_INCLUDE_DIR # # - at the configure level, setenv JAVAC # # Note: This macro can work with the autoconf M4 macros for Java programs. # This particular macro is not part of the original set of macros. # # LICENSE # # Copyright (c) 2008 Don Anderson # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 11 AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR]) AC_DEFUN([AX_JNI_INCLUDE_DIR],[ JNI_INCLUDE_DIRS="" if test "x$JAVA_HOME" != x; then _JTOPDIR="$JAVA_HOME" else if test "x$JAVAC" = x; then JAVAC=javac fi AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no]) if test "x$_ACJNI_JAVAC" = xno; then AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME]) fi _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC") _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` fi case "$host_os" in darwin*) # Apple JDK is at /System location and has headers symlinked elsewhere case "$_JTOPDIR" in /System/Library/Frameworks/JavaVM.framework/*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` _JINC="$_JTOPDIR/Headers";; *) _JINC="$_JTOPDIR/include";; esac;; *) _JINC="$_JTOPDIR/include";; esac _AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR]) _AS_ECHO_LOG([_JINC=$_JINC]) # On Mac OS X 10.6.4, jni.h is a symlink: # /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h # -> ../../CurrentJDK/Headers/jni.h. AC_CHECK_FILE([$_JINC/jni.h], [JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"], [_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` AC_CHECK_FILE([$_JTOPDIR/include/jni.h], [JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"], AC_MSG_ERROR([cannot find JDK header files])) ]) # get the likely subdirectories for system specific java includes case "$host_os" in bsdi*) _JNI_INC_SUBDIRS="bsdos";; freebsd*) _JNI_INC_SUBDIRS="freebsd";; darwin*) _JNI_INC_SUBDIRS="darwin";; linux*) _JNI_INC_SUBDIRS="linux genunix";; osf*) _JNI_INC_SUBDIRS="alpha";; solaris*) _JNI_INC_SUBDIRS="solaris";; mingw*) _JNI_INC_SUBDIRS="win32";; cygwin*) _JNI_INC_SUBDIRS="win32";; *) _JNI_INC_SUBDIRS="genunix";; esac # add any subdirectories that are present for JINCSUBDIR in $_JNI_INC_SUBDIRS do if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" fi done ]) # _ACJNI_FOLLOW_SYMLINKS # Follows symbolic links on , # finally setting variable _ACJNI_FOLLOWED # ---------------------------------------- AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[ # find the include directory relative to the javac executable _cur="$1" while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do AC_MSG_CHECKING([symlink for $_cur]) _slink=`ls -ld "$_cur" | sed 's/.* -> //'` case "$_slink" in /*) _cur="$_slink";; # 'X' avoids triggering unwanted echo options. *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; esac AC_MSG_RESULT([$_cur]) done _ACJNI_FOLLOWED="$_cur" ])# _ACJNI stoken-dev-stoken-bc25aa4/misc/000077500000000000000000000000001440242403300165045ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/misc/Brewfile-travis000066400000000000000000000000161440242403300214710ustar00rootroot00000000000000brew "nettle" stoken-dev-stoken-bc25aa4/misc/build-debian.sh000077500000000000000000000034771440242403300213750ustar00rootroot00000000000000#!/bin/sh gpgkey="BC0B0D65" ppaname="cernekee/ppa" builddir=tmp.debian pkg=stoken build_one() { arg="$1" rm -rf $builddir mydir=$(pwd) mkdir $builddir cd $builddir cp ../$tarball "${pkg}_${ver}.orig.tar.gz" mkdir "$pkg-$ver" cd "$pkg-$ver" tar --strip 1 -zxf ../../$tarball cp -a ../../ppa debian if [ "$nosign" = "0" ]; then debuild "$arg" else debuild "$arg" -us -uc fi cd .. lintian -IE --pedantic *.changes | tee -a ../lintian.txt || true cd $mydir } # # MAIN # if [ ! -d misc ]; then cd .. fi release=0 while [ -n "$1" ]; do case "$1" in -r) release=1 ;; *) echo "usage: $0 [-r]" exit 1 ;; esac shift done tarball=$(ls -1 ${pkg}-*.tar.gz 2> /dev/null || true) if [ -z "$tarball" -o ! -e "$tarball" ]; then echo "missing release tarball" exit 1 fi ver=${tarball#*-} ver=${ver%%.tar.gz} if gpg --list-secret-keys $gpgkey > /dev/null 2>&1; then nosign=0 else nosign=1 fi rm -f lintian.txt ${pkg}*.deb touch lintian.txt set -ex dist=$(lsb_release -si) rm -f ppa/changelog if [ "$dist" = "Ubuntu" ]; then codename=$(lsb_release -sc) if [ $release != 1 ]; then today=$(date +%Y%m%d%H%M%S) ver="${ver}~${today}" fi uver="${ver}-1ppa1" dch --create --changelog ppa/changelog --package $pkg \ --newversion "${uver}~${codename}" \ --distribution $codename \ "New PPA build." else dch --create --changelog ppa/changelog --package $pkg \ --newversion "${ver}-1" \ --distribution unstable \ "New Debian test build. (Closes: #123456)" fi build_one "" cp $builddir/*.deb . echo "------------" >> lintian.txt build_one "-S" set +ex echo "--------" echo "lintian:" echo "--------" cat lintian.txt echo "--------" if [ -n "$uver" -a "$nosign" = "0" ]; then echo "" echo "UPLOAD COMMAND:" echo "" echo " dput ppa:$ppaname tmp.debian/*_source.changes" echo "" fi exit 0 stoken-dev-stoken-bc25aa4/misc/build-one.sh000077500000000000000000000016541440242403300207270ustar00rootroot00000000000000#!/bin/sh set -ex # perform a single test build + check # used for travis-ci automated builds if [ ! -d misc ]; then cd .. fi lib="$1" if [ "$lib" = "nettle" ]; then args="--without-tomcrypt --with-nettle" elif [ "$lib" = "tomcrypt" ]; then args="--with-tomcrypt --without-nettle" else echo "usage: $0 " exit 1 fi # Apple libtool != GNU libtool # So "make check" needs to run "glibtool --mode=execute" if [ `uname -s` = Darwin ]; then export LIBTOOL=glibtool fi rm -rf build.$lib mkdir build.$lib pushd build.$lib # `brew install valgrind` fails: # https://github.com/Homebrew/homebrew-core/issues/23536 if [[ "$OSTYPE" == "darwin"* ]]; then ../configure $args else ../configure --enable-valgrind $args fi # try to ferret out any possible timezone dependencies for x in Pacific/Honolulu America/New_York Europe/Athens \ Asia/Calcutta Australia/Sydney; do TZ=$x make check done make dist cd .. exit 0 stoken-dev-stoken-bc25aa4/misc/screenshot-0.png000066400000000000000000000365151440242403300215360ustar00rootroot00000000000000‰PNG  IHDR4ðíÞ IDATxœíÝgTKàw³©$ôÞT$!4ņ€õ*DEì]¬X®Š]Q¯õ³7ìíÚ{o¨(6@Å‚ ‚AD¤w)»ûý HI¨*¹:ÏñxÂîììlvÞÙM2ƒ´q‚(‡Ç—Úõ÷¶µµÑÖÒ aX}— Aþh$E¥¥g2Yìgv`mÜÇmlØ•¸„’¢ê»lR]­lš<}óÁÜÔ Ö9DIT¶LhÖÀH·@”ñæ ôuu’ÓQd"ÿET(a&$E%$§› ˜ ºD*û…ï'‚üþ¤qVzŠT"®ra9© Ã0(¼çÄЭfÕ(J’š—œ$•QÛHU_WÂ÷ŒÈÈþO°L4 5•°t?Ééï•ËäcøóJó­ªÌD*§'Ä:µ´~ÆÕÔçªi@^vfnÚ7§V̓BôŒ1˜¬ÊKE¯NÑk‘“Ÿ‘)#£«0Ô¹ªì i(J’BpÛ¬90°µž÷æ ×²×Yê¸TDcª«Ñ~v)IÁ·w"I™et=+U¼Ì""#7_°çú†¦ïvºÏÿHüAñù3Ü8¾KîòîC&Vgó‚¼\ç–öÓÆ ëÓ­Ó¼•› Š2“×-žÕÐÔxñ>gå"+ÁÐyÄ‚aN|U(Hy÷ôÁ- åã“eˆ¼¶Ö˜‡O#>eÒ `™÷w†ûwã2y?3>)IAr¦ûæSÓ•Y¶rÌß–Ï?ÓyVR£L%.µœ­Â ~Ö»[§†¦Fÿ[8cfÑ̆¦FŸ¿$?¥edVåN«œE©«0 4y@fž85[DýO$©bõ®Ë&9™Ä>ºŸ¢ÖT`DæIA“.NÉKM‘J  sÙš¦™”P1ÖÆÞý»cßYiv“Þ#'8½zsåá±#?A Zª&Ætq|fbESW5i€Ë¾e'¤‚ª¹š6“ȈÏÏÍ% è<¶N/ì‚‚† ]ôM,U㙘Ð%Éùi©)ѹ,-SŽ ÃéFôý[Wß³õÚµÔ¦âŸ> ËŤ«Ò©´Ü¯©ß YæzB™r2 hjÕ´¸PP!罫êáâ4‰„ÀX:\=†2öÔëSÅFRQsZƒÉRÑÔŸ»rÓš…3š­[< 0052øü%aîÊM*z8^uèU‚IµØÐ¼¡QøËÆ…5sˆ%L)ªø<Ò0NÇq-.-?"&±šEW”,Ÿa*0ørvÛ¢Óé&ÅÕÍÙôdÐtþgIßö Td©‘ç÷ìÜýLfç5o|C°øçÄɾ«¼·5˜·®«*€³ß9çä«ûŸ:mrÃ&zþÈ{ã@;Õüài#vF>w½ýÚ¢ûÓmNæjÕHƒ!Izutóîã ,ÙtÏõ ô#;ž¶X6ÄøÅ”Ñû>™wûçŸ>íL9Ò”·gwîØÿQ‹Ícàt5µw·.¼Ê)°ŸÛº¥Sþ“û·|Qap(¶¾Ëœåß ¹'ƒ’v”H7ì±ÌXï—þ{ä3­q§29¿Çe˜Õžëx×Ͻµêѵ'çݵ¥+®½Q1dþãógÜsýM¹uó’eÑá/ *Úc¹å*ªêEÍY±qý’Y¦Æð%!qΊ*z*ªêÕ)ve=2Š¢è4 òÒ-T?ßÕH8"K9"z}IG'¸lL… œdÒ¤ J̦I†jLÆ­“ÌàIÂcLûOßZƒNS§³E¢‚Ƴ— moštóá[¶å€³êËÒß> Í€Ôÿî;‡Ä¿‘ŸÏ8°ëÞ«‘bÐX©cºB¾*‘C¨˜ÙhÓ4,¬ô@üæÉ7)]œEâ©Ï¯í>œ¦o7fº«I^Náþùý‡ðÅŸ>&åó¬f-ÜNïóɽ'eVƒLì@%HˆÂ3ˆÓÕ XÌ’°ÁqU)3/WÈj™%ç[ÕjЪa ‰¨cs}1ø>årƲ Sšôp3x}éØóxå³™V7‡®:fZtI@(þŠš¸ J7ƒ¿@^v¦(3y­ïLS#ƒ/ ‰`jd°ÖwæÜå ðùmå'AÈò²3p1 2Ó3S ZžŒèN£QÝìŸpØM˜Ú€a"¶v¾”ÑP–!K¤ÿÁQ W5ÌxþïˆáwûMù{r›Áÿõ~b¤: ë[6©¢’Ÿšš fÀÃ!«x:N§Qß{,—õü3X4nnãØžpêõSÝÞƒlZ›1á˳ð<6APn/Òº¡ž ƒ†´ï[})2àªe²´4XºîËý݋֨i0 ä'I°5ä²¨ÔØµ$&Çç3i©Üœ‹Rf}Ë6%)Ðhÿ½m!A”[BÄ­S{Ë-ì:p\Å”Š2!H¢ðÿ÷¯C+f®(ŸÒËI™,7=iýŸ†&FŸãf/Ûëû441Zã;sÖ?ëq“^ë§µ8Î`ó4²ó²3Rròï÷uÓær ØlI«V8Å`0 gÐY43SJId ^)Q@8¤dI æ§S~Ç;¶ñ¶â›0C2 4ŒÔhùi.@Br•ß”¢ ? ‰ÅjXAij4ð´µµVËyõ!þ­y®¦•½ƒ¤\ O­vfvj”qo×ÄÓi/¢W:’Ä0N+ÈÈ–äÜÙ¾ôF’ €ÌÏVã¨(8;8.N“WȵҘÛO¹]œÜõ{äu6Y^ÎŒ¢‹(!#à?ÿ7Iå—r ’¤*¦T”Ia#¼ò|J/ÏÉÊtjißÐÄ(&îëìeXj:à³týºÅ>f ŒZ6{«ªÁPxTPIpb4GUÍUer¸ñQ/n\ëÐ6M]—š‘}ëÁ›Ô´Œ’„€›«¦i"ј•ïLÙ¹q¼¿þ9Ózõ:._ÇÎ -2æëÛ¤9-ºvÿ{=’ãØƒ¯·¦’XéNFå$çh57ahø‡àoÇEx:·l {»/!7>,þjÑDwŸ&LŒFÇ@œ+ViÜÂÙ â™ejKÞݺŸÓ¼K»ž=¼sM²ƒßHâpåch‹?ܪXH)4øä¿}sb–àÏÁÞø«˜ó¡‹±?áͬ/2yÁÙ©ŸWuR*Z¥(‡Êó)½œÎâ?#)ê~p(GCŸ¥¢ IÎX²¶]‡û!ÏÕôL+)OQ&•®Å0®¢ªijé’øåðå:“­®cÈæñ¸Æ¥Óá8]ŠÑÿk×` X¼ü¡/r][97 Q9îüß±L†JúÆ%G˜3<;tq!3?^\¿ýx–>J}ß c²TÅ7ÝîâÓŶKVJà¢CbHgKZ⛬œØÈ$°0$cîÇSU'íÑÉ §ôuû{¹ àØÕo{”Ÿ0\•£òeÃÂýÒ)ý\‡Žèâ¤××oJ1ŒSñÅh\N|ùBfªÑŠ»À¤4öÀŽ`×%mÇÎøëÞüÀò9Ëû>•Èd8­ÌsMS [¹) ²L0”¾ +—‰¢*æ£(ÁÓ5 zõ‘§×€Î`nÂRQÅéÌ Wyº&4:£$E÷ƒX÷1Ý»u}úæC%¥ H‚ IÃ0Nÿ¾îG$姦Éd8ÎÕçjkã4 Ä©y©ÉR)4KÛ”Ãea”¸ á½HªÂm`ΤEå'䤦$ ×h¬¦Á!ó>e§äQ }5c=\’˜•B—kjÆÄ1 ²ó“¾ˆ%$ÆÒb3óD9 ^3Uþ«v”$-?-Y"–Ðhlžž>^¦ÊÒä¨Ü|œe(PaÑä²Ô×÷ ?.+9 X†j†:XÅœKï½°´*fz¼ÿÖymiÍ ÿˆÓh6“ŽãP“ÒS$•_ –Êeˤpa+›&7üoU38Déeåä'¥eÖ: 5žŠ’d¢¡ÊŠùZøgapþ×>™Db1ñI‚†F ujו£(*'Oý%QI2‰‰O*·'ò_%•Ñ_êžòdRÎOÿM‚ µƒ‚A”T™ní–õUAàïMçK^£–A” NQR(8DI¡àD%…‚A” NQR(8DI¡àD%…‚A” NQR(8DI¡àD%…‚A” NQR(8DI¡àD%…ƪ&2õâ°6s^U–„Ñnÿ“í€ê$ÛÙžWz‘øó•åc|.|Ð}þúBëŠøV?Y)Òä'§vï>yûÉû41àê í;ô9eL'39#â‘õîÖÉçn¿ˆúš-þÄ+¦Z–L@¤¿:`Ï©ÛÁáñ9$`\«Vû{ØJ—Pí·¨Ü±# ¡à¬oDÚ£ÍS'î~UðC’•B‰Þ˜0tõãü’,²>?¿´åù¥+CößA§t§‰H¾·a´CoÊåž“'+îXwjÚ …wKæŒ*/1"ðXDàyÿù'önRÕu©1Ô­­& hŒ*¦¶Ð5×aT3YÑK*7òðä>£ª ¹j&+« bû´ï‘ISÕ,™ÛáÓñ©ó®|û>¯ •ýtÝ ñß#“®eÒÄJhmÑÈDO¥xÂNòÛ%ßÅÅ‘Énܦ›«#_¥ð/ÑãÕ OÅɪýÕàþp¨å¬&LÇýP¤{ù¥DÒÅá>%CúY°0zµ’Hâýÿñšu*¦Š©Ùª™¬*;t×Ñ¢Á9Ž ÏïÜ„•¶sìÀ-á€èÁÖƒ‘® {Å¢×[g‰ív“W/ÑÞŒWaº†¼Hÿ°¢pn2ýÒ…qæL}>ܯ˚€·7#rF4ЬÞ[T£ãø£¡–³.¤±V;ÀF»7Tp©“—ŒøzÆgvQÈqZNñí©%wÓj&«@ü9èeQ«©Õëï¾M8ÐTí½4,\˜xåì;™voljoôæóOíôî$'2£—Ìj`©Ï ë6m\t÷ˆa GS®æ[„È‚³D‘ÇŽMnÁé8ª‹¾‚7Sn2ÜØsõì €†}6\Þ=Þ—?}b5“U@d%d½Ô±Ð+žýÝÐEXto˜™APÙÏÎ>höññh¤°ÏÉiÒÙ²0üÄßú* ’ïx[¸Ö²«PµÇŽTºÕ•ùäàùäÂ×Z½Æ´Ñßv(LÆj¡QѲèËqRâÛµ™nCÿ¹K»qKKU€¬§»÷[œ.çV¸þŽýw‚³6¨¬§û.ÝK©u]öý'û90ëIÇ/­×I Í`Ú÷_r|¿'£°Ÿ©ÒÐL g–Čʹ©õé€ñ„ò‹–&¾ý& ’¯.ò½–€5õoàÅn›ï¬@¾ÿ÷ïyþ)å³^ý7Õ™t{ÿí¼Â×z}F9¨Éï×U3ÙÏCã Üæîr›û}IÁ›Õ/ K$p1c`êFÀâ1i%jeA’'!L}tä¡ôG¬žê¬¨ÙZï÷¡Çˆ³éùw÷|ë6¸ÔS¡z?öߺžÕœ4öüþçE …ù ¡V ¾¸VÍd¿‘xkËÉ$Ìγ­. ã6neR´öã½÷EÑÒ¤wE¨ªÑAš›Rô·nSƒâ{GŒgéܨèurtZéçÈÊwìÿE(8kL~ühtáKZ³QîŠ>¬f²_„’$…›5tþ=€F/ïn†4¦™[³Â$™WnœA%޽ºåÔ·Â…L—Æl «ê©eôîÂø¢0”%ž,Z¬Ù@³Ô*×±ÿg¡nm QY!û/5+—±]ôå?ç¨f²ŸIöùؘq'³ÔÕDNrltBnñ m·UsÛäÈh\ááuUßk页Næªâ/a/RÌuksÚúS»ïí –S¹I¢-?]à¹uvÆ<5}ËvÝÛ3@såˆ.6!ß®ë°Õ·â% z½¤c×Ù{7Ž÷pëж­óà5‰2 âx4ï²í£´0ÏìGS[¶þ(§þŽêƒî9CDÊÓ€8nš©ceWHÞï¿à^Ó%áá‘·—Z?\0v×{qѪ¯WîÌ;qõÞëË\÷™ïŸ F®#í’.\þ(È;Âè8¤™ê¯>˜?ºçü ɲ“²1 SÍòÝXI¬ÿ…¸&ã½Úê31†^¯ñq®~*ŠNÜz`×F,\«ÍÖ‹+oriºíG8å\?û® 'ìÜv×þ6Ü_~00Ôrþ†è<•“˜Sþ‘ù-×Òçž>šŠ®.3ûkQ¸’ÁSc­àj«H3Ò HL£ÕÈN2ÿ3‘ùÙ¯Î<áõô´äü£@PËùÂuÚê%ݾúQTn¹†±:‘ž”G™Ÿ’"Q3ÒÀ WJÓs ãT–‘ÍÐÒáиöú1Ï>~|ᩚ›‡€õ+A-çïˆÝtôt—Ì“§ï}ø15¿ ?ãë»°·éÓ¬Góè}Ÿ¤Ê("ýùá}QÆn=Eñöб§i%útiÏ}©C/knaNžý4B¶m{ªëáÖ˜YŸÇôB-ço 7ê»éü7Ùùy=Û¶´¶wþk̦;IR`4öÚ±ºÃ[ߎÖÖ–íç>m±tÏä¦ìÂ-h*öι[{·²°ë³MÔoã*W½Â•aÖg€ö›wºýz˜2êñ€þHèsÎ߯1ï5{¯Ùå3Œÿšø¯ùÓ“¤ªË¬ƒ¾KådEQ\»A]ѧ¤¿Zí>ç¬ÍyB#!ü2Š:)U½ÿTÅEDÊ£û¿9úþeˆÿˆ’!5ZÎßÐy«¥Ñ»\N]¹·“Óí×C-'À±ý'èyù… ó‰çŸM¬â …ÐÓZQRèi-‚()Ôr"ˆ’B-'‚(©_Úr*ÃøÙèôÿëÿšªÍˆï‚ü$uñA_'‚()œ¢¤Pp"ˆ’BÁ‰ J '‚()œ¢¤Pp"ˆ’BÁ‰ J '‚()œ¢¤Pp"ˆ’ªÁ0%µûf=‚ ¥Uÿçc5Nôkù•P·A” NQR(8DI¡àD%…‚A” NQR(8DIý÷ƒ3/x’­/z9]ÎÔZ¿B~èL!_0àtY?@ä…­èjÃwYp?³ž*FÕ<8¥1;\…|o7Å?­°:ŠBç8òN󞋪ض2óÅÑmûd5Z…ü‰D¯—8 ù‚Û>J /hj ¾@ØûD"!7=!ÉÊ"!;KDÔ68Kªº@È88{ÎÙû$(ªíÅË{Ÿø*ú‘QZZNQà†£ÅuÙ9ßn¬]ºí@À7iMV) «ï ñZ­}øäåÓmÝ´ëÚ=dé™èq __[3z湼ɿû[2´ÚzOqÑ)ù–݈ˆ2j]n æàÖÀ´ò}9"í±Ÿw/{/hÓ}òžÇé$€èÕW¾@h5òRA$œÙT ä»®¿~táèeo2ÏnÁŒðÏ*ÉC{FÎ*"5ÄÏÛ½¹@È·pê5ãpXVù]“™A œ…|ã”ëI„ü’uƒ÷ŸX1ÌÑRÈ·êÇoïÖÍ^»6‰#ÕÀµÔ] zÏ`Çã·¯¡ã°õ'WvQt« "êrêëP[h¼'Ù[ùj¿_pG@@Q¦ƒWú´,êÐ5¬tqYNrPžœ'`*ÈW¢§.T©Go¥_ç¦~y›ÿÔF¸â’Ý0¸, J=Ë¡ Óc”¾nV¾S ãÑheWÊ=|¤Ž0œA™XVx(©˜œAÃh:­¿z¤Åæu›N¿¾»V†öIDATcê‹ø]K+¾íåO:S0ú^÷†íß;Ü ð¦£çz6¨ZƒNÝ^ÑŒ]u åFDÔéAnâ>»ŸäïH-\Â4²1€Ìt]Ç.Ý»»vïÞ¥}  9±tç'`šÑ©·—\Š'€†Ó@&’Tü„°ü*–‰½)ÄEæPTNÔ£0¶5.yc2vïŽa† Y³üV*QYIäcê75€˜G9H3“s…;eèšëÀç'ïs)2;úÕ·âLí”ÌýpïªXú\¨ö:}ø#¢€Ìxyýµ@­±)@Šó­æÃV¿wl˜!@fȃÏչǓ¥>ЦYMÞqèÐ¥ÀKókÚ¡+§bDÔåÔ×­,¯ÅĉvPÅo³q¯V ȹ9¾ïè)3gŽñèä<íAD•%ÃIÎÞí7]Ò'ëVÜL!pÕ† y¹×¦ éÓoú¹„Rw*¬b4rÛ† ¹7ÇõèÛ³ç”ÛùÀh9¬§iÉuNÇÊÆyÚânj{{éÆG™¤¢’(Ââ÷ Ƚ5ÞÕÝÝ­“½Ëì \P´S¶y·¿t²®zõê×Ë}öýª_µ{ìø¹S†-¼Ÿ¥°HpÝN㻪¼ÛäѼu;‡6ϧ˜c§9÷§µué?fÆÂE›®ÀÍ„òn:Ë#²ã“(òí¿«V¬šç=zèÄ•§"rªú* ™ùêÌÖ“ 7dßî€ø2 Q—S_×€è&î³úi•þ{ ßÁ…½…ºÉÏü¯Þ|ô…×¹‹J X½6X Úýgõç Íé©yË6erZLŸãfƬïÒÜ2Ï׸åWáFž[÷ÍíÞD5åÃû5ëŒC~ž&ez.4­3ç´b@Æ¥…[^äâòJRÉ’Lþø=Û&¸4à¦zû>SÛÁÑ” wʱ±ÙÛQ#¾¥¨ö]·ö/•ʺ– ©&0ùÖFÕè! Ðtº¬<µv¨c®43-×ö˜qøˆ·€ih+À>>¸véÚ³Ó¶£¶®é©_õÍUœÂ5aäÅxñìîñ…SöDUÑäŠ?Û|&R ´}ÛÃÔ²mb¹ˆ¨Ë©G“ç"*YÜ~î«cW^ÞÖߌM¥‡øº;Ûùß­Î žÈþ¥'ÏE‘?E’â·WÈÐ#“#.¦‚JçžJÓ»AÁ‰ü©è ¯]ô~ñžkÇv„Ð5ÍG¬œ;£«ò<\GÁ‰ü±0žÕàug¯«ïr(òßÿÉ‚ü¦Pp"ˆ’BÁ‰ J '‚()œ¢¤Pp"ˆ’BÁ‰ J '‚(©Z'•÷îâÿFws²²²µhé}' ˆÔЃ Fur°æ „V.Ã|/Ĉ(Ƚ7Öþûè,-„EF感˜ÒAh3)(WѲC—vòû]Paiңݳ=œ›óBa‡Ñ«edæ‹ýSÜ\¬,„–­Ü'ìÍ?0‚Ô–,þpÿ掋BóŠþ.xµº‹ÐãðçŸðkÀZ'vúÐIW] ‹xýîéöNê²ì,ížk.‡¾‹|re†Î³NÄÉ€ÈMLÇmWÜzóæEÄ›AË[p¨ü¨c3ݼ. ´~;‰Ì|¸fq O­èçØò6!sc^|6½ïnÔÛÓcð“>¾þ©$„oþ{Ç7÷ß¾yzÀ#k·ÏÚWu›AÊ£›ô›×—vÅïú7ˆäÛ›ÎÈúÎóó#í:«ypŠ"öùE9¯øghs]&V4nÐyºOÿ–Æç™wîi§ÆfȀȊÏQ1m Éa±X,‹‰c€±´Ì;-;¿ß[¨è‡Ïdê• _v˜ÕÓ èKŽò6¡i¶™¶jF¯¦tºšUÞ".*Ud~Zªe s5œ¦jî`¥.IÏEM'òƒqíÇÏ´‹Úþï[¼;²ã•õÔÉ<é×[+†v²-œ†.»ñU’øËK†¶ ù›½æ¯qÛZãà”~ ÉÐ7yµÌÝÅ©yëîÃV\ÿ"ù¾–È Ø±ë¹g 6¢¬üôkcێÞŽÊ¥×kãÞÞ˜‰Q”Ü_>I7|—ò\ç-¤—ÄUå›PÙ‘?smÛ1@Å~²—Ñ Ÿù»®ßÚ7¾£ 3Zòjz€R\¿çœøy¿ÛQw7Ÿ‚Asz’ŸLšh±40<ìÁ2ó›sf“å¿Üºìºîâ{¯?D<:³lˆ“~ÛÖ§,#>½àc°´ïîÛŸ\]ÔôŸeu׫¹Ð¢yÏ)÷̦,nÅàØ/¹ùèå‹ï#ƒÎù4Yìµøavƒo˾ž[°!uøÚ‰B&?xË#RWùYϞᨆ°Ìz ë‚Ýß³jñÿîp=Æ÷âsªÎAjŠm5rv‹7K&.{Ùb†—[ë6º±×8g}&Cßi@7¨ËOÒ0­Æz¢×7n†%“jfÍlõ«32CY5ïÖ’pÿçdĦ1t[ ö0Œ¾žE¨wÚÿ"âCDе¹¦W¼<‡äPtž¦*\­IÏ¿}ò‚nFW:²®4æøÂ­ÒqëG™³*Kö‘ü¿Q‹"{mÝäa„æ^1é|ÐÇ!{;<Ÿ1páý 4 òãÑ´;NñPKPéãÝN‡²Œ/Ò·K»¶´¶u°n5üh&Í̧7{øàÞ5Ÿö­{OÝš^ó¬'CÏBLMÊ+¬ó”L$Ø̒_Àa óŽÃG4I½/®ìh”ŒÀ˜iÛ§,¬²ÛXAƒ“nò×Paôæ5WcD¤(.`ÏÙ4›^VDäÃàwIy2 HQü£#ß²í[3ÒÃn=ˆJ‘@äFûûmy£×½g¥M"‹ï}úîÃû·ïÜ ¼sýÈxS¦õ¢‹W6ôÔ•SH2óɺ‘3´úß¾é*2±X,–S¯©^Ö3ÿ—i2iòó+AYFÍŒªÙ#H­1u÷håçwçSŽŒ(ÈŒ CæÅ< û’K®jÂoÀ%å 1Y…š?ÆnÙ”4…»Ý|ÓÐqĺM} © ã;WÌýœ#ϤY÷yûæwÔ€´ŒàmËf¾J.LÍÌiÀ†}3l+‚ÎÓÕ/~€#+Pcà,MC-yOu©ô{[öFeCÔ$çÃE‹4û}°b”ßÒÄs»Z%‹màÐoù./~Í»úRCLþ„=kD‹Öövø[˜†e¿•{m´¾\÷õ™EÐØz6½®k§QÓù®Ð_¢DJð…¾¾‡ J '‚()œ¢¤Pp"ˆ’BÁ‰ J '‚()œ¢¤Pp"ˆ’BÁ‰ J '‚(©|·–/þ¼r Èâãûˆj¦¬ApV?SAêukDI¡àD%…‚A” NQR(8DI¡àD%…‚A”ÔÏ Î¼àI¶B¾`èåôšŽ ˆüDa+ºÚð]ÜϬ[õøQù”Èé ä œNªç1kœDÒIá÷‰ÃŠþ >ŸòkƒL Þ9¡{¾@Èvè=y³ÿ×’ù' ^-ëÈ8ú„ä‚4f‡«/òí¦ø§L:Ç‘/pš÷Íkôƒ”¼É%ÿ†d×(B’•EBv–ˆ¨YP‘™/ŽnÛP|êk›O•/ÆOPÃàÄ覦&Æ…kš˜š˜Z4Ô ×tÔ¿Ú SügOð»CS×Q'S"n?NƒâýŠ"OßHÍ΃ìJMŽ" Üpô£Xn^ÈÂÒoØØÌ¬±™™µ™^uòRx­Ö>|òòé¶nÚ5ª„Ä·k—n;ðMZ·|*ƒU]+ã'¨áñд»m¼xçæåå-Z-½|çfà•ÿµ'ûy»7ùN½fË*ß’™A œ…|ã”ëI‘öØÏ»—½@È´é>yÏãt ¨,¸ÿÄŠaŽ–B¾Uç1;òKåTðéþ+1¦ðýçá.®ëcXTò^Ÿ¹™:Ý<­UJ’³1·¦•) ‘xeBk¡U¿ÈJg†@ªG«ïÖó·n^½uóêÅå6׸òB«‘—’"áÌȦ!ßuëÛ´àI¶B~×µ'6xµµò[ ø' ‰€¼`ï­›Ù ¿œNžú¦£/=Ú7Ñ©©°Û®)DŸýgX7koéâ±ðBtHbÏ,½ì @æÙÁ-ø‚þYeó RCäTŪª™ýrÏèv¶|AÛ~+K¿D^íb(¨Õu©o?âb#‹;ê=as@t®¾@ “ymÍpŸ«‰¥f†Àˆä¾>§“Áx覕ÝôqÙ—ã“ÇoˆÕîÐ×ÃEíÃí-^>W’ŠÓ“/7ú^&›w´R‘%>Ø´èð§ïW&º†±:$‡=/ pÕFV¦Ü¢âç¼?Žý~—Èäž×[²ïÎwu½áN\AÑ&TÖË“9`ÜÓCPjDy1i5~’= bl Lû~©`YŒß¿wßÑíÕë~èHúÉ…÷œ=~!ÔÛÌôíÈ…ÄÇO>–½–Lwà÷õGùíØ¶ÃoVQÈ…¹SØHÞø"Ì¢pãCïÙ´aÇ"ø[*6c}š€†óß+7®ô².;‹\UQqÕ*ˆ¾q+ @µÛ^ÿ«·¯­jý½ƒ^Ýb(ªÕu©o?"8 ¡£ÃxmÀ——ñÅ "rûš hyúŽ´âˆ^ÇÀ·ãcº¹vì>õl*™•œW?Fv 8€s tY¤T\ê6×uýßù³K=¬8©vOë:|o¤¨¬ÐS÷ó Aï^üÒó¢RšQ¯Ùý´ ÿîÆãÑRFñûMãñÛ»u³×þ 3ÿ‰8Æ›4á7i"lªËÄ€¦×uÞ$Rà8ûÎqÑü^¿ô- ˜@×±hÈ(øú%GÞ¤[–#F8›ò8Ž‘¸q|';a“¦¶­§?™¸ê>UTEÅUKšò1µµRÅpMË–ÆÅ+ª] …µºõíGTÑ¢ÛçÒói–~›J@úåmþSxáÅ+M¯ôi©V¸)]ÃJ‡¢žƒËÂ@ÑM9®a?dù×î+<Çyµ{Ó“Á{ÚICN‹À¬_/³r} ñZLœdwnå«ý~Áq€Ÿø`íO¥Õ{ã™ÍJuXd9É@Azrž  äœR(RVÉTx,Õâ‰qrBÖÎØœËk;Óo¼íç5£ÖEV«8UTÅJ«MÓV|M©A1Õê:ø-'ËÄÞb‚"s(*'êQ Û—´b&c÷îfâ5Ëo¥L#cÈL×uìÒ½»k÷î]Ú·°1Q4 ýwTÞû€;áéR\³i«ÆL€‚ŒL ‘|,Xž åLY„›¸Ïî§ùÁ»R‹‘¹î]õKC‘úHcN,Ýù ˜&FtêíÆ%—â¿GbÜã÷y”(6è½€mbªZiµ%²b>å0[Žѵ™Yúv†Ó@&wÒ®ªª¢B ]søüä}.EfG¿úV¸XVýb(¬Õu¨o? 8ÜǶaBîÍq=úöì9åv>0ZëiZÒ&ëXÙ8O[ÜM ro/Ýø(“d6îãÕŠ97Ç÷=eæÌ1œ§=È©ú3**ïõÞ .–:¸t™úP˜°‡=/õÁ©§X èj*·€ñZLœh‡UüÆŠ£v?wʰ…÷³ê~èHú…i]]ݺººõñ}š•peÉÆp„³wûM€ôɺ7SŠÃ3çêx·.݆Hà:÷³áVš-®ÞД ¹¿bŠ÷˜[>•Z£Ú°! ÷Ú´!}úM?—P¦®ª**Ä6ïö—.@ÖU¯^ýz¹Ï¾_T[èÕ/†¢Z]—úö#žÖâFž[÷ÍíÞD5åÃû5ëŒC~ž&e.Œ4­3ç´b@Æ¥…[^äâ&ý.ì-ÔM~æõæ£/¼ÎXU²„ñ„n½íŒTó“âS Ô·÷Þµm¸iúÝ“/H°ÔÙPÑ•˜nâ>«ŸÖ÷?µM5É·6ª|:B¤zÄIŸ?ÅÄ|Љ ޹µzm°´ûÏêÏ šÓSò–m Ê$hÖãF˜ç%J@Ýnô†EªšOµõôÝLYä—Ga4¿­žßO ·Åô9nfÈúø.Áe–ͧꪨÇvÆfoG]Œø–¢ÚwÝÚ¿Tj\ ºüZ]—ú†¦D~²¼àIŽãnØoz|´—Ö¯ø²Êš©è Ö5…‚A”ú´ùɸmw¾Fã6Öj9DI¡àD%…‚A” NQR(8DI¡àD%…‚A” NQRµN*;ti!°&DjèÁ£:9XóB+—a¾bD”ü”dæ³}ÞÝ[óBK—‘+n|•¥"sÂOLé ´™”[´$÷ÞXûµ\*&=Ú=Ûù9_ v½: ±è—8TÞ»‹ÿÝÍÉÊÊÖ¢¥÷,¹{'âx”:pÐÕ䔊…—Ÿ2 }­~É?û”(úü|@há4ìŸë_‹G©^*CnVdæ‹ýSÜ\¬,„–­Ü'ìÍ(÷‹Tù¥ªj«j¨mp’™×,ä©ý–V–¥ÝsÍåÐw‘O®Ìй±`Ö‰8™Ü”TÖ£%“÷åý÷YÄ󀥂ûó&ï~/*?êØL7¯ d­ï_Y"rÓqÛ·Þ¼yñæEDÐò sc^|6½ïnÔÛÓcð“>¾þ©$vúÐIW] ‹xýîéöNêrˉ9Q˜Û›a×–Ø«Zv±V#*ž’›R}m»^É?û’»½—‡6_õàõóû«­ƒæOÝÿIZýU†Ü¬ Â7ÿ½ã›ûÎÇoß<=à‘µÛgí+QÕ¥ªj«ê¨]p’©wV.|ÙaVOƒÂŸãà§ûôoiÌÁqžyçžxjl†LnÊ‚w×Ch&÷³Ô`°;M™ç˜xöÜ1ÆÒ2ï´ìü~oa©ß\Yñ9*¦ 49,‹Åb1q €¦ÙfÚª½šjÐéjV=z ˆ¸¨Tˆ"öùE9¯øghs]&Vü{vy{Çp«sî@L3ï> Øò /7%ú®cý’{ö%±þ—¿YyOp2`³ œÇN~>s%FRíUšü¬Èü´UËæj8MÕÜÁJ]’žKTY*¨j«jo-Þ#"é†ïòOžë¼…ôòû#rcvìzgîÙß‚-7%)- h¬¢Zޱt Ù©QIbÀõÚ¸·7fbT©A%QV~úµ±NmÇá OGå–éURÙ‘?smÛ1¤ßBB2ôM^-swqjÞºû°׿Hª('·Ÿ“ºMèPj°Ór…¯$%Rß¾Ÿ}É··)¼&x4¯‘¥zòËø‚ÚÔ(Ÿ•Šýd/£>ów]¿µoþ|ÿFf´ä|ßK5ØJ¡šW8Ù×s 6¤_;QÈÁJÏ’u׫¹Ð¢yÏ)÷̦,nÅ‘Ÿ’ݤ³uþÃ_%‘ùæô–«)^þV„c¿ä棗/^¼ :çÓ8d±×â‡Ù%û#RWùYϞᨆÉ2âÓ >Kûî¾ýðÉÕEMøN9úY¦¨œ…wi[°á¨‘Å£·U,¼¢”ˆ(söEùC…YT‘i,.ƒÈÏ•È}:PiY±Ìz ë‚Ýß³jñÿîp=Æ÷â+¨ ¥KPÝ­*QÓà”Æ_¸U:ný(óò³¨wÚÿ"âCDе¹¦W¼<‡¤’—×ë±nKÿÜmƒÚ´ê4p[ª½†¶‰º¢î"§©ÊÄWkÒóo‡¼ ›Ñ…óÁÿµ(²×ÖMF8pÿçdĦ1t[ ö0Œ¾õ2옂rä½s04ñë W»ÿޤF‚Oë–§V^Ýïi@Œ¡aÞqøˆ&×Ý dÝW²ÝÔ½í¦¼]çvÎv¨Y5p dÆä1idÆãµ#g…8­?2ÝAÀгÐ#o$å‘ J d"F}9w041A~9‰ä;Û®`î\ÊuT¿þ^œØQÈP”©/Ï>ËÄÎ0÷Al.ÙœC2/&*KÛ¶:C‚Ö(n£Á;zJ)Œ¡¦‘]1+òí®@è´ßÍŒƒ§Íèyn§‡‰š¿åûVº¸œR‰Þž¯°ÕßöíjÔµ­ap²øÞ§ï—¶+²¸ccG<·ý/Ô à,¹—Vtäà[¶ýøö3&ßW>¥k#]ER “¦¿½²aÎqÞ°Žò‚éawÂÙö-zÌüè[~[Þèu_`ÎÈ|²n䌭֜î "‹e€Ñ™L“¿† ý6¯¹Úr•›AJÀž³i6ÓûÎí0`š¼½H>žÜý¼ÁÈå6…ý 2ómÐ[¼\á l+—©g¤Ü³ßÀµã}»ö=v™ÕBìx­×kac¹ãíÉ­Q*\¶JÉ`cr²Re4Õ˺êÿ2Ͷ­6•üüJP–Qo#.W[ƒ[i©ôälUõ(€eÕ´·FçéêG¿¬@³4 ´eïï\1;ôsŽ h<“fÝçí›ßQG•ªåSjq0QèB·ag)Ža³žcÔTÑUŽÈÞ¶læ«äÀÔÌœlØ7Ö•~qËÞ¨lˆšä|¸(•fÿ£V6¸eSÒüîvóELCÇë6õ5Ñ ƒ†œ½•õtçÑ4§å½JÆd“¥T,¼rR"õŠJ¿'ÿìØúOÜŒ¹ÎÂtRݲ¯ßdKQ §F•­|ôF³bÀ(¿¥‰ ævµJÛÀ¡ßò]^üR£°*(ÕŠÊ·ª4À‚(4À‚(6‡t¿ôÔcCúÇæðîÞ¾Zn!j9¤ž•D¦•µ]éå(8¤>•ŽL]½Ò«P·AêMéÈ444á©–™ÄµœR?ÊE&Øå 'J'@-'‚ÔƒŠ‘‰!HýS™è‚Ô§J"=BzSId¢BRo*Lô@AêG•‘‰!H=¨fd¢BòKU?2544Koˆ‚A~"]ÃÀ€k`em§««Çå©)ú³\dB¹{ÎÂß’!òã…ÖàO@-'‚(-:¤¤¦µ²iRß%A¤HJj`ÐÆ}L}A2_>ð,½GÐ *IEND®B`‚stoken-dev-stoken-bc25aa4/misc/screenshot-1.png000066400000000000000000000157641440242403300215420ustar00rootroot00000000000000‰PNG  IHDR¨„‹G÷®»IDATxœíw\GǟݽÞ8:éE ˆÅбÄX“X£±÷^ÐhL°Äc‹KìboQ¬ˆJ^Žrýv÷ýãîr–3¾Ùý~î½aö™gç7m瘠u¯á@C nŸÜ hß\Ó¦–bAþm¯hLA’Å%R›síð&¤u¯áþ./3§ ÉÛ·ÿ-=cã“›8Ù½µ…Ô¬¼÷hEg‰µR!OŒGÀÖÚ*§ „VÝDïÀû5BdNA‰“ÄP`1jöÃçÍ[£Q«ÊJ 5jUƒµPk´‚€NxäcéÚIR]X™Pš/Í+Æ?Î/-ψ/Í-m¼wä;|ŒQ«UÅ9AÞÎ%¹•åR]`e¹´øeZ·sqN†Z­2j¤:ŒwÊ…Æ‚ã9òR©–„Ácš9ð…œ:qHR]ˆó[¯Ü1 •&‹ß9"âq™¦Q ,3jjIµ2÷™B]#Œaã'äa5‚ðÒJ¹×Ö³«|žmî5'·3ÿWjŒRVÒ|â¨!½Ã:Íþi.P!-øuát' ðày6“Å~½‘ <ޗ娇›;¤­‡”…Ï/ÚùÛm%³¶ö¸¶TnYíh0‹A-#<¡I’3—­Ž\4ÝÉÁ²ròf.[ÍÛð„fIñu-(I’ pY‰¯Døâ’8g¶pâñ +†ó9\Œ`¡&©â j/{‹i¬1šœ„ §þcF·3P3G¡PºÏˆÜÁ©âfôõ'߯çN`«-y{·ŠÎíÚv0Sf?OW/ŽîرåJܵ$ˆ½üÌk!^óÜ-Q±·Ÿ ¨âïäjª2+ºæ÷·Šm› ŸÜÍQV¡Kßcè¸Aª´”|¹Àoú¢ím^üãàe­ßÀ¹?t$sÔú1$Æ0³c³ªºl  m“ZN~-’Vå©Ðï›åC\ð§ûfý™¥`zL3XnDžÔ[ãI×(*ù\”ÏCÌ…fÏ2X-‰;lR•‘â+W©E™€ Š’JÁp­ÆÏÃÕ’‡11T­©maZ²¥—ç¯qüer»AóÖt¿`NäÙtïoÚð ä솅›ÓøñÖ'¦ûô8týÑÀ~mDE7Ï]½+p$îÞy&ëåÏʺ|öZáÿ“A¶qq5/lf]yÿÌ“Àð Wqr°ÈôëiÓÌ2ãàòÉZœÄ$dh›ì]¬MºÎÙí9£ÖÝ3øM'¶åCáÉ}»ÎdpËšw™îÛÍ.¤,£½¸º”å=°¶“í¬¦û¨™Ýìe±K–_È`×ÎU–ï3=5áÑð&A Þ«¦r©BZðË‚©N»¬œ<p’Øý²`ꬥ«€/7h¡^áq\++/ÅT((¥%R‡B»ƒ‰ÝQ” k~‡ËIôdY‚(8–r ÓE[ªP©5õtü&´/½¿kØÐK}ÇOú±õÀŸ¿{þC’  ,·œàñäEE2‘ƒ²*¯0J¾1³™|NÅÓû/ÀÛ=(ðSFNÔãXë/¶rcAÖ½ÇÉðIƒZ¹Øð˜(@ ¯î~—¤°ã‹¤l 1Àº×Òó½ô‰Y€Æ„'pŽØˆ“úÒ½[GÈ+È–³P®¦ºåºM½Çkç-ÇDýQ+°ë€Quc5Bhµ•%ù‘‹¦¹8J^dç̈X¿.œæâ(Y¹`êô%‘“ÅxëQ=†19q¹¬¼´°BvùêWá–|¾’ÃQ·l™ÂÄP6“L@˜(Æd°Q&Kª!ÕÚº~“€ã”(Ë48+-jÃþÏZóópdýSªKD¨¼˜keÅÈ)áHí[IR7É P©Dˆ2ñ^1ôkÚ4@T—œý¤I¥¹_ó`(<‘PJ‹öc¦vr-½²å‡CÅÎdSÝA Š¡ÊÒr5@ÅÅ‹Ïåky¹ˆË«'0LUlÌIÝ_5éÇò»´ Ÿß÷ƈ#Õ-°jY"p¢va¤†Y7¦Q#eÒ¶!Í]%é™/gD¬b‹¬`ÚâÈ_NssvhòÉÄ ¡˜YŸ)õ  (WhÆá Y\~öÓç.œéئØÌLPTZs-¾¨¸´*" Àá‹Ì½´híg¢2Sðù’Ã}ɸǙr«f~ÅIé/Ÿä_«hѵû¤åŒ$î§>¼Œ¹^D Õ(%+ *,‚Fœ|k×ß™7“”ýBCœµO¶åTf?ÊÏ[¸‚âRlÎBPªJϽE¨@Ý dYªŸÅ\­êÒþ‹yמ«øŽ.œ›»ÏåsùÆŸi©JŽ©ë¤<ÒÎo\›W浤ßÀq__[°¯šå73k™Ò¾Sßu­ÓèŸlîå[÷’¼zë.WlËæ 'ˆ)‹~iß:øê?÷E6N¯1¥ãõ¯Ç‚b<¡¹“op¡’±ûä…ÍQçc¤+ys€áã/pòg[»i£e¶@žr÷A¥ephhoH¾²sæ>)“—½zÑž+YüV]ÚhSŽGFî/³­QD[¨Šþóï9·i—ŽÁbAê?éäŧ(ÙIù@¤_M–ЪøÆÁci »ðIK{agOçÔžYA0!——µjÞö³é⮃‡Mj­®Ô H˜ú{Q>[ÇIé«éB“±cÓ­ p9åsÍó*Ëu³@­ÕâQýãäÝÔè§V´êÍ{u#(ƒ)°v¼—"°qfó…º@6OÈ·t¸—"°vDL£Fj®)xZ)ÇØö^<6 `ÌIü•Mg–”Û^do…,W 𸛂¡(—Ãb`˜‘2öº'åJ•F‹¿G#ºÀ–žçÎÇ4Rxš·ÁËURV!Ï/–¾µ;+±HÀ{w#b!ÿiúKÝWðf®ž¢¤gç{¹Hœí­Þîg0’$+dŠÔ¬¼w7’ž_+œÞ„h´xbjÖ»Ûy/Fjaòß½h>Nhá)J¦þ·)}þ-?h>“ÖüUuM×xŠB OQhá) -p_aÍ@©NŽp¥ÿ­ë#æÅá6]tíñBõ³õÝûß³÷k; ÅÞyUù{å#Ùòã#â=4õ(†a†1Pc00 Ã0DýÓ°.^þͺY“­®u“*uÏ÷A¡3Îæã ~³lp'?/ﶃ#νT€âñ¢Ï>Ÿ¼aÅ÷½Â;~Ú*$|öá ýÖ.ê¬èŸ¾íèåïáÛ¦ïšD@=i‘• {&„…xx5 ùrî_Y¯6ù1’õ0M¯~¾eôÜ+>‹.$$$ý½8àúÜ‘[ž¶äA„”Þúuô:õ˜mÝm1Фí;ç²÷âË ®E4‰ž9u¦@{îŠÝì¨SWnž]êreÙÏÿ”‘êç[ÆÌŽ–L:~ïaüµ½Ë4áÔ—–"aíøÈç6Æ&=¼¼2(ùr¾Þú’£&^qþX¦çèmlYÓ¦õˆÑÞ™ÇN§é2e±rOžzãÓÈõ#}¸€&ãü‘T÷£BmYLÛ¶_‡‰Ÿž¼SŒ`ƒÂ=¹ æmµÙRÔÑÇ_xŽÖDÄâZ»ûJ8šzÒReü}¡Ðgä·-,0TàÓ{Lg¡®ó©?9jñ}üÑÃûk…ôí?ÈhL\š[YØòu¥ åY[³Ê_–âQ³d->Óíù:%´¥Y¥š'‹»†,G€Ð(/©œ` Í9z(B8 €KsÊV!Ú`ZxEA%ÃÒŽ™Ù ¯K3ö€ÿ_t ë) ùÍwõ)] Lì`†§çË „¼°P- cÉZö׌”ñßNý£ýáñ~\ÀÄ3NТ˻{YV‚)@Ý¥#¨ÈF M3X~]Z˜À†g)táxea¥VßXroòt-bsKiiq##›¤©g¹õèß$uÛÎ;EZ/¹¿{ÛS‡ðúChi4~å÷ÄÎIëãd$°\»÷q~ºaÃÅ´ -®”f&„ðxÙ³s¿/Ù§kŸ¿‡—¿‡—¿GõI*£q‰ÒË3[èâxµ}¿Æ¿¼“Šìë»—éÓ¥¹¿‡—¿×']úNX}<±¼ž•oª§æwÖ›êôS‚²aG5wö.ÞÞßËßëip—aÓ6^LW¼æˆÞ×y  Î¹¶mÆ ° /ï–=¿[õ ´Ž³xIÜáÈûuûÄÇßÃËßó“Î_ŽY¾7¶°ÎY­ïSo^€\Y5fâŸñµ²½B¦5–Ÿdù½ÕóÏ;o‰¨LØ?c슿«©CÈr⢷ÇEŸ¾¾öÀ/=lk,ÈÇ‹o¬ðÃïqPÛ´âùŽ1ƒWÜ–W™({qÿÄo÷Oœ´mVFjHýÞ€2yר>Ëc«Ê.M»±/âFLìªÃ+¿”²]5ñ›y—ªÎVR–—xy_âå¿ÎÏ9°í{ONm³ï “Öx²<ö×oF¿RaáèéçàíêhÃÃŒìU ¼yÁºáò¸_ÇÔP½ù'æ,‰.|µ ЬLÚýcïïÞDueâÆ‰¯TG…æUP¦íŸ0ûT®‘V¥~oÔ)N®¦:»êÎÂó³gËÖ[#rO,XhPãÞ:¬Û§<Ý7Åíó¢L¹~Û”Â+¯›±Gwà¦eû·FßI¼}îø¡ã§Î\9:ѯΡ·ªg»foÏ6nŠ×lʪ!΀º|1cSôݸä'×£¦4×N©¸¾çv©Nyuöùù}ûG\*y#OÉò»[öêOzâ~:ïÜÃîÞ¿}dR€®Q\[·3©v)z· ´m÷3Ý%ê?åè„ø;Ǧøë×iÇnÞõDgM–tþ‘¾ xN>qrû†õÛNŸ˜å¯7ò$:±â½œ=oÓ O_Ùt €4'jó¸Nn‚×m¢ÉØ7ws2plµo¨¸õ´?×Í^wö¯µ£:41c ‹àÁ#[é-ùi%ZÀ_ž6#*à†Œ_ð…Eã|U½¸ùP_Û-zNúÊ“‹*l>bá·öºÀ¼SGžÕèÀ_ï­"ùô5} ›<,P€ ‚À¡SzˆtaùѧSUjXÌvöµe0¬}ܺ0y»“æ‡É„'Ëï¹£0ï=­kgã/-‰Œ'ЦÃz8Ãr ÚÃS•¤ºRnh¹"˜C¿3Z0\z¯:ùûho¬‘;àe9† ±¬¼m í2Ç¥¿^ÖÂGIÕ†e x‹—%Çé¯=;zé; ¾wg/½ï¹±‰%8p=;ûê‚T·÷ǼÔàW6óíêߨÅîoÉ„WfÜLÒ0ü:I2DŒø<ÈßÃËß§U¯áËŽÆ—ÕX™ŒD/Y«ëþÓÂ̧Q{æ‰þÚ¶Mˆµ®ò³Ý‡l:ðÇé¿–~éÂ&µÊFŽQß ¶¼ÈpT8™ÂÐËJ³¥†Ë½Õ&è/…Îö<}#<{7s}pÁ³|5`’ž3¿sÙÕ™_ ™<ãÛ“cÊßöw4áR¦žTä<וz>y~ÂÀÙ{ogThKS¯í^øÕ7«ïUõ_DéÕ•Ë.É@¾d|0KÕ˜! YqãÊ뺮 ønÈ«UبEÓ6>º-3Hcç´ƒ%ñ—è/³|TFQrk몛_´j ÙXo y©a”È3çUå0Ê·ÔÜ ¢°’@ŸÌÚ³á;€<áô‰‡R`yö‰ˆÚ?!€gʽºL%›?÷3 ˆ†÷)À £OÝ“«ûÒdÜÒ¯]Þíµ³ëÐÇ0¦ÊÝ÷}»®_÷ëÕùÓïw§WÅ`ñt\7Æ[R­0´4(ãÕÛ ‚1 5X«ÒŠ$Â6wi"©!1Wh&â1L¼C›É„×È_5³6_mº~ùìᨘ«ûǸêÃRO^ÈÔÈã7Î=T¬¹ ÃlÓ¶‘×™xJ7nç´^ðÛ8ÿw~Ýe8X:Îߺ<3ñÑÓmuA"[ÖXoÓ­„¯jtH\cè˜\€çž™>xÉÉ 8î!¾B€²;'÷ê»âV‰)÷d2•ðƪʖÀ‰:Û2ø=ÀCš÷$W­zº}Áöl@›N[Üס1²+S÷M¶ù™®žyŽØ²a°[÷ñ—0vÿ‰•£:yY2ØöÍû/Ú¿½S7Ò⹸™cõXš6y‰¼ªE ä%5{¼àôüg Ïïv]>~àXÌÑ9¡"âù®I³ÏšNzSÍÜaf1@°,CùBù–†™µL]ùhËNÝiöÄã_ø®¨eCzd`‹#`=ôÈùEMuuZ›{fÁàˆtoV®ƒ7ï"~oEå{…ÏÚ>ëUˆ2~ÅCxµsãÈëí[/[€|€Š¬\9<HE^†a–ÏÆÓšDÑ=×u×¶ÃVLµÄD;‹ÜÜcØ‘ù¥mrÚh„g²Ïwo騿N¹ò\¦¿Ôä?3 xEö"oÔ@NQzó—¡SÎꆌŽý×ïŸßÞÒ”§ây1¿Ì@šõkc’õûµ2ŒS¯§è«¹<ù’¾±Ÿ·%š’ üŸµá­ø†ºê¯ R‹M6eo²¹z–[xo·ëÓ@zü§}þœÞZ¬Í8ý[”~HÆ lç.y¶È•Öz“ò—‰iúšÁsñu7wtᣤ,aëÈQû2À¦×ªƒK:5j@ðvêü{‡ž½üŠ@Üs\˜= ÊF{Ëvû¢›Ý;ó üÜú¨Ñ͆{‘O÷¯=¥Ÿœ¶ïéÍÀ…6"€—ÏŽ]Ìî=Й Ú¼Ë%é­›;›70ÿñö˜îG¦ûÀÉ=vO:[© ÝkÆW”j>ØôÛÖ‚ËŸº#jjÍÛÔÏ×u ÿ= @Üãç=?s€,»6ÿûõq† WprZèÉi5nãwÞy}];ÁÛ»«}±oø¨ƒef"&^Q‘šSµµºeøòYmÄ7 ‘ހﰱ­ö.º£Ð>ZѳÕ:>)“:û&CÇ ³k÷UÀФÐÄ. ÿüD‡Oì‘üøëw3u»ë2[íܨaÏ[a¹z̪SÄÆÑ†¢UMufÓ×Lâ×sŸYNjÙkc¨5ï¸YIÈó3Òã=Jx¥:êÖgõ¡¥]­ß8—0‡¯"în£ÿ†¿R2{íoÝp”á2è—yíõó¸øË—NŸ¹hP$½—G6n¸ûv˜ôgYTÜrbÔß-voØvøâƒ4©03·Ÿõ9öÛöŽœl'qãðPݼ ÏÆ³i«.} ojõ–9„Ù÷üåŒCðÚuûÎÜN—€ƒ>ï7nÒ°¯ÞB8ƒþ¸Øìäö]‡¢o?N/QÇÊ+¨}¯!Çuv3é½ÏÝzŸ;š†¡…§(´ð…ž¢ÐÂSZxŠB OQÞÿÎäÈÃïÝfuNý¾È¤ö?NR“Ÿ4éM k Section: utils Priority: optional Standards-Version: 3.9.8 Build-Depends: debhelper (>= 9), libgtk-3-dev, libtomcrypt-dev (>= 1.17), libxml2-dev (>= 2.7.8), dh-autoreconf Homepage: http://stoken.sf.net/ Package: stoken Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libstoken1 (= ${binary:Version}) Description: Software Token for cryptographic authentication stoken is a software token which generates one-time passwords compatible with RSA SecurID 128-bit (AES) tokens. SecurID tokens are commonly used to authenticate end users to protected network resources and VPNs, as OTPs provide greater resistance to many attacks associated with static passwords. . stoken aims to provide a Linux-friendly, free software alternative to the proprietary RSA SecurID Software Authenticators. . This package contains standalone command-line and GTK+ GUI programs that allow for importing token seeds, generating tokencodes, and various utility/testing functions. Package: libstoken1 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Breaks: stoken (<< 0.5) Description: Software Token for cryptographic authentication - shared library stoken is a software token which generates one-time passwords compatible with RSA SecurID 128-bit (AES) tokens. SecurID tokens are commonly used to authenticate end users to protected network resources and VPNs, as OTPs provide greater resistance to many attacks associated with static passwords. . stoken aims to provide a Linux-friendly, free software alternative to the proprietary RSA SecurID Software Authenticators. . This package provides a shared library allowing other applications, such as VPN clients and web browsers, to generate tokencodes. This can improve both ease of use and security, as the user does not need to copy and paste tokencodes between applications. Package: libstoken-dev Section: libdevel Architecture: any Multi-Arch: same Depends: ${misc:Depends}, libstoken1 (= ${binary:Version}), libtomcrypt-dev (>= 1.17) Description: Software Token for cryptographic authentication - development files stoken is a software token which generates one-time passwords compatible with RSA SecurID 128-bit (AES) tokens. SecurID tokens are commonly used to authenticate end users to protected network resources and VPNs, as OTPs provide greater resistance to many attacks associated with static passwords. . stoken aims to provide a Linux-friendly, free software alternative to the proprietary RSA SecurID Software Authenticators. . This package provides the headers and static libraries for libstoken. stoken-dev-stoken-bc25aa4/ppa/copyright000066400000000000000000000050301440242403300202620ustar00rootroot00000000000000Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: stoken Upstream-Contact: Kevin Cernekee Source: http://stoken.sf.net/ Files: * Copyright: 2012-2013 Kevin Cernekee License: LGPL-2.1+ 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 systems, the complete text of the GNU Lesser General Public License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. Files: java/* Copyright: 2014 Kevin Cernekee License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. stoken-dev-stoken-bc25aa4/ppa/libstoken-dev.install000066400000000000000000000001151440242403300224640ustar00rootroot00000000000000usr/lib/*/libstoken.so usr/lib/*/libstoken.a usr/lib/*/pkgconfig usr/include stoken-dev-stoken-bc25aa4/ppa/libstoken1.install000066400000000000000000000000311440242403300217660ustar00rootroot00000000000000usr/lib/*/libstoken.so.* stoken-dev-stoken-bc25aa4/ppa/libstoken1.symbols000066400000000000000000000033731440242403300220240ustar00rootroot00000000000000libstoken.so.1 libstoken1 #MINVER# STOKEN_1.0@STOKEN_1.0 0.1 STOKEN_1.1@STOKEN_1.1 0.5 STOKEN_1.2@STOKEN_1.2 0.6 STOKEN_1.3@STOKEN_1.3 0.8 STOKEN_PRIVATE@STOKEN_PRIVATE 0.1 __stoken_parse_and_decode_token@STOKEN_PRIVATE 0.1 __stoken_read_rcfile@STOKEN_PRIVATE 0.1 __stoken_write_rcfile@STOKEN_PRIVATE 0.1 __stoken_zap_rcfile_data@STOKEN_PRIVATE 0.1 sdtid_decode@STOKEN_PRIVATE 0.5 sdtid_decrypt@STOKEN_PRIVATE 0.5 sdtid_export@STOKEN_PRIVATE 0.5 sdtid_free@STOKEN_PRIVATE 0.5 sdtid_issue@STOKEN_PRIVATE 0.5 securid_check_devid@STOKEN_PRIVATE 0.8 securid_check_exp@STOKEN_PRIVATE 0.1 securid_compute_tokencode@STOKEN_PRIVATE 0.1 securid_decode_token@STOKEN_PRIVATE 0.1 securid_decrypt_pin@STOKEN_PRIVATE 0.1 securid_decrypt_seed@STOKEN_PRIVATE 0.1 securid_devid_required@STOKEN_PRIVATE 0.1 securid_encode_token@STOKEN_PRIVATE 0.1 securid_encrypt_pin@STOKEN_PRIVATE 0.1 securid_pass_required@STOKEN_PRIVATE 0.1 securid_pin_format_ok@STOKEN_PRIVATE 0.1 securid_pin_required@STOKEN_PRIVATE 0.1 securid_random_token@STOKEN_PRIVATE 0.1 securid_token_info@STOKEN_PRIVATE 0.1 securid_token_interval@STOKEN_PRIVATE 0.6 securid_unix_exp_date@STOKEN_PRIVATE 0.8 stc_standalone_init@STOKEN_PRIVATE 0.8 stoken_get_info@STOKEN_1.2 0.6 stoken_check_devid@STOKEN_1.1 0.5 stoken_check_pin@STOKEN_1.0 0.1 stoken_compute_tokencode@STOKEN_1.0 0.1 stoken_decrypt_seed@STOKEN_1.0 0.1 stoken_destroy@STOKEN_1.0 0.1 stoken_devid_required@STOKEN_1.0 0.1 stoken_encrypt_seed@STOKEN_1.1 0.5 stoken_format_tokencode@STOKEN_1.3 0.8 stoken_get_guid_list@STOKEN_1.3 0.8 stoken_import_rcfile@STOKEN_1.0 0.1 stoken_import_string@STOKEN_1.0 0.1 stoken_new@STOKEN_1.0 0.1 stoken_pass_required@STOKEN_1.0 0.1 stoken_pin_range@STOKEN_1.0 0.1 stoken_pin_required@STOKEN_1.0 0.1 stoken-dev-stoken-bc25aa4/ppa/patches/000077500000000000000000000000001440242403300177605ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/ppa/patches/series000066400000000000000000000000001440242403300211630ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/ppa/rules000077500000000000000000000001411440242403300174050ustar00rootroot00000000000000#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with autoreconf stoken-dev-stoken-bc25aa4/ppa/source/000077500000000000000000000000001440242403300176315ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/ppa/source/format000066400000000000000000000000141440242403300210370ustar00rootroot000000000000003.0 (quilt) stoken-dev-stoken-bc25aa4/ppa/stoken.examples000066400000000000000000000000611440242403300213710ustar00rootroot00000000000000examples/libstoken-test.c examples/sdtid-test.pl stoken-dev-stoken-bc25aa4/ppa/stoken.install000066400000000000000000000001201440242403300212150ustar00rootroot00000000000000usr/bin usr/share/applications usr/share/man usr/share/pixmaps usr/share/stoken stoken-dev-stoken-bc25aa4/ppa/upstream/000077500000000000000000000000001440242403300201715ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/ppa/upstream/signing-key.asc000066400000000000000000000060401440242403300231050ustar00rootroot00000000000000-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.11 (GNU/Linux) mQINBFCn4HsBEADDCbXT3T3hSC4LK4RgbmJfkGBRE/fm5vRQXCh9Yo7dj3a5zPDo lSSf14F3ajoPeikwU3SOYIJeAkoJ0bSfRCh1wKDhMc2X1zajnUnmUftcJ4nTCwiL PmOpmIFujI7N9ECpH8PigyaljUJ4su9AiGwR0Z0czAAmkNA/VhM4k+9MEFmEj+DJ qizY6iGU8Xkqi21GrV2VDLKp1RI7PbryaNLxq4/SjPA1dBqenvGgRtaL4la1Zvoc Nnm8kiNJwoDhVksVvbjRuBPuBNdQ2WsloZWxZDlnP+yZRc0wnk+ZX3bWTx+Ux/yf SBgY6Xx9V+MoOuu5nVeJmtLNJBNYzHK6sR4HNb5O2/XXv46Qem41j7wn9KZHo03N Nc1fnCzNjmudkpnAFNXYzx021VI3xcm0eNBqL6cXpL66bUzf0vQMXqX9pFbqbwLm cIr4NUExH9h1/dqTwFidHStWh6zAXAPANeo1M2aH7HdcG0GIOTAvc+hNQ2Rnd+za HsP7rmRXljYYicU98Zs1MJo9ynFy6HdyOvCWTglJlnXvuRaBoo+i7ThB7K2Z8icY dZbkdAuthBV2K7tTEbYNvdik/0HXavP02R8ZZV8ZLxIM1dSwwuP1bJMqUk4nklhV Xxbpu7NoYN0fVgr9QO2l5BB0O7Es8WPgTf4VTkQx2Ak75VE/RBONF1Xl9wARAQAB tCNLZXZpbiBDZXJuZWtlZSA8Y2VybmVrZWVAZ21haWwuY29tPokCNQQTAQIAHwIb AwIeAQIXgAUCUKfjGAcLCQgHAwIBAxUCAwMWAgEACgkQY7gVmbwLDWVEqg/+Og24 PXsAajRPCncGKfRkvoOKGpgzsf/12aNQXtv9wTo1I9pJQlZMBhuaA/cc6yxwyWqH v89wlZgYKT2eXtCGcCMzZFqc2kNflsCdoFoe/IwTYkB4Bq6g/j9gs1Q3cNzYWSdv MmerGaIuOBBTf30re6keUYzPLcxzpdwYYTJ7ZDlPofmgFHZdVvSAYHWFSpuafHrt tm3WC27DAR5ZiV8zoIrMsVd4WUsnRl8oX4hPNszNCjemBK1QWZwHT+QCy7F1s/y+ 51E1327cR/M0uIoCCI08G1Yc/qfn1CL0A8EBjbk2FnWHWxs2FCInNrCLObGEnQSr fuY9QF5sVk2G3VOybfv6HqQchul1+x7KYL+BUGKTMZI2HpPKsCiQiG/QXqxkvJ2w aulFUWKnEeLt/IWPI5w8LlAiPkfpg3eqafSCa3ikeuulUHBqHinT7+d3vraPJskw aDiB9T+Z1DSQlmOpCsUdLmNsiuGezj42eVBIwMpIrRAAejsArIwPEw6r/NjWmgH1 9GDK/T9tqZlPxlLWi2W6LZZdlz6od6A1i2ans+/1zHxoUHFCPutgBUsboTSW34KU rlg8s3BKkeTtpoGwByoNi0saPIge2tPE5PiJD3Mz2JH0+wsGHVaRijijw7CWuNhx VLOaThZuWAcIC4cobGHBYB768+JjTsMEzOvzFcC5Ag0EUKfgewEQAOpt87+wn1Sn F1SDywXOSzZEl7jrtRYnwQmDBulaOVxUWLyUSAVfJr1JEaAvUB+yUQwO0NIYLw+R KATN9Om3zSDLXBoybTQX2ZZC2fWzEjnW3744kLiSzU5pXeS6dAqbgSHAsmHj+SBN cJY97hPgOQ23f9HN6fPrLDgZfGWg7gsuzXid+3zy1clQ46JoSePNDKVBFSyM0/P5 5wYot4ZgzJ3dUWGbwXLZHiWE64tW0dUkvDGyzAETasmbcia5Puh7Qkeo+rbPNsiR nFDkvw0XbcV+ofyNSiKfvbLeA9GE99QEDlttSwKgX3n07WqWN+4JoHYoTjtJfL6v esylBLbMDJdTMDR0WWFKn1WCh6rYKXylmvGACbSg+4QuVyg0KaenOHpNIbCIYU5Y l5HpwFClNanzAKTSH1/FmB/EAOSTBWJAT8ZhJ5cebtBpcFMGyy25/iRx7Sb2dAwA vIxtQu340Tf0dMLKdDJGj174DiAQ/6hFvniU1xta0rax32wNdG/L2bgkqOlCZkzF GckavV5GgBGP8Xy5Jfw/f8qwvaqpbLBuLPUi2o8vOA1mX0qkar2c7zKZximBT3EO 6QajQNQob0rkFpAIlwxJ7e5sku/6lOoTaLPEtJ4OhXcGkjhGhcr5K2WoBHWHfUKE a5RdHZMMR5sZCPyxmDymP6MFshZcFmMFABEBAAGJAh8EGAECAAkCGwwFAlCn4g8A CgkQY7gVmbwLDWXWZQ//WmWGPq/8qMjTyidQSqs5x+gA/bSDAsenP2SGj9HsDsrN PKFdrnzV75mTYMcS7rwlpnkeRaQGoE9KoCCFciLW4pZIX3tg0kT3wyp2KVy3DPBM ti9A2r/ahRYDStqYeqCD3r88Chflyz0LLOTtRyOnSVH3mDUPOuSlud1JvF1cX4fb 9MYWZApduAMvMa+StYfrtBkToF5Pu5dM3+HERrudw1bzBK+jwRIxxI6jSuZOm+mA P61UPIe7Bqz+lWSoDNH64FW90UYko67NtHZBKo1cQzswLbFtMd3ZVo802DnBcGdN 1QH+CQ7VHifDejEduBRbw20Uihx6VjSazQ2jirE3AKn2ZCmeWy5bWONUoA/xhv3a HS1wI/DM6kZRfQ+5J3BfJ3oxYsGgAhpD1EWXj2AncI5Q5jD+Sm59f+3U1bRDa2Ib oG7BCHWsIFChD0oukJShzR9r24Nly0xZef1q2I1u8KRzDOoKBTtwlNe2xvD27ZIP iA8CFuGkPs8nWUfOHDJSQvmHubP5E4XxG2jnE5TsO8XSpFWrbpIZlvaZtCCzvQdl 1LYmBtcag1rnsi86tmmq/TLSt4tg5uKLGsSW4mlelaN37nDCLXazo2trIC3Ecf3H 7QA8LGnbyPT+lbLgoe7MnbCcmAKCqjP0tyvxXmVAITkFFCA/hJPwr331t+AVyZg= =wLVU -----END PGP PUBLIC KEY BLOCK----- stoken-dev-stoken-bc25aa4/ppa/watch000066400000000000000000000001231440242403300173560ustar00rootroot00000000000000version=3 opts=pgpsigurlmangle=s/$/.asc/ http://sf.net/stoken/stoken-(.+)\.tar\.gz stoken-dev-stoken-bc25aa4/release.sh000077500000000000000000000015501440242403300175310ustar00rootroot00000000000000#!/bin/sh gpgkey="BC0B0D65" set -ex # autotools will search .:..:../.. for support files # let's make sure it can't search our repo, so we know it is getting all # required files from the release tarball builddir=tmp.build/a/b/c/d reldir=tmp.build/w/x/y/z repodir=`pwd` rm -rf tmp.build stoken-*.tar.gz stoken-*.tar.gz.asc mkdir -p $reldir git clone . $reldir ( cd $reldir ./autogen.sh ./configure fakeroot make dist ) tarball=$(basename $(ls -1 $reldir/stoken-*.tar.gz)) mv $reldir/$tarball $repodir mkdir -p $builddir ( cd $builddir tar -zxf $repodir/$tarball --strip 1 ./configure --with-gtk make make distclean ./configure --with-gtk --prefix=/ CFLAGS="-Werror" make make install DESTDIR=`pwd`/pfx make clean ) rm -rf tmp.build if gpg --list-secret-keys $gpgkey > /dev/null 2>&1; then gpg --yes --armor --detach-sign --default-key $gpgkey $tarball fi exit 0 stoken-dev-stoken-bc25aa4/src/000077500000000000000000000000001440242403300163405ustar00rootroot00000000000000stoken-dev-stoken-bc25aa4/src/cli.c000066400000000000000000000327101440242403300172560ustar00rootroot00000000000000/* * cli.c - stoken command-line interface * * Copyright 2012 Kevin Cernekee * * 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 */ #include "config.h" #include #include #include #include #include #include #include #include #include #include "common.h" #include "stoken.h" #include "securid.h" #include "sdtid.h" #include "stoken-internal.h" #ifdef _WIN32 static int plat_read_user_input(char *out, int max_len, int hide_chars) { /* TODO: Hide passwords */ char *p; fgets(out, max_len, stdin); p = strchr(out, '\n'); if (p) *p = 0; return 0; } static void terminal_init(void) { } static int fork_and_wait(void) { /* TODO */ die("Subprocess support is not yet implemented on Windows.\n"); return -EINVAL; } #else /* _WIN32 */ #include #include static struct termios oldtio; static void stdin_echo(int enable_echo) { struct termios tio = oldtio; const int fd = 0; if (!enable_echo) { /* ripped from busybox bb_ask() */ tcflush(fd, TCIFLUSH); tio.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL); tcsetattr(fd, TCSANOW, &tio); } else tcsetattr(fd, TCSANOW, &oldtio); } static int plat_read_user_input(char *out, int max_len, int hide_chars) { char *p; int ret = 0; stdin_echo(!hide_chars); fflush(stdout); fflush(stderr); if (fgets(out, max_len, stdin) == NULL) { *out = 0; goto done; } p = strchr(out, '\n'); if (p) *p = 0; ret = strlen(out); done: stdin_echo(1); if (hide_chars && isatty(fileno(stdin))) puts(""); return ret; } static void restore_tio(int sig) { stdin_echo(1); puts(""); exit(1); } static void terminal_init(void) { struct sigaction sa; const int fd = 0; /* restore a sane terminal state if interrupted */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = &restore_tio; sigaction(SIGINT, &sa, NULL); sigaction(SIGTERM, &sa, NULL); sigaction(SIGHUP, &sa, NULL); tcgetattr(fd, &oldtio); } static int fork_and_wait(void) { pid_t child = fork(); if (child < 0) die("can't fork\n"); else if (child == 0) return 0; else if (child > 0) { int rv; wait(&rv); if (!WIFEXITED(rv) || WEXITSTATUS(rv)) exit(1); } return 1; } #endif /* _WIN32 */ static int read_user_input(char *out, int max_len, int hide_chars) { static int first = 1; if (opt_stdin) { if (!first) { prompt("\n"); die("error: --stdin only allows one prompt\n"); } first = 0; return plat_read_user_input(out, max_len, hide_chars); } if (opt_batch) { prompt("\n"); die("error: --batch mode specified but command-line input is requested\n"); } return plat_read_user_input(out, max_len, hide_chars); } static void print_token_info_line(const char *key, const char *value) { /* require --seed to show anything sensitive */ if (strcasestr(key, "seed") && !opt_seed) return; printf("%-24s: %s\n", key, value); } static time_t adjusted_time(struct securid_token *t) { time_t now = time(NULL); long new_time; if (opt_both && opt_use_time) die("error: --use-time and --both are mutually exclusive\n"); if (opt_next && opt_use_time) die("error: --use-time and --next are mutually exclusive\n"); if (opt_next) return now + securid_token_interval(t); if (!opt_use_time) return now; else if (sscanf(opt_use_time, "+%ld", &new_time) == 1) return now + new_time; else if (sscanf(opt_use_time, "-%ld", &new_time) == 1) return now - new_time; else if (sscanf(opt_use_time, "%ld", &new_time) == 1) return new_time; die("error: invalid --use-time argument\n"); return 0; } static void request_devid(struct securid_token *t, char *devid) { int i; if (opt_devid) { if (securid_check_devid(t, opt_devid) == ERR_NONE) { xstrncpy(devid, opt_devid, BUFLEN); return; } warn("warning: --devid parameter is incorrect\n"); } else { const struct stoken_guid *glist = stoken_get_guid_list(); for (i = 0; glist[i].tag != NULL; i++) { if (securid_check_devid(t, glist[i].guid) == ERR_NONE) { prompt("Using class GUID for %s; use --devid to override\n", glist[i].long_name); strncpy(devid, glist[i].guid, BUFLEN); return; } } } prompt("This token is bound to a specific device.\n"); for (i = 0; ; i++) { prompt("Enter device ID from the RSA 'About' screen: "); if (read_user_input(devid, BUFLEN, 0) == 0) continue; if (securid_check_devid(t, devid) == ERR_NONE) return; if (i == 2) die("error: invalid device ID\n"); prompt("Device ID does not match the token.\n"); } } static void request_pass(const char *prompt_msg, struct securid_token *t, char *pass, char *devid) { int i, rc; if (opt_password) { rc = securid_decrypt_seed(t, opt_password, devid); if (rc != ERR_DECRYPT_FAILED && rc != ERR_BAD_PASSWORD) { xstrncpy(pass, opt_password, BUFLEN); return; } warn("warning: --password parameter is incorrect\n"); } for (i = 0; ; i++) { prompt(prompt_msg); if (read_user_input(pass, BUFLEN, 1) == 0) continue; rc = securid_decrypt_seed(t, pass, devid); if (rc == ERR_DECRYPT_FAILED) { if (i == 2) die("error: invalid password\n"); warn("Bad password.\n"); } else break; } } static void request_new_pass(char *pass) { char confirm_pass[BUFLEN]; int len; if (opt_new_password) { len = strlen(opt_new_password); if (len > MAX_PASS) die("error: new password is too long\n"); xstrncpy(pass, opt_new_password, BUFLEN); } else { prompt("Enter new password: "); len = read_user_input(pass, BUFLEN, 1); prompt("Confirm new password: "); read_user_input(confirm_pass, BUFLEN, 1); if (len > MAX_PASS) die("error: new password is too long\n"); if (strcmp(pass, confirm_pass) != 0) die("error: passwords do not match\n"); } } static void request_pin(const char *prompt_msg, char *pin) { int i, rc; if (opt_pin) { rc = securid_pin_format_ok(opt_pin); if (rc == ERR_BAD_LEN) warn("warning: bad --pin argument length, ignoring\n"); else if (rc == ERR_GENERAL) warn("warning: --pin argument is not numeric, ignoring\n"); else { xstrncpy(pin, opt_pin, BUFLEN); return; } } for (i = 0; ; i++) { prompt(prompt_msg); read_user_input(pin, BUFLEN, 1); rc = securid_pin_format_ok(pin); if (rc == ERR_NONE) break; if (i == 2) die("error: invalid PIN\n"); if (rc == ERR_BAD_LEN) warn("PIN must be %d-%d digits. Use '0000' for no PIN.\n", MIN_PIN, MAX_PIN); else warn("PIN can only contain digits.\n"); } } static void unlock_token(struct securid_token *t, int get_pin, char **ret_pass) { char devid[BUFLEN] = { 0 }, pass[BUFLEN] = { 0 }, pin[BUFLEN]; int rc; if (securid_devid_required(t)) request_devid(t, devid); if (securid_pass_required(t)) request_pass("Enter password to decrypt token: ", t, pass, devid); rc = securid_decrypt_seed(t, pass, devid); if (rc != ERR_NONE) die("error: can't decrypt token: %s\n", stoken_errstr[rc]); if (t->enc_pin_str) if (securid_decrypt_pin(t->enc_pin_str, pass, t->pin) != ERR_NONE) warn("warning: can't decrypt PIN\n"); if (ret_pass && strlen(pass)) *ret_pass = xstrdup(pass); /* always allow --pin to override .stokenrc */ if (get_pin && securid_pin_required(t) && (!strlen(t->pin) || opt_pin)) { request_pin("Enter PIN:", pin); xstrncpy(t->pin, pin, MAX_PIN + 1); } } static void print_formatted(const char *buf) { char *formatted; formatted = format_token(buf); puts(formatted); free(formatted); } static void display_qr(const char *filename) { const char *programs[] = { /* * I'd like to include xdg-open here, but it insists on * opening the file in the background, which races with the * temporary file cleanup. */ "display", /* ImageMagick */ "eog", /* Eye of GNOME */ "gwenview", /* KDE viewer */ "ristretto", /* Xfce */ NULL, }; const char **p, *user; if (fork_and_wait() != 0) return; user = getenv("QR_VIEWER"); if (user) { execlp(user, user, filename, NULL); die("unable to execute '%s'\n", user); } for (p = programs; *p; p++) execlp(*p, *p, filename, NULL); die("can't find a suitable image viewer; try setting $QR_VIEWER\n"); } static void __export_qr(const char *filename, const char *token) { if (fork_and_wait() != 0) return; execlp("qrencode", "qrencode", "-l", "H", "-o", filename, token, NULL); die("can't exec qrencode (is it in your PATH?)\n"); } static void export_qr(const char *filename, const char *token) { char *formatted; if (opt_blocks) { warn("warning: --blocks is invalid in QR mode; using --android\n"); opt_android = 1; opt_blocks = 0; } if (!(opt_android || opt_iphone || opt_v3)) opt_android = 1; formatted = format_token(token); if (filename) __export_qr(filename, formatted); else { char fname[64]; int fd; snprintf(fname, sizeof(fname), "%s/XXXXXX.png", getenv("TMPDIR") ? : "/tmp"); fd = mkstemps(fname, 4); if (fd < 0) die("can't create temp file '%s'\n", fname); __export_qr(fname, formatted); display_qr(fname); unlink(fname); } free(formatted); } int main(int argc, char **argv) { char *cmd = parse_cmdline(argc, argv, NOT_GUI); int rc; char buf[BUFLEN], buf_next[BUFLEN]; struct securid_token *t; rc = common_init(cmd); if (rc != ERR_NONE) die("can't initialize: %s\n", stoken_errstr[rc]); if (!strcmp(cmd, "issue")) { rc = sdtid_issue(opt_template, opt_new_password, opt_new_devid); if (rc != ERR_NONE) die("issue: error generating sdtid: %s\n", stoken_errstr[rc]); return 0; } t = current_token; if (!t) die("error: no token present. Use 'stoken import' to add one.\n"); terminal_init(); if (!strcmp(cmd, "tokencode")) { int days_left; unlock_token(t, 1, NULL); days_left = securid_check_exp(t, adjusted_time(t)); if (days_left < 0 && !opt_force) die("error: token has expired; use --force to override\n"); if (opt_both) { opt_next = 0; securid_compute_tokencode(t, adjusted_time(t), buf); opt_next = 1; securid_compute_tokencode(t, adjusted_time(t), buf_next); printf("Current tokencode: %s\n Next tokencode: %s\n", buf, buf_next); } else { securid_compute_tokencode(t, adjusted_time(t), buf); puts(buf); } if (days_left < 14 && !opt_force) warn("warning: token expires in %d day%s\n", days_left, days_left == 1 ? "" : "s"); } else if (!strcmp(cmd, "import")) { char *pass; unlock_token(t, 0, &pass); if (!opt_keep_password) { pass = xmalloc(BUFLEN); request_new_pass(pass); } t->is_smartphone = 0; securid_encode_token(t, pass, opt_new_devid, 2, buf); rc = write_token_and_pin(buf, NULL, pass); if (rc != ERR_NONE) die("rcfile: error writing new token: %s\n", stoken_errstr[rc]); } else if (!strcmp(cmd, "export")) { char *pass; unlock_token(t, 0, &pass); if (opt_new_password) pass = opt_new_password; else if (!opt_keep_password) pass = NULL; if (!opt_sdtid) { t->is_smartphone = opt_iphone || opt_android || opt_v3 || opt_show_qr || opt_qr; securid_encode_token(t, pass, opt_new_devid, opt_v3 ? 3 : 2, buf); if (opt_show_qr || opt_qr) export_qr(opt_show_qr ? NULL : opt_qr, buf); else print_formatted(buf); } else { rc = sdtid_export(opt_template, t, pass, opt_new_devid); if (rc != ERR_NONE) die("export: error writing sdtid: %s\n", stoken_errstr[rc]); } } else if (!strcmp(cmd, "show")) { unlock_token(t, 0, NULL); securid_token_info(t, &print_token_info_line); } else if (!strcmp(cmd, "setpin")) { char *pass = NULL, pin[BUFLEN], confirm_pin[BUFLEN]; int len; if (opt_file || opt_token) die("error: setpin only operates on the rcfile token\n"); unlock_token(t, 0, &pass); if (opt_new_pin) { if (securid_pin_format_ok(opt_new_pin) != ERR_NONE) die("error: invalid --new-pin format\n"); xstrncpy(pin, opt_new_pin, BUFLEN); len = strlen(pin); } else { prompt("Enter new PIN: "); len = read_user_input(pin, BUFLEN, 1); if (len > 0 && securid_pin_format_ok(pin) != ERR_NONE) die("error: PIN must be 4-8 digits\n"); prompt("Confirm new PIN: "); read_user_input(confirm_pin, BUFLEN, 1); if (strcmp(pin, confirm_pin) != 0) die("error: PINs do not match\n"); } securid_encode_token(t, pass, NULL, 2, buf); rc = write_token_and_pin(buf, len ? pin : NULL, pass); free(pass); if (rc != ERR_NONE) die("error: can't set PIN: %s\n", stoken_errstr[rc]); } else if (!strcmp(cmd, "setpass")) { char pass[BUFLEN]; unlock_token(t, 0, NULL); request_new_pass(pass); securid_encode_token(t, pass, NULL, 2, buf); /* just print to stdout if it didn't come from the rcfile */ if (opt_file || opt_token) print_formatted(buf); else { rc = write_token_and_pin(buf, strlen(t->pin) ? t->pin : NULL, strlen(pass) ? pass : NULL); if (rc != ERR_NONE) die("error: can't set password: %s\n", stoken_errstr[rc]); } } else die("error: invalid command '%s'\n", cmd); return 0; } stoken-dev-stoken-bc25aa4/src/common.c000066400000000000000000000306311440242403300177770ustar00rootroot00000000000000/* * common.c - Common functions for stoken and stoken-gui * * Copyright 2012 Kevin Cernekee * * 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 */ #include "config.h" #include #include #include #include #include #include #include #include #ifdef HAVE_MLOCKALL #include #endif #include "common.h" #include "securid.h" #include "stoken.h" #include "stoken-internal.h" /* globals - shared with cli.c or gui.c */ int opt_random, opt_keep_password, opt_blocks, opt_iphone, opt_android, opt_v3, opt_show_qr, opt_seed, opt_sdtid, opt_small, opt_next, opt_both; int opt_debug, opt_version, opt_help, opt_batch, opt_force, opt_stdin; char *opt_rcfile, *opt_file, *opt_token, *opt_devid, *opt_password, *opt_pin, *opt_use_time, *opt_new_password, *opt_new_devid, *opt_new_pin, *opt_template, *opt_qr; struct securid_token *current_token; static int debug_level; static struct stoken_cfg *cfg; void prompt(const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (!opt_stdin) vfprintf(stdout, fmt, ap); va_end(ap); } void warn(const char *fmt, ...) { va_list ap; va_start(ap, fmt); fflush(stdout); vfprintf(stderr, fmt, ap); va_end(ap); } void dbg(const char *fmt, ...) { va_list ap; if (!debug_level) return; va_start(ap, fmt); fflush(stdout); vfprintf(stderr, fmt, ap); va_end(ap); } void die(const char *fmt, ...) { va_list ap; va_start(ap, fmt); fflush(stdout); vfprintf(stderr, fmt, ap); va_end(ap); exit(1); } char *xstrdup(const char *s) { char *ret = strdup(s); if (!ret) die("out of memory\n"); return ret; } char *xconcat(const char *s1, const char *s2) { char *ret = xmalloc(strlen(s1) + strlen(s2) + 1); strcpy(ret, s1); strcat(ret, s2); return ret; } void xstrncpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; } void *xmalloc(size_t size) { void *ret = malloc(size); if (!ret) die("out of memory\n"); return ret; } void *xzalloc(size_t size) { void *ret = xmalloc(size); memset(ret, 0, size); return ret; } enum { OPT_DEVID = 1, OPT_USE_TIME, OPT_NEW_PASSWORD, OPT_NEW_DEVID, OPT_NEW_PIN, OPT_TEMPLATE, OPT_QR, }; static const struct option long_opts[] = { /* global: token sources */ { "rcfile", 1, NULL, 'r' }, { "file", 1, NULL, 'i' }, { "token", 1, NULL, 't' }, { "random", 0, &opt_random, 1, }, /* global: secrets used to decrypt/use a seed */ { "devid", 1, NULL, OPT_DEVID }, { "password", 1, NULL, 'p' }, { "pin", 1, NULL, 'n' }, /* GUI: use smaller window */ { "small", 0, &opt_small, 1 }, /* global: misc/debug */ { "debug", 0, NULL, 'd' }, { "version", 0, NULL, 'v' }, { "force", 0, NULL, 'f' }, { "use-time", 1, NULL, OPT_USE_TIME }, { "help", 0, NULL, 'h' }, /* all remaining options are for CLI only */ #define FINAL_GUI_OPTION "help" { "batch", 0, NULL, 'b' }, /* used for tokencode generation */ { "next", 0, &opt_next, 1 }, { "both", 0, &opt_both, 1 }, /* these are mostly for exporting/issuing tokens */ { "new-password", 1, NULL, OPT_NEW_PASSWORD }, { "new-devid", 1, NULL, OPT_NEW_DEVID }, { "new-pin", 1, NULL, OPT_NEW_PIN }, { "template", 1, NULL, OPT_TEMPLATE }, { "keep-password", 0, &opt_keep_password, 1 }, { "blocks", 0, &opt_blocks, 1 }, { "iphone", 0, &opt_iphone, 1 }, { "android", 0, &opt_android, 1 }, { "v3", 0, &opt_v3, 1 }, { "sdtid", 0, &opt_sdtid, 1 }, { "xml", 0, &opt_sdtid, 1 }, { "qr", 1, NULL, OPT_QR }, { "show-qr", 0, &opt_show_qr, 1 }, { "seed", 0, &opt_seed, 1 }, { "stdin", 0, NULL, 's' }, { NULL, 0, NULL, 0 }, }; static void usage_common(void) { puts("Alternate seed sources:"); puts(""); puts(" --rcfile="); puts(" --token="); puts(" --file="); puts(" --random"); puts(""); puts("See the stoken(1) man page for additional information."); } static void usage_gui(void) { puts("usage: stoken-gui [ ]"); puts(""); usage_common(); exit(1); } static void usage_cli(void) { puts("usage: stoken [ ]"); puts(""); puts("Common operations:"); puts(""); puts(" stoken [ tokencode ] [ --stdin ] [ --next ]"); puts(" stoken import { --token= | --file= } [ --force ]"); puts(" stoken setpass"); puts(" stoken setpin"); puts(""); puts("Options for tokencode"); puts(""); puts(" --stdin Read PIN from STDIN"); puts(" --next Print next tokencode"); puts(" --both Print both current and next tokencode"); puts(" --use-time=