554 |
554 |
555 // if an id is found and we can access the decrypted secret store |
555 // if an id is found and we can access the decrypted secret store |
556 // we can set the user/password |
556 // we can set the user/password |
557 if(id && (secrets->isdecrypted || !decrypt_secrets(a, secrets))) { |
557 if(id && (secrets->isdecrypted || !decrypt_secrets(a, secrets))) { |
558 PwdEntry *cred = pwdstore_get(secrets, id); |
558 PwdEntry *cred = pwdstore_get(secrets, id); |
559 *user = cred->user; |
559 if(cred) { |
560 *password = cred->password; |
560 *user = cred->user; |
561 ret = 1; |
561 *password = cred->password; |
|
562 ret = 1; |
|
563 } |
562 } |
564 } |
563 |
565 |
564 free(req_url_proto.ptr); |
566 free(req_url_proto.ptr); |
565 ucx_list_free_content(locations, (ucx_destructor)free_cred_location); |
567 ucx_list_free_content(locations, (ucx_destructor)free_cred_location); |
566 ucx_list_free(locations); |
568 ucx_list_free(locations); |