# HG changeset patch # User Alessio Caiazza # Date 1269170397 -3600 # Branch stable-0.x.x # Node ID 11b10804629ae7dc8ab3a592ae4edec29fcdb40d # Parent e0a3ab14e4aa7314724aacee8d3d32a3bd67712b release 0.1.2 diff -r e0a3ab14e4aa7314724aacee8d3d32a3bd67712b -r 11b10804629ae7dc8ab3a592ae4edec29fcdb40d CHANGELOG --- a/CHANGELOG Sun Mar 21 12:08:45 2010 +0100 +++ b/CHANGELOG Sun Mar 21 12:19:57 2010 +0100 @@ -1,3 +1,5 @@ +v0.1.2. backported fixes from 1.0.0 + v0.1.1. fixed some bugs in hex decoding. v0.1.0. modhex installed as binary. diff -r e0a3ab14e4aa7314724aacee8d3d32a3bd67712b -r 11b10804629ae7dc8ab3a592ae4edec29fcdb40d Manifest --- a/Manifest Sun Mar 21 12:08:45 2010 +0100 +++ b/Manifest Sun Mar 21 12:19:57 2010 +0100 @@ -13,6 +13,7 @@ ext/libyubikey/ykmodhex.c ext/libyubikey/ykparse.c ext/libyubikey/yubikey.h +lib/exceptions.rb lib/hex.rb lib/yubiruby.rb tests/tc_modhex.rb diff -r e0a3ab14e4aa7314724aacee8d3d32a3bd67712b -r 11b10804629ae7dc8ab3a592ae4edec29fcdb40d YubiRuby.gemspec --- a/YubiRuby.gemspec Sun Mar 21 12:08:45 2010 +0100 +++ b/YubiRuby.gemspec Sun Mar 21 12:19:57 2010 +0100 @@ -2,11 +2,11 @@ Gem::Specification.new do |s| s.name = %q{YubiRuby} - s.version = "0.1.1" + s.version = "0.1.2" s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= s.authors = ["Alessio Caiazza"] - s.date = %q{2010-02-16} + s.date = %q{2010-03-21} s.default_executable = %q{modhex} s.description = %q{Yubikey integration - @@ -42,13 +42,13 @@ s.email = %q{nolith@abisso.org} s.executables = ["modhex"] s.extensions = ["ext/libyubikey/extconf.rb"] - s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "bin/modhex", "ext/libyubikey/extconf.rb", "ext/libyubikey/libyubikey.c", "ext/libyubikey/ykaes.c", "ext/libyubikey/ykcrc.c", "ext/libyubikey/ykhex.c", "ext/libyubikey/ykmodhex.c", "ext/libyubikey/ykparse.c", "ext/libyubikey/yubikey.h", "lib/hex.rb", "lib/yubiruby.rb"] - s.files = ["CHANGELOG", "LICENSE", "Manifest", "README", "Rakefile", "YubiRuby.gemspec", "bin/modhex", "ext/libyubikey/extconf.rb", "ext/libyubikey/libyubikey.c", "ext/libyubikey/ykaes.c", "ext/libyubikey/ykcrc.c", "ext/libyubikey/ykhex.c", "ext/libyubikey/ykmodhex.c", "ext/libyubikey/ykparse.c", "ext/libyubikey/yubikey.h", "lib/hex.rb", "lib/yubiruby.rb", "tests/tc_modhex.rb", "tests/ts_yubiruby.rb"] + s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "bin/modhex", "ext/libyubikey/extconf.rb", "ext/libyubikey/libyubikey.c", "ext/libyubikey/ykaes.c", "ext/libyubikey/ykcrc.c", "ext/libyubikey/ykhex.c", "ext/libyubikey/ykmodhex.c", "ext/libyubikey/ykparse.c", "ext/libyubikey/yubikey.h", "lib/exceptions.rb", "lib/hex.rb", "lib/yubiruby.rb"] + s.files = ["CHANGELOG", "LICENSE", "Manifest", "README", "Rakefile", "YubiRuby.gemspec", "bin/modhex", "ext/libyubikey/extconf.rb", "ext/libyubikey/libyubikey.c", "ext/libyubikey/ykaes.c", "ext/libyubikey/ykcrc.c", "ext/libyubikey/ykhex.c", "ext/libyubikey/ykmodhex.c", "ext/libyubikey/ykparse.c", "ext/libyubikey/yubikey.h", "lib/exceptions.rb", "lib/hex.rb", "lib/yubiruby.rb", "tests/tc_modhex.rb", "tests/ts_yubiruby.rb"] s.homepage = %q{http://bitbucket.org/nolith/yubiruby} s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "YubiRuby", "--main", "README"] s.require_paths = ["lib", "ext"] s.rubyforge_project = %q{yubiruby} - s.rubygems_version = %q{1.3.5} + s.rubygems_version = %q{1.3.6} s.summary = %q{Yubikey integration - Includes Prototypes for low-level Yubikey OTP functions witten by Simon Josefsson . Copyright (c) 2006, 2007, 2008, 2009 Yubico AB All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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.} if s.respond_to? :specification_version then diff -r e0a3ab14e4aa7314724aacee8d3d32a3bd67712b -r 11b10804629ae7dc8ab3a592ae4edec29fcdb40d lib/exceptions.rb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/exceptions.rb Sun Mar 21 12:19:57 2010 +0100 @@ -0,0 +1,52 @@ +# Author:: Alessio Caiazza (mailto:nolith@abisso.org) +# Copyright:: Copyright (c) 2010 Alessio Caiazza +# License:: New BSD License - http://www.opensource.org/licenses/bsd-license.php +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * 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. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "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 COPYRIGHT +# OWNER OR CONTRIBUTORS 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. + + +module YubiRuby + class NoHexEncodedError < Exception + def initialize + super('The string provided isn\'t hex encoded') + end + end + + class NoModHexEncodedError < Exception + def inizialize(msg=nil) + if msg.nil? || msg.empty? + msg = 'The string provided isn\'t modhex encoded' + end + super(msg) + end + end + + class YubikeySessionCounterOverflow < Exception + def initialize + super('Session Counter Overflow') + end + end +end