Skip to content

Commit ae18283

Browse files
committed
fix protos
1 parent 291829d commit ae18283

File tree

30 files changed

+183
-234
lines changed

30 files changed

+183
-234
lines changed

bounty/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2018"
99
[dependencies]
1010
colored = "1.8"
1111
curve25519-dalek = { version = "1", features = [ "serde" ] }
12-
protobuf = "2.20.0"
12+
protobuf = "2.22.1"
1313
sha3 = "0.8"
1414
rand = "0.3.17"
1515
wedpr_l_crypto_zkp_discrete_logarithm_proof = "1.0.0"

bounty/src/scd.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ fn generate_predicate_proof(
297297
template_private_key: TemplatePrivateKey,
298298
value: u64,
299299
rule_set: &mut VerificationRuleSet,
300-
) -> Result<VerifyRequest, WedprError>
301-
{
300+
) -> Result<VerifyRequest, WedprError> {
302301
user_fill_certificate_attribute(certificate_attribute_dict, value);
303302
let (
304303
sign_certificate_request,
@@ -353,8 +352,7 @@ fn issuer_make_certificate_template(
353352
fn user_fill_certificate_attribute(
354353
certificate_attribute_dict: &mut AttributeDict,
355354
attribute: u64,
356-
)
357-
{
355+
) {
358356
let mut attribute_kv = StringToStringPair::new();
359357
attribute_kv.set_key(TARGET_ATTRIBUTE.to_string());
360358
attribute_kv.set_value(attribute.to_string());
@@ -367,8 +365,7 @@ fn user_prove_rule_set(
367365
certificate_template: &CertificateTemplate,
368366
user_private_key_str: &str,
369367
rule_set: &mut VerificationRuleSet,
370-
) -> Result<VerifyRequest, WedprError>
371-
{
368+
) -> Result<VerifyRequest, WedprError> {
372369
// In most cases, this nonce should be provided by the verifier to prevent
373370
// replaying attacks.
374371
let verification_nonce_str = verifier::get_verification_nonce().unwrap();
@@ -385,7 +382,6 @@ fn user_prove_rule_set(
385382
fn verifier_verify_rule_set(
386383
rule_set: &mut VerificationRuleSet,
387384
request: &VerifyRequest,
388-
) -> bool
389-
{
385+
) -> bool {
390386
verifier::verify_selective_disclosure(&rule_set, &request).unwrap()
391387
}

bounty/src/utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ pub fn print_alert5(
3434
message3: &str,
3535
message4: &str,
3636
message5: &str,
37-
)
38-
{
37+
) {
3938
println!(
4039
"{}\n{}\n{}\n{}\n{}\n",
4140
message1.yellow(),

ffi/ffi_c/ffi_c_ktb/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ crate-type = [ "cdylib", "staticlib" ]
1212

1313
[dependencies]
1414
libc = "0.2.60"
15-
protobuf = "2.20.0"
15+
protobuf = "2.22.1"
1616
wedpr_s_hierarchical_deterministic_key = "1.3.0"
1717
wedpr_ffi_common = "1.0.0"
1818
wedpr_ffi_macros = "1.0.0"

ffi/ffi_c/ffi_c_ktb/src/hdk.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ pub extern "C" fn wedpr_hdk_create_mnemonic_en(
4242
pub extern "C" fn wedpr_hdk_create_master_key_en(
4343
password_cstring: *mut c_char,
4444
mnemonic_cstring: *mut c_char,
45-
) -> *mut c_char
46-
{
45+
) -> *mut c_char {
4746
let result = panic::catch_unwind(|| {
4847
let passwd = c_safe_c_char_pointer_to_string!(password_cstring);
4948
let mnemonic = c_safe_c_char_pointer_to_string!(mnemonic_cstring);
@@ -71,8 +70,7 @@ pub extern "C" fn wedpr_hdk_derive_extended_key(
7170
account: c_int,
7271
change: c_int,
7372
address_index: c_int,
74-
) -> *mut c_char
75-
{
73+
) -> *mut c_char {
7674
let result = panic::catch_unwind(|| {
7775
let master_key = c_safe_c_char_pointer_to_bytes!(master_key_cstring);
7876

ffi/ffi_c/ffi_c_scd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ crate-type = [ "cdylib", "staticlib" ]
1212

1313
[dependencies]
1414
libc = "0.2.60"
15-
protobuf = "2.20.0"
15+
protobuf = "2.22.1"
1616
wedpr_s_selective_certificate_disclosure = "1.3.0"
1717
wedpr_ffi_common = "1.0.0"
1818
wedpr_ffi_macros = "1.0.0"

ffi/ffi_c/ffi_c_scd/src/issuer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ pub extern "C" fn wedpr_scd_sign_certificate(
4949
sign_request_cstring: *mut c_char,
5050
user_id_cstring: *mut c_char,
5151
user_nonce_cstring: *mut c_char,
52-
) -> *mut c_char
53-
{
52+
) -> *mut c_char {
5453
let result = panic::catch_unwind(|| {
5554
let certificate_template_pb = c_safe_c_char_pointer_to_proto!(
5655
certificate_template_cstring,

ffi/ffi_c/ffi_c_scd/src/user.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use wedpr_ffi_common::utils::{
2222
pub extern "C" fn wedpr_scd_fill_certificate(
2323
attribute_dict_cstring: *mut c_char,
2424
certificate_template_cstring: *mut c_char,
25-
) -> *mut c_char
26-
{
25+
) -> *mut c_char {
2726
let result = panic::catch_unwind(|| {
2827
let attribute_dict_pb = c_safe_c_char_pointer_to_proto!(
2928
attribute_dict_cstring,
@@ -67,8 +66,7 @@ pub extern "C" fn wedpr_scd_blind_certificate_signature(
6766
user_private_key_cstring: *mut c_char,
6867
certificate_secrets_blinding_factors_cstring: *mut c_char,
6968
issuer_nonce_cstring: *mut c_char,
70-
) -> *mut c_char
71-
{
69+
) -> *mut c_char {
7270
let result = panic::catch_unwind(|| {
7371
let certificate_signature_pb = c_safe_c_char_pointer_to_proto!(
7472
certificate_signature_cstring,
@@ -118,8 +116,7 @@ pub extern "C" fn wedpr_scd_prove_selective_disclosure(
118116
certificate_template_cstring: *mut c_char,
119117
user_private_key_cstring: *mut c_char,
120118
verification_nonce_cstring: *mut c_char,
121-
) -> *mut c_char
122-
{
119+
) -> *mut c_char {
123120
let result = panic::catch_unwind(|| {
124121
let certificate_signature_pb = c_safe_c_char_pointer_to_proto!(
125122
certificate_signature_cstring,

ffi/ffi_c/ffi_c_scd/src/verifier.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ pub extern "C" fn wedpr_scd_get_revealed_attributes(
4646
pub extern "C" fn wedpr_scd_verify_selective_disclosure(
4747
rule_set_cstring: *mut c_char,
4848
verify_request_cstring: *mut c_char,
49-
) -> *mut c_char
50-
{
49+
) -> *mut c_char {
5150
let result = panic::catch_unwind(|| {
5251
let verify_request_pb = c_safe_c_char_pointer_to_proto!(
5352
verify_request_cstring,

ffi/ffi_c/ffi_c_vcl/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ crate-type = [ "cdylib", "staticlib" ]
1212

1313
[dependencies]
1414
libc = "0.2.60"
15-
protobuf = "2.20.0"
15+
protobuf = "2.22.1"
1616
wedpr_s_verifiable_confidential_ledger = { path = "../../../solution/verifiable_confidential_ledger"}
1717
wedpr_ffi_common = "1.0.0"
18-
wedpr_ffi_macros = { path = "/Users/asher/WeDPR/WeDPR-Lab-Crypto/ffi/ffi_macros" }
18+
wedpr_ffi_macros = { git = "https://github.com/WeBankBlockchain/WeDPR-Lab-Crypto.git", branch = "v1.1.0" }
1919
wedpr_s_protos = { path = "../../../protos"}
2020
wedpr_l_protos = { git = "https://github.com/WeBankBlockchain/WeDPR-Lab-Crypto.git", branch = "v1.1.0" }
2121
wedpr_l_macros = "1.0.0"

0 commit comments

Comments
 (0)