Compare commits

...

5 Commits

Author SHA1 Message Date
b2506fd950 detect current version
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-03 14:19:26 +02:00
8811cff6d1 0.2.12
All checks were successful
continuous-integration/drone/tag Build is passing
2020-08-31 00:04:24 +02:00
99787b614c Merge branch 'pin_source' into master
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2020-08-31 00:00:42 +02:00
ee28f87148 always print the full error message
All checks were successful
continuous-integration/drone/push Build is passing
2020-08-30 17:09:57 +02:00
196356fe3b structopt does not allow for flags to be linked to env atm 2020-08-25 21:47:25 +02:00
5 changed files with 27 additions and 6 deletions

2
Cargo.lock generated
View File

@@ -377,7 +377,7 @@ dependencies = [
[[package]] [[package]]
name = "fido2luks" name = "fido2luks"
version = "0.2.11" version = "0.2.12"
dependencies = [ dependencies = [
"ctap_hmac", "ctap_hmac",
"failure", "failure",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "fido2luks" name = "fido2luks"
version = "0.2.11" version = "0.2.12"
authors = ["shimunn <shimun@shimun.net>"] authors = ["shimunn <shimun@shimun.net>"]
edition = "2018" edition = "2018"

24
PKGBUILD Normal file
View File

@@ -0,0 +1,24 @@
# Maintainer: shimunn <shimun@shimun.net>
pkgname=fido2luks
pkgver=0.2.12
pkgrel=1
makedepends=('rust' 'cargo' 'cryptsetup' 'clang')
depends=('cryptsetup')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc="Decrypt your LUKS partition using a FIDO2 compatible authenticator"
url="https://github.com/shimunn/fido2luks"
license=('MPL-2.0')
pkgver() {
# Use tag version if possible otherwise concat project version and git ref
git describe --exact-match --tags HEAD 2> /dev/null || \
echo "$(cargo pkgid | cut -d':' -f3).$(git describe --always)"
}
build() {
cargo build --release --locked --all-features --target-dir=target
}
package() {
install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin"
}

View File

@@ -75,7 +75,7 @@ pub struct Credentials {
#[derive(Debug, StructOpt)] #[derive(Debug, StructOpt)]
pub struct AuthenticatorParameters { pub struct AuthenticatorParameters {
/// Request a PIN to unlock the authenticator /// Request a PIN to unlock the authenticator
#[structopt(short = "P", long = "pin", env = "FIDO2LUKS_PIN")] #[structopt(short = "P", long = "pin")]
pub pin: bool, pub pin: bool,
/// Location to read PIN from /// Location to read PIN from

View File

@@ -21,10 +21,7 @@ mod util;
fn main() -> Fido2LuksResult<()> { fn main() -> Fido2LuksResult<()> {
match run_cli() { match run_cli() {
Err(e) => { Err(e) => {
#[cfg(debug_assertions)]
eprintln!("{:?}", e); eprintln!("{:?}", e);
#[cfg(not(debug_assertions))]
eprintln!("{}", e);
exit(e.exit_code()) exit(e.exit_code())
} }
_ => exit(0), _ => exit(0),