+ /* All current -O options relate to FIDO keys only */
+ if (nopts != 0 && !sshkey_is_sk(private)) {
+ fatal("FIDO-specific option requested for non-FIDO key %s",
+ identity_file);
+ }
+ if (sshkey_is_sk(private)) {
+ debug_f("%s: original FIDO key flags: "
+ "%stouch-required %sverify-required", identity_file,
+ (private->sk_flags & SSH_SK_USER_PRESENCE_REQD) ? "": "no-",
+ (private->sk_flags & SSH_SK_USER_VERIFICATION_REQD) ? "" : "no-");
+ }
+ for (i = 0; i < nopts; i++) {
+ if (strcasecmp(opts[i], "touch-required") == 0)
+ private->sk_flags |= SSH_SK_USER_PRESENCE_REQD;
+ else if (strcasecmp(opts[i], "no-touch-required") == 0)
+ private->sk_flags &= ~SSH_SK_USER_PRESENCE_REQD;
+ else if (strcasecmp(opts[i], "verify-required") == 0)
+ private->sk_flags |= SSH_SK_USER_VERIFICATION_REQD;
+ else if (strcasecmp(opts[i], "no-verify-required") == 0)
+ private->sk_flags &= ~SSH_SK_USER_VERIFICATION_REQD;
+ else {
+ fatal("Option \"%s\" is unsupported for "
+ "key passphrase change", opts[i]);
+ }
+ }
+ if (sshkey_is_sk(private) && nopts != 0) {
+ debug_f("%s: updated FIDO key flags: "
+ "%stouch-required %sverify-required", identity_file,
+ (private->sk_flags & SSH_SK_USER_PRESENCE_REQD) ? "": "no-",
+ (private->sk_flags & SSH_SK_USER_VERIFICATION_REQD) ? "" : "no-");
+ }
+