|
@@ -98,9 +98,9 @@ async fn main() {
|
|
|
(cred, bl)
|
|
|
};
|
|
|
|
|
|
- if matches.opt_present("L") {
|
|
|
+ let lox_cred = if matches.opt_present("L") {
|
|
|
// If trust level is 0, do trust promotion, otherwise level up.
|
|
|
- if lox_cred.trust_level == Scalar::zero() {
|
|
|
+ let cred = if lox_cred.trust_level == Scalar::zero() {
|
|
|
let migration_cred =
|
|
|
trust_promotion(&server_addr, &lox_cred, get_lox_pub(&lox_auth_pubkeys)).await;
|
|
|
let cred = trust_migration(
|
|
@@ -111,6 +111,7 @@ async fn main() {
|
|
|
get_migration_pub(&lox_auth_pubkeys),
|
|
|
)
|
|
|
.await;
|
|
|
+ cred
|
|
|
} else {
|
|
|
let encbuckets = get_reachability_credential(&server_addr).await;
|
|
|
let cred = level_up(
|
|
@@ -121,6 +122,11 @@ async fn main() {
|
|
|
get_reachability_pub(&lox_auth_pubkeys),
|
|
|
)
|
|
|
.await;
|
|
|
- }
|
|
|
- }
|
|
|
+ cred
|
|
|
+ };
|
|
|
+ save_object(&cred, &lox_cred_filename);
|
|
|
+ cred
|
|
|
+ } else {
|
|
|
+ lox_cred
|
|
|
+ };
|
|
|
}
|