Rename fido_host -> fido2.

This commit is contained in:
Dain Nilsson 2018-04-05 11:03:23 +02:00
parent 7146c609ea
commit 29831c0005
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
48 changed files with 88 additions and 97 deletions

View File

@ -4,4 +4,4 @@ repos:
hooks:
- id: flake8
- id: double-quote-string-fixer
exclude: '^(fido_host|test)/pyu2f/.*'
exclude: '^(fido2|test)/pyu2f/.*'

View File

@ -2,5 +2,5 @@ include COPYING*
include README.adoc
include NEWS
include ChangeLog
include fido_host/public_suffix_list.dat
include fido2/public_suffix_list.dat
include examples/*

View File

@ -1,15 +1,16 @@
== fido-host
image:https://travis-ci.org/Yubico/python-fido-host.svg?branch=master["Travis CI Status", link="https://travis-ci.org/Yubico/python-fido-host"]
image:https://ci.appveyor.com/api/projects/status/8orx9nbdfq52w47s/branch/master?svg=true["Appveyor Status", link="https://ci.appveyor.com/project/Yubico53275/python-fido-host/branch/master"]
== fido2
image:https://travis-ci.org/Yubico/python-fido2.svg?branch=master["Travis CI Status", link="https://travis-ci.org/Yubico/python-fido2"]
image:https://ci.appveyor.com/api/projects/status/8orx9nbdfq52w47s/branch/master?svg=true["Appveyor Status", link="https://ci.appveyor.com/project/Yubico53275/python-fido2/branch/master"]
Provides library functionality for communicating with a FIDO device over USB.
Provides library functionality for communicating with a FIDO device over USB as
well as verifying attestation and assertion signatures.
WARNING: This project is in beta. Expect things to change or break at any time!
This library aims to support the FIDO U2F and FIDO 2.0 protocols for
communicating with a USB authenticator via the Client-to-Authenticator Protocol
(CTAP 1 and 2). In addition to this low-level device access, classes defined in
the `fido_host.client` implement higher level device operations.
the `fido2.client` implement higher level device operations.
For usage, see the `examples/` directory.
@ -20,20 +21,20 @@ See the _COPYING_ file for the full license text.
This project contains source code from pyu2f (https://github.com/google/pyu2f)
which is licensed under the Apache License, version 2.0.
These files are located in `fido_host/pyu2f/` and `test/pyu2f/`.
These files are located in `fido2/pyu2f/` and `test/pyu2f/`.
See http://www.apache.org/licenses/LICENSE-2.0,
or the _COPYING.APLv2_ file for the full license text.
This project also bundles the public suffix list (https://publicsuffix.org)
which is licensed under the Mozilla Public License, version 2.0.
This file is stored as `fido_host/public_suffix_list.dat`.
This file is stored as `fido2/public_suffix_list.dat`.
See https://mozilla.org/MPL/2.0/,
or the _COPYING.MPLv2_ file for the full license text.
=== Installation
fido-host is installable by running the following command:
fido2 is installable by running the following command:
# pip install fido-host
# pip install fido2
Under Linux you will need to add a Udev rule to be able to access the FIDO
device, or run as root. For example, the Udev rule may contain the following:
@ -46,8 +47,8 @@ KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
----
=== Dependencies
fido-host is compatible with CPython 2.7, 3.4 onwards, and is tested on
Windows, MacOS, and Linux.
fido2 is compatible with CPython 2.7, 3.4 onwards, and is tested on Windows,
MacOS, and Linux.
This project depends on Cryptography. For instructions on installing this
dependency, see link:https://cryptography.io/en/latest/installation/.

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
python-fido-host (0.1.1~dev) xenial; urgency=low
python-fido2 (0.3.0~dev) xenial; urgency=low
* Build for ppa

8
debian/control vendored
View File

@ -1,4 +1,4 @@
Source: python-fido-host
Source: python-fido2
Maintainer: Debian Authentication Maintainers <pkg-auth-maintainers@lists.alioth.debian.org>
Uploaders: Dag Heyman <dag@yubico.com>,
Dain Nilsson <dain@yubico.com>,
@ -15,11 +15,11 @@ Build-Depends: debhelper (>= 9),
python-enum34,
python-setuptools,
python3-setuptools
Homepage: https://www.github.com/python-fido-host/
Homepage: https://www.github.com/python-fido2/
X-Python-Version: >= 2.7
X-Python3-Version: >= 3.4
Package: python-fido-host
Package: python-fido2
Architecture: all
Section: python
Depends: ${misc:Depends},
@ -33,7 +33,7 @@ Description: Python library for communicating with a FIDO device
This is the Python 2 version of the package.
Package: python3-fido-host
Package: python3-fido2
Architecture: all
Section: python
Depends: ${misc:Depends},

59
debian/copyright vendored
View File

@ -1,9 +1,9 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: yubikey-manager
Source: https://developers.yubico.com/yubikey-manager
Upstream-Name: python-fido2
Source: https://developers.yubico.com/python-fido2
Files: *
Copyright: Copyright (c) 2016 Yubico AB
Copyright: Copyright (c) 2018 Yubico AB
License: BSD-2-clause
All rights reserved.
.
@ -31,36 +31,27 @@ License: BSD-2-clause
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: ykman/native/libloader.py
Copyright: Copyright (c) 2008 David James
Copyright (c) 2006-2008 Alex Holkner
License: BSD-3-clause
Files: fido2/pyu2f/*
Copyright: Copyright (c) 2016 Google Inc.
License: Apache-2.0
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.
* Neither the name of pyglet nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
.
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.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Files: fido2/public_suffix_list.dat
Copyright: Copyright (c) 2007-16 Mozilla Foundation
License: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

View File

@ -1 +0,0 @@
fido_host python-fido-host; PEP386

1
debian/python-fido2.pydist vendored Normal file
View File

@ -0,0 +1 @@
fido2 python-fido2; PEP386

View File

@ -1 +0,0 @@
fido_host python-fido-host; PEP386

1
debian/python3-fido2.pydist vendored Normal file
View File

@ -0,0 +1 @@
fido2 python-fido2; PEP386

2
debian/rules vendored
View File

@ -1,6 +1,6 @@
#!/usr/bin/make -f
export PYBUILD_NAME=fido-host
export PYBUILD_NAME=fido2
export PYBUILD_DISABLE=test
%:

View File

@ -1,11 +1,11 @@
FROM ubuntu:xenial
RUN mkdir /deb
RUN apt-get -qq update && apt-get -qq upgrade && apt-get install -y git devscripts equivs
COPY debian/control /python-fido-host/debian/control
RUN yes | mk-build-deps -i /python-fido-host/debian/control
COPY debian/control /python-fido2/debian/control
RUN yes | mk-build-deps -i /python-fido2/debian/control
COPY . /python-fido-host
RUN cd /python-fido-host && debuild -us -uc
COPY . /python-fido2
RUN cd /python-fido2 && debuild -us -uc
RUN mv /python-fido-host_* /python3-fido-host_* /deb
RUN tar czf /python-fido-host-debian-packages.tar.gz /deb
RUN mv /python-fido2_* /python3-fido2_* /deb
RUN tar czf /python-fido2-debian-packages.tar.gz /deb

View File

@ -32,8 +32,8 @@ as with U2F devices.
"""
from __future__ import print_function, absolute_import, unicode_literals
from fido_host.hid import CtapHidDevice
from fido_host.client import Fido2Client
from fido2.hid import CtapHidDevice
from fido2.client import Fido2Client
import sys

View File

@ -32,8 +32,8 @@ Connects to each attached FIDO device, and:
"""
from __future__ import print_function, absolute_import, unicode_literals
from fido_host.hid import CtapHidDevice, CAPABILITY
from fido_host.ctap2 import CTAP2
from fido2.hid import CtapHidDevice, CAPABILITY
from fido2.ctap2 import CTAP2
for dev in CtapHidDevice.list_devices():

View File

@ -32,8 +32,8 @@ and the operation is cancelled for the others.
"""
from __future__ import print_function, absolute_import, unicode_literals
from fido_host.hid import CtapHidDevice, STATUS
from fido_host.client import Fido2Client, ClientError
from fido2.hid import CtapHidDevice, STATUS
from fido2.client import Fido2Client, ClientError
from threading import Event, Thread
import sys

View File

@ -34,7 +34,7 @@ VERSION_PATTERN = re.compile(r"(?m)^__version__\s*=\s*['\"](.+)['\"]$")
def get_version():
with open('fido_host/__init__.py', 'r') as f:
with open('fido2/__init__.py', 'r') as f:
match = VERSION_PATTERN.search(f.read())
return match.group(1)
@ -44,14 +44,14 @@ if sys.version_info < (3, 4):
install_requires.append('enum34')
setup(
name='fido-host',
name='fido2',
version=get_version(),
packages=find_packages(),
include_package_data=True,
author='Dain Nilsson',
author_email='dain@yubico.com',
description='Python based FIDO host library',
url='https://github.com/Yubico/python-fido-host',
url='https://github.com/Yubico/python-fido2',
install_requires=install_requires,
test_suite='test',
tests_require=['mock>=1.0.1', 'pyfakefs>=2.4'],

View File

@ -19,7 +19,7 @@ from __future__ import absolute_import
import six
import mock
from fido_host.pyu2f import hidtransport, errors
from fido2.pyu2f import hidtransport, errors
from . import util
import unittest

View File

@ -22,7 +22,7 @@ import mock
import six
from six.moves import builtins
from fido_host.pyu2f import linux
from fido2.pyu2f import linux
try:
from pyfakefs import fake_filesystem # pylint: disable=g-import-not-at-top

View File

@ -18,7 +18,7 @@ import ctypes
import sys
import mock
from fido_host.pyu2f import macos, errors
from fido2.pyu2f import macos, errors
if sys.version_info[:2] < (2, 7):

View File

@ -19,7 +19,7 @@ that implements parts of the U2FHID frame protocol. This makes it easy to tests
of higher level abstractions without having to use mock to mock out low level
framing details.
"""
from fido_host.pyu2f import base, hidtransport
from fido2.pyu2f import base, hidtransport
class UnsupportedCommandError(Exception):

View File

@ -28,9 +28,8 @@
from __future__ import absolute_import, unicode_literals
from fido_host.ctap2 import AuthenticatorData
from fido_host.attestation import (Attestation, FidoU2FAttestation,
PackedAttestation)
from fido2.ctap2 import AuthenticatorData
from fido2.attestation import Attestation, FidoU2FAttestation, PackedAttestation
from binascii import a2b_hex
import unittest

View File

@ -30,7 +30,7 @@
from __future__ import absolute_import, unicode_literals
from fido_host import cbor
from fido2 import cbor
from binascii import a2b_hex, b2a_hex
import unittest

View File

@ -33,12 +33,12 @@ import mock
import unittest
from threading import Event
from binascii import a2b_hex
from fido_host.utils import sha256, websafe_decode
from fido_host.hid import CAPABILITY
from fido_host.ctap import CtapError
from fido_host.ctap1 import ApduError, APDU, RegistrationData, SignatureData
from fido_host.ctap2 import Info, AttestationObject
from fido_host.client import ClientData, U2fClient, ClientError, Fido2Client
from fido2.utils import sha256, websafe_decode
from fido2.hid import CAPABILITY
from fido2.ctap import CtapError
from fido2.ctap1 import ApduError, APDU, RegistrationData, SignatureData
from fido2.ctap2 import Info, AttestationObject
from fido2.client import ClientData, U2fClient, ClientError, Fido2Client
class TestClientData(unittest.TestCase):

View File

@ -28,8 +28,8 @@
from __future__ import absolute_import, unicode_literals
from fido_host import cbor
from fido_host.cose import CoseKey, ES256, RS256, UnsupportedKey
from fido2 import cbor
from fido2.cose import CoseKey, ES256, RS256, UnsupportedKey
from binascii import a2b_hex
import unittest

View File

@ -27,8 +27,8 @@
from __future__ import absolute_import, unicode_literals
from fido_host.ctap1 import CTAP1, ApduError
from fido_host.client import ClientData
from fido2.ctap1 import CTAP1, ApduError
from fido2.client import ClientData
from binascii import a2b_hex
import unittest
import mock

View File

@ -27,11 +27,11 @@
from __future__ import absolute_import, unicode_literals
from fido_host.ctap1 import RegistrationData
from fido_host.ctap2 import (CTAP2, PinProtocolV1, Info, AttestedCredentialData,
AuthenticatorData, AttestationObject,
AssertionResponse)
from fido_host import cbor
from fido2.ctap1 import RegistrationData
from fido2.ctap2 import (CTAP2, PinProtocolV1, Info, AttestedCredentialData,
AuthenticatorData, AttestationObject,
AssertionResponse)
from fido2 import cbor
from binascii import a2b_hex
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import ec

View File

@ -27,8 +27,8 @@
from __future__ import absolute_import, unicode_literals
from fido_host.ctap import CtapError
from fido_host.hid import CtapHidDevice
from fido2.ctap import CtapError
from fido2.hid import CtapHidDevice
import unittest
import mock

View File

@ -29,7 +29,7 @@
from __future__ import absolute_import, unicode_literals
from fido_host.rpid import verify_app_id, verify_rp_id
from fido2.rpid import verify_app_id, verify_rp_id
import unittest

View File

@ -32,7 +32,7 @@ import unittest
from binascii import a2b_hex
from threading import Event
from fido_host.utils import (
from fido2.utils import (
Timeout,
hmac_sha256,
sha256,