Possible fix for #77 to use v4 UUID session_id as per RFC-4122.

Warning: NOT tested.
This commit is contained in:
Ximon Eighteen
2019-09-09 11:31:07 +02:00
parent 2d70997ee3
commit b9163c2e1c
3 changed files with 4 additions and 4 deletions
+1
View File
@@ -10,6 +10,7 @@ derive_more = "^0.13"
rand = "^0.5"
rpki = "^0.5"
serde = { version = "^1.0", features = ["derive"] }
uuid = "0.7"
[dependencies.krill_commons]
path = "../commons"
+1
View File
@@ -6,6 +6,7 @@ extern crate rand;
extern crate rpki;
#[macro_use]
extern crate serde;
extern crate uuid;
extern crate krill_commons;
pub mod publishers;
+2 -4
View File
@@ -34,10 +34,8 @@ pub struct RrdpInitDetails {
impl RrdpInitDetails {
pub fn init_new(base_uri: uri::Https, repo_dir: PathBuf) -> RrdpInit {
use rand::{thread_rng, Rng};
let mut rng = thread_rng();
let rnd: u32 = rng.gen();
let session = format!("{}", rnd);
use uuid::Uuid;
let session = format!("{}", Uuid::new_v4());
StoredEvent::new(
&id(),