Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1307 from jovfer/feature/rc_1_6_8
Browse files Browse the repository at this point in the history
RC 1.6.8
  • Loading branch information
jovfer authored Nov 21, 2018
2 parents 00e65e8 + aadc406 commit d5ff9ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions libindy/src/services/pool/request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,15 +695,18 @@ fn _get_msg_result_without_state_proof(msg: &str) -> Result<(SJsonValue, SJsonVa
}

fn _check_state_proof(msg_result: &SJsonValue, f: usize, gen: &Generator, bls_keys: &HashMap<String, Option<VerKey>>, raw_msg: &str) -> bool {
debug!("TransactionHandler::process_reply: Try to verify proof and signature");
debug!("TransactionHandler::process_reply: Try to verify proof and signature >>");

match state_proof::parse_generic_reply_for_proof_checking(&msg_result, raw_msg) {
let res = match state_proof::parse_generic_reply_for_proof_checking(&msg_result, raw_msg) {
Some(parsed_sps) => {
debug!("TransactionHandler::process_reply: Proof and signature are present");
state_proof::verify_parsed_sp(parsed_sps, bls_keys, f, gen)
}
None => false
}
};

debug!("TransactionHandler::process_reply: Try to verify proof and signature << {}", res);
res
}

#[cfg(test)]
Expand Down
4 changes: 3 additions & 1 deletion libindy/src/services/pool/state_proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ fn _parse_reply_for_builtin_sp(json_msg: &SJsonValue, type_: &str) -> Option<Vec
json_msg["ref"].as_u64()) {
trace!("TransactionHandler::parse_reply_for_builtin_sp: GET_CRED_DEF sign_type {:?}, sch_seq_no: {:?}", sign_type, sch_seq_no);
let marker = if ProtocolVersion::is_node_1_3() { '\x03' } else { '3' };
format!(":{}:{}:{}", marker, sign_type, sch_seq_no)
let tag = if ProtocolVersion::is_node_1_3() { None } else { json_msg["tag"].as_str() };
let tag = tag.map(|t| format!(":{}", t)).unwrap_or("".to_owned());
format!(":{}:{}:{}{}", marker, sign_type, sch_seq_no, tag)
} else {
trace!("TransactionHandler::parse_reply_for_builtin_sp: <<< GET_CRED_DEF No key suffix");
return None;
Expand Down

0 comments on commit d5ff9ac

Please sign in to comment.