Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
Rename fido_host -> fido2.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Apr 5, 2018
1 parent 7146c60 commit 29831c0
Show file tree
Hide file tree
Showing 48 changed files with 88 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -4,4 +4,4 @@ repos:
hooks:
- id: flake8
- id: double-quote-string-fixer
exclude: '^(fido_host|test)/pyu2f/.*'
exclude: '^(fido2|test)/pyu2f/.*'
2 changes: 1 addition & 1 deletion MANIFEST.in
Expand Up @@ -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/*
23 changes: 12 additions & 11 deletions README.adoc
@@ -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.

Expand All @@ -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:
Expand All @@ -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 changes: 1 addition & 1 deletion debian/changelog
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions debian/control
@@ -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>,
Expand All @@ -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},
Expand All @@ -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},
Expand Down
59 changes: 25 additions & 34 deletions debian/copyright
@@ -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.
.
Expand Down Expand Up @@ -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/.

1 change: 0 additions & 1 deletion debian/python-fido-host.pydist

This file was deleted.

1 change: 1 addition & 0 deletions debian/python-fido2.pydist
@@ -0,0 +1 @@
fido2 python-fido2; PEP386
1 change: 0 additions & 1 deletion debian/python3-fido-host.pydist

This file was deleted.

1 change: 1 addition & 0 deletions debian/python3-fido2.pydist
@@ -0,0 +1 @@
fido2 python-fido2; PEP386
2 changes: 1 addition & 1 deletion debian/rules
@@ -1,6 +1,6 @@
#!/usr/bin/make -f

export PYBUILD_NAME=fido-host
export PYBUILD_NAME=fido2
export PYBUILD_DISABLE=test

%:
Expand Down
12 changes: 6 additions & 6 deletions docker/xenial/Dockerfile
@@ -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
4 changes: 2 additions & 2 deletions examples/credential.py
Expand Up @@ -32,8 +32,8 @@
"""
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


Expand Down
4 changes: 2 additions & 2 deletions examples/get_info.py
Expand Up @@ -32,8 +32,8 @@
"""
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():
Expand Down
4 changes: 2 additions & 2 deletions examples/multi_device.py
Expand Up @@ -32,8 +32,8 @@
"""
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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -34,7 +34,7 @@


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)

Expand All @@ -44,14 +44,14 @@ def get_version():
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'],
Expand Down
2 changes: 1 addition & 1 deletion test/pyu2f/hidtransport_test.py
Expand Up @@ -19,7 +19,7 @@
import six
import mock

from fido_host.pyu2f import hidtransport, errors
from fido2.pyu2f import hidtransport, errors
from . import util

import unittest
Expand Down
2 changes: 1 addition & 1 deletion test/pyu2f/linux_test.py
Expand Up @@ -22,7 +22,7 @@

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
Expand Down
2 changes: 1 addition & 1 deletion test/pyu2f/macos_test.py
Expand Up @@ -18,7 +18,7 @@
import sys
import mock

from fido_host.pyu2f import macos, errors
from fido2.pyu2f import macos, errors


if sys.version_info[:2] < (2, 7):
Expand Down
2 changes: 1 addition & 1 deletion test/pyu2f/util.py
Expand Up @@ -19,7 +19,7 @@
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):
Expand Down
5 changes: 2 additions & 3 deletions test/test_attestation.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/test_cbor.py
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions test/test_client.py
Expand Up @@ -33,12 +33,12 @@
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):
Expand Down
4 changes: 2 additions & 2 deletions test/test_cose.py
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/test_ctap1.py
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions test/test_ctap2.py
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/test_hid.py
Expand Up @@ -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

Expand Down

0 comments on commit 29831c0

Please sign in to comment.