]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: allow an empty attestation certificate returned by a
authordjm@openbsd.org <djm@openbsd.org>
Tue, 12 Nov 2019 22:38:19 +0000 (22:38 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 12 Nov 2019 23:15:47 +0000 (10:15 +1100)
security key enrollment - these are possible for tokens that only offer self-
attestation. This also needs support from the middleware.

ok markus@

OpenBSD-Commit-ID: 135eeeb937088ef6830a25ca0bbe678dfd2c57cc

ssh-sk.c

index ff9c6f28282fc5a292970e64024cf36ee27f8d47..41fa164b71b96079ac102ce5c56325f3c794a368 100644 (file)
--- a/ssh-sk.c
+++ b/ssh-sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-sk.c,v 1.9 2019/11/12 19:34:40 markus Exp $ */
+/* $OpenBSD: ssh-sk.c,v 1.10 2019/11/12 22:38:19 djm Exp $ */
 /*
  * Copyright (c) 2019 Google LLC
  *
@@ -300,7 +300,8 @@ sshsk_enroll(int type, const char *provider_path, const char *application,
        }
        /* Check response validity */
        if (resp->public_key == NULL || resp->key_handle == NULL ||
-           resp->signature == NULL || resp->attestation_cert == NULL) {
+           resp->signature == NULL ||
+           (resp->attestation_cert == NULL && resp->attestation_cert_len != 0)) {
                error("%s: sk_enroll response invalid", __func__);
                r = SSH_ERR_INVALID_FORMAT;
                goto out;