mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
show "Web sign in to" when HTTPS is detected
This commit is contained in:
parent
f6820ad5f6
commit
8b1f8a4595
@ -277,10 +277,14 @@ void layoutSignIdentity(const IdentityType *identity, const char *challenge)
|
||||
char row_user[64 + 8 + 1];
|
||||
|
||||
if (identity->has_proto && identity->proto[0]) {
|
||||
strlcpy(row_proto, identity->proto, sizeof(row_proto));
|
||||
char *p = row_proto;
|
||||
while (*p) { *p = toupper((int)*p); p++; }
|
||||
strlcat(row_proto, " login to:", sizeof(row_proto));
|
||||
if (strcmp(identity->proto, "https") == 0) {
|
||||
strlcpy(row_proto, "Web sign in to:", sizeof(row_proto));
|
||||
} else {
|
||||
strlcpy(row_proto, identity->proto, sizeof(row_proto));
|
||||
char *p = row_proto;
|
||||
while (*p) { *p = toupper((int)*p); p++; }
|
||||
strlcat(row_proto, " login to:", sizeof(row_proto));
|
||||
}
|
||||
} else {
|
||||
strlcpy(row_proto, "Login to:", sizeof(row_proto));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user