~ireas/nitrokey-rs

fdb7bac3063e62776bfc13f184cf786da19f42d1 — Robin Krahl 2 years ago 35fd6be
Add license and copyright information

This patch adds license and copyright information to all files to make
nitrokey-rs compliant with the REUSE practices [0].

[0] https://reuse.software/practices/2.0/
M .builds/archlinux-use-system-lib.yaml => .builds/archlinux-use-system-lib.yaml +2 -0
@@ 1,3 1,5 @@
# Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
# SPDX-License-Identifier: MIT
image: archlinux
packages:
  - rust

M .builds/archlinux.yml => .builds/archlinux.yml +2 -0
@@ 1,3 1,5 @@
# Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
# SPDX-License-Identifier: MIT
image: archlinux
packages:
  - rust

M CHANGELOG.md => CHANGELOG.md +5 -0
@@ 1,3 1,8 @@
<!---
Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
SPDX-License-Identifier: MIT
-->

# Unreleased
- Remove the `test-pro` and `test-storage` features.
- Implement `Display` for `Version`.

M Cargo.toml => Cargo.toml +3 -0
@@ 1,3 1,6 @@
# Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
# SPDX-License-Identifier: MIT

[package]
name = "nitrokey"
version = "0.3.4"

M LICENSE => LICENSE +3 -0
@@ 1,3 1,6 @@
Valid-License-Identifier: MIT
License-Text:

The MIT License (MIT)

Copyright (c) 2018 Robin Krahl <robin.krahl@ireas.org>

M README.md => README.md +8 -0
@@ 1,3 1,8 @@
<!---
Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
SPDX-License-Identifier: MIT
-->

# nitrokey-rs

A libnitrokey wrapper for Rust providing access to Nitrokey devices.


@@ 73,6 78,8 @@ mail to [nitrokey-rs-dev@ireas.org][].
This project is licensed under the [MIT License][].  `libnitrokey` is licensed
under the [LGPL-3.0][].

`nitrokey-rs` complies with [version 2.0 of the REUSE practices][reuse].

[Documentation]: https://docs.rs/nitrokey
[Nitrokey udev rules]: https://www.nitrokey.com/documentation/frequently-asked-questions-faq#openpgp-card-not-available
[`libnitrokey`]: https://github.com/nitrokey/libnitrokey


@@ 81,3 88,4 @@ under the [LGPL-3.0][].
[pull request #114]: https://github.com/Nitrokey/libnitrokey/pull/114
[MIT license]: https://opensource.org/licenses/MIT
[LGPL-3.0]: https://opensource.org/licenses/lgpl-3.0.html
[reuse]: https://reuse.software/practices/2.0/

M TODO.md => TODO.md +5 -0
@@ 1,3 1,8 @@
<!---
Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
SPDX-License-Identifier: MIT
-->

- Add support for the currently unsupported commands:
    - `NK_send_startup`
    - `NK_fill_SD_card_with_random_data`

M src/auth.rs => src/auth.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use std::ops::Deref;
use std::os::raw::c_char;
use std::os::raw::c_int;

M src/config.rs => src/config.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use crate::error::{Error, LibraryError};

/// The configuration for a Nitrokey.

M src/device.rs => src/device.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use std::fmt;
use std::marker;


M src/error.rs => src/error.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use std::error;
use std::fmt;
use std::os::raw;

M src/lib.rs => src/lib.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

//! Provides access to a Nitrokey device using the native libnitrokey API.
//!
//! # Usage

M src/otp.rs => src/otp.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use std::ffi::CString;

use nitrokey_sys;

M src/pws.rs => src/pws.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use libc;
use nitrokey_sys;


M src/util.rs => src/util.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use std::ffi::{CStr, CString};
use std::os::raw::{c_char, c_int};


M tests/device.rs => tests/device.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

mod util;

use std::ffi::CStr;

M tests/lib.rs => tests/lib.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

#[test]
fn get_library_version() {
    let version = nitrokey::get_library_version().unwrap();

M tests/otp.rs => tests/otp.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

mod util;

use std::fmt::Debug;

M tests/pws.rs => tests/pws.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

mod util;

use std::ffi::CStr;

M tests/util/mod.rs => tests/util/mod.rs +3 -0
@@ 1,3 1,6 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

pub static ADMIN_PASSWORD: &str = "12345678";
pub static USER_PASSWORD: &str = "123456";