|
Lines 1572-1607
load_identity_file(Identity *id)
Link Here
|
| 1572 |
return private; |
1572 |
return private; |
| 1573 |
} |
1573 |
} |
| 1574 |
|
1574 |
|
| 1575 |
static int |
|
|
| 1576 |
key_type_allowed_by_config(struct sshkey *key) |
| 1577 |
{ |
| 1578 |
if (match_pattern_list(sshkey_ssh_name(key), |
| 1579 |
options.pubkey_key_types, 0) == 1) |
| 1580 |
return 1; |
| 1581 |
|
| 1582 |
/* RSA keys/certs might be allowed by alternate signature types */ |
| 1583 |
switch (key->type) { |
| 1584 |
case KEY_RSA: |
| 1585 |
if (match_pattern_list("rsa-sha2-512", |
| 1586 |
options.pubkey_key_types, 0) == 1) |
| 1587 |
return 1; |
| 1588 |
if (match_pattern_list("rsa-sha2-256", |
| 1589 |
options.pubkey_key_types, 0) == 1) |
| 1590 |
return 1; |
| 1591 |
break; |
| 1592 |
case KEY_RSA_CERT: |
| 1593 |
if (match_pattern_list("rsa-sha2-512-cert-v01@openssh.com", |
| 1594 |
options.pubkey_key_types, 0) == 1) |
| 1595 |
return 1; |
| 1596 |
if (match_pattern_list("rsa-sha2-256-cert-v01@openssh.com", |
| 1597 |
options.pubkey_key_types, 0) == 1) |
| 1598 |
return 1; |
| 1599 |
break; |
| 1600 |
} |
| 1601 |
return 0; |
| 1602 |
} |
| 1603 |
|
| 1604 |
|
| 1605 |
/* |
1575 |
/* |
| 1606 |
* try keys in the following order: |
1576 |
* try keys in the following order: |
| 1607 |
* 1. certificates listed in the config file |
1577 |
* 1. certificates listed in the config file |
|
Lines 1726-1732
pubkey_prepare(Authctxt *authctxt)
Link Here
|
| 1726 |
} |
1696 |
} |
| 1727 |
/* finally, filter by PubkeyAcceptedKeyTypes */ |
1697 |
/* finally, filter by PubkeyAcceptedKeyTypes */ |
| 1728 |
TAILQ_FOREACH_SAFE(id, preferred, next, id2) { |
1698 |
TAILQ_FOREACH_SAFE(id, preferred, next, id2) { |
| 1729 |
if (id->key != NULL && !key_type_allowed_by_config(id->key)) { |
1699 |
if (id->key != NULL && !sshkey_type_allowed_by_config(id->key, |
|
|
1700 |
options.pubkey_key_types)) { |
| 1730 |
debug("Skipping %s key %s - " |
1701 |
debug("Skipping %s key %s - " |
| 1731 |
"not in PubkeyAcceptedKeyTypes", |
1702 |
"not in PubkeyAcceptedKeyTypes", |
| 1732 |
sshkey_ssh_name(id->key), id->filename); |
1703 |
sshkey_ssh_name(id->key), id->filename); |