Fixing issues after updating rpki-rs and bcder-rs. Note there is some cloning added to the identity certificate building. That should be looked at again when generating rpki certs and objects stabalises.

This commit is contained in:
Tim Bruijnzeels
2019-02-15 15:58:09 +01:00
parent 8b4db0bfcb
commit 3ed2a4c2a8
7 changed files with 12 additions and 7 deletions
+1
View File
@@ -3,6 +3,7 @@ use std::io;
use std::io::Read;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::path::PathBuf;
use std::str::FromStr;
use clap::{App, Arg};
use log::LevelFilter;
use rpki::uri;
+1
View File
@@ -1,5 +1,6 @@
//! Publication Client that uses the JSON/Rest API
use std::path::PathBuf;
use std::str::FromStr;
use clap::{App, Arg, SubCommand};
use rpki::uri;
use crate::api::publication_data;
+5 -5
View File
@@ -96,7 +96,7 @@ impl RpkiTbsCertificate {
(
self.validity.encode(),
self.subject.encode(),
self.subject_public_key_info.encode(),
self.subject_public_key_info.clone().encode(),
id_ext.encode()
)
))
@@ -330,7 +330,7 @@ impl SignedMessageBuilder {
let encap_content_info = encode::sequence(
(
oid::PROTOCOL_CONTENT_TYPE.encode(),
Constructed::new(Tag::CTX_0, self.content.encode())
Constructed::new(Tag::CTX_0, self.content.clone().encode())
)
);
@@ -437,7 +437,7 @@ impl SignedAttributes {
(
oid::MESSAGE_DIGEST.encode(),
encode::set(
self.digest.encode()
self.digest.clone().encode()
)
)
),
@@ -501,7 +501,7 @@ impl SignedSignerInfo {
// We MUST use the SubjectKeyIdentifier from the EE certificate.
// I.e. the hashed thing in an OctetString, rather than the full
// X509 Extension.
let sid = self.key_id.encode_as(Tag::CTX_0);
let sid = self.key_id.clone().encode_as(Tag::CTX_0);
// digestAlgorithm DigestAlgorithmIdentifier,
let digest_algo = DigestAlgorithm.encode();
@@ -521,7 +521,7 @@ impl SignedSignerInfo {
),
(
SignatureAlgorithm.cms_encode(),
self.signature.encode()
self.signature.clone().encode()
)
)
)
+2 -2
View File
@@ -523,8 +523,8 @@ impl IdExtensions {
encode::sequence(
(
self.basic_ca.as_ref().map(|s| s.encode()),
self.subject_key_id.encode(),
self.authority_key_id.as_ref().map(|s| s.encode())
self.subject_key_id.clone().encode(),
self.authority_key_id.clone().map(|s| s.encode())
)
)
)
+1
View File
@@ -893,6 +893,7 @@ mod tests {
use super::*;
use std::str;
use std::str::FromStr;
use rpki::uri::Rsync;
use crate::api::EncodedHash;
+1
View File
@@ -444,6 +444,7 @@ impl From<x509::ValidationError> for RepositoryResponseError {
#[cfg(test)]
mod tests {
use std::str;
use std::str::FromStr;
use rpki::x509::Time;
use super::*;
+1
View File
@@ -1,6 +1,7 @@
use std::fs::File;
use std::io::Write;
use std::path::PathBuf;
use std::str::FromStr;
use bytes::Bytes;
use rpki::uri;
use rpki::crypto::{PublicKeyFormat, Signer};