simple_nts_client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/nts/cli.rb +1 -1
- data/lib/nts/ntske/client.rb +1 -1
- data/lib/nts/ntske/message.rb +2 -2
- data/lib/nts/ntske/message/aead_algorithm_negotiation.rb +1 -1
- data/lib/nts/ntske/message/cookie.rb +1 -1
- data/lib/nts/ntske/message/end_of_message.rb +1 -1
- data/lib/nts/ntske/message/error_record.rb +1 -1
- data/lib/nts/ntske/message/nts_next_protocol_negotiation.rb +1 -1
- data/lib/nts/ntske/message/ntsv4_port_negotiation.rb +1 -1
- data/lib/nts/ntske/message/ntsv4_server_negotiation.rb +1 -1
- data/lib/nts/ntske/message/warning_record.rb +1 -1
- data/lib/nts/sntp/extension.rb +1 -1
- data/lib/nts/sntp/extension/nts_authenticator.rb +1 -1
- data/lib/nts/sntp/extension/nts_cookie.rb +1 -1
- data/lib/nts/sntp/extension/unique_identifier.rb +1 -1
- data/lib/nts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1600dacea6a8cf46babf3ee8af7dd787bbc98e3cde9466da08bac31344eb0451
|
4
|
+
data.tar.gz: cb9fadc6aa0aae82532eb1649eab158becbd5ee32ceb49c0a3f26d7b19340b5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d978023acdffba26264b42e5aed38c469ca0f439ccb3abac670e919c52f7c01119110fdadb6831d82dc5783f80b508f50666ac6bc629007f4ebdc572739832
|
7
|
+
data.tar.gz: 24dbd67070a021488b399cb00d47fcd4d5b002f7dc797babb12ec52444dd3bc46de0ff9519f34c376e5375de4c88e140e57cc48f00b2b8ce1f0413bf788e16d7
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ simple\_nts\_client is CLI that is simple NTS(Network Time Security) Client impl
|
|
8
8
|
This CLI prints the now timestamp got with NTS.
|
9
9
|
Current implementation is based on:
|
10
10
|
|
11
|
-
* [
|
11
|
+
* [RFC 8915](https://tools.ietf.org/html/rfc8915)
|
12
12
|
|
13
13
|
|
14
14
|
## Installation
|
@@ -26,7 +26,7 @@ $ gem install simple_nts_client
|
|
26
26
|
$ simple_nts_client --help
|
27
27
|
Usage: simple_nts_client [options]
|
28
28
|
-s, --server VALUE NTS-KE server name (default time.cloudflare.com)
|
29
|
-
-p, --port VALUE NTS-KE port number (default
|
29
|
+
-p, --port VALUE NTS-KE port number (default 4460)
|
30
30
|
-v, --verbose verbose mode (default false)
|
31
31
|
```
|
32
32
|
|
@@ -34,14 +34,14 @@ You can run it the following:
|
|
34
34
|
|
35
35
|
```bash
|
36
36
|
$ simple_nts_client
|
37
|
-
|
37
|
+
2020-10-30 20:00:00 +0900
|
38
38
|
```
|
39
39
|
|
40
40
|
If you need to access other NTS-KE server or port, you can run it the following:
|
41
41
|
|
42
42
|
```bash
|
43
43
|
$ simple_nts_client --server YOURSERVER --port YOURPORT
|
44
|
-
|
44
|
+
2020-10-30 20:00:00 +0900
|
45
45
|
```
|
46
46
|
|
47
47
|
|
data/lib/nts/cli.rb
CHANGED
data/lib/nts/ntske/client.rb
CHANGED
@@ -78,7 +78,7 @@ module Nts
|
|
78
78
|
raise Exception if cookies.empty?
|
79
79
|
|
80
80
|
# AEAD algorithm => C2S, S2C key
|
81
|
-
# https://tools.ietf.org/html/
|
81
|
+
# https://tools.ietf.org/html/rfc8915#section-5.1
|
82
82
|
alg = res.find { |m| m.is_a?(AeadAlgorithmNegotiation) }&.algorithms
|
83
83
|
&.first
|
84
84
|
raise Exception if alg.nil?
|
data/lib/nts/ntske/message.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Nts
|
4
4
|
module Ntske
|
5
|
-
# https://tools.ietf.org/html/
|
5
|
+
# https://tools.ietf.org/html/rfc8915#section-7.6
|
6
6
|
module RecordType
|
7
7
|
END_OF_MESSAGE = 0
|
8
8
|
NTS_NEXT_PROTOCOL_NEGOTIATION = 1
|
@@ -14,7 +14,7 @@ module Nts
|
|
14
14
|
NTPV4_PORT_NEGOTIATION = 7
|
15
15
|
end
|
16
16
|
|
17
|
-
# https://tools.ietf.org/html/
|
17
|
+
# https://tools.ietf.org/html/rfc8915#section-4
|
18
18
|
class Record
|
19
19
|
# @param c [Boolean]
|
20
20
|
# @param type [Integer] less than 32768(15 bits)
|
@@ -8,7 +8,7 @@ module Nts
|
|
8
8
|
AEAD_AES_SIV_CMAC_256 = "\x00\x0F"
|
9
9
|
end
|
10
10
|
|
11
|
-
# https://tools.ietf.org/html/
|
11
|
+
# https://tools.ietf.org/html/rfc8915#section-4.1.5
|
12
12
|
class AeadAlgorithmNegotiation < Record
|
13
13
|
attr_reader :algorithms
|
14
14
|
|
data/lib/nts/sntp/extension.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module Nts
|
4
4
|
module Sntp
|
5
5
|
module Extension
|
6
|
-
# https://tools.ietf.org/html/
|
6
|
+
# https://tools.ietf.org/html/rfc8915#section-5.6
|
7
7
|
class NtsAuthenticator
|
8
8
|
include Extension
|
9
9
|
attr_reader :nonce, :ciphertext, :padding_length
|
data/lib/nts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_nts_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thekuwayama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|