summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2017-10-14 14:40:29 -0500
committerStuart Stock <stuart@int08h.com>2017-10-14 14:40:29 -0500
commite40e69d0f66b7b90afa26fb89bb43c0b1db96a0e (patch)
tree085906a71580b633a3f1cfc07a8aabce1ea17c14
parent0e2bcfe77a791b66db0a16fe4ac572f7967ca8ee (diff)
downloadroughenough-e40e69d0f66b7b90afa26fb89bb43c0b1db96a0e.zip
Rust 1.21 lands RFC 1414 enabling clean-up of warts in tag.rs; misc README and docstring updates
-rw-r--r--README.md9
-rw-r--r--src/sign.rs2
-rw-r--r--src/tag.rs7
3 files changed, 9 insertions, 9 deletions
diff --git a/README.md b/README.md
index 76c9adb..016aa8a 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
-# Roughenough [![Build Status](https://travis-ci.org/int08h/roughenough.svg?branch=master)](https://travis-ci.org/int08h/roughenough)
+# Roughenough
+
+[![Build Status](https://travis-ci.org/int08h/roughenough.svg?branch=master)](https://travis-ci.org/int08h/roughenough)
+
**Roughenough** is a [Roughtime](https://roughtime.googlesource.com/roughtime) secure time
synchronization server implemented in Rust.
-The server is functionally complete: it parses client requests and generates valid Roughtime responses.
-However rough edges and unimplemented features remain, see [Limitations](#limitations) below.
+The server is bare-bones, but functionally complete: it parses client requests and generates valid Roughtime responses.
+*Rough edges and unimplemented features remain*, see [limitations](#limitations) below.
Contributions are welcome.
## Links
diff --git a/src/sign.rs b/src/sign.rs
index 8490f6c..e53e566 100644
--- a/src/sign.rs
+++ b/src/sign.rs
@@ -15,7 +15,7 @@
//! Ed25519 signing and verification
//!
//! `Ring` does not provide a multi-step (init-update-finish) interface
-//! for Ed25519 signatures. `Verifier` and `Signer` attempt to provide this
+//! for Ed25519 signatures. `Verifier` and `Signer` provide this
//! missing multi-step api.
extern crate ring;
diff --git a/src/tag.rs b/src/tag.rs
index ba7b9bd..3d8e74b 100644
--- a/src/tag.rs
+++ b/src/tag.rs
@@ -36,9 +36,6 @@ pub enum Tag {
PAD,
}
-static PAD_VALUE: [u8; 4] = [b'P', b'A', b'D', 0xff];
-static SIG_VALUE: [u8; 4] = [b'S', b'I', b'G', 0x00];
-
impl Tag {
/// Translates a tag into its on-the-wire representation
pub fn wire_value(&self) -> &'static [u8] {
@@ -50,12 +47,12 @@ impl Tag {
Tag::MIDP => "MIDP".as_bytes(),
Tag::MINT => "MINT".as_bytes(),
Tag::NONC => "NONC".as_bytes(),
- Tag::PAD => PAD_VALUE.as_ref(),
+ Tag::PAD => [b'P', b'A', b'D', 0xff].as_ref(),
Tag::PATH => "PATH".as_bytes(),
Tag::PUBK => "PUBK".as_bytes(),
Tag::RADI => "RADI".as_bytes(),
Tag::ROOT => "ROOT".as_bytes(),
- Tag::SIG => SIG_VALUE.as_ref(),
+ Tag::SIG => [b'S', b'I', b'G', 0x00].as_ref(),
Tag::SREP => "SREP".as_bytes(),
}
}