Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5465686imm; Tue, 18 Sep 2018 09:56:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbxBtglbTZbqOCMs/DDDmBwdnoJmKqgv3NVS9IQPS8hDGJfK2I915mY0gOXPDDpfqmJ9r5w X-Received: by 2002:a65:5004:: with SMTP id f4-v6mr28405032pgo.54.1537289806543; Tue, 18 Sep 2018 09:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537289806; cv=none; d=google.com; s=arc-20160816; b=mlT8MK08QMF5+dN6KycjynFDBFGYgiBDqasTp4eXen1DuQj8nYCu7xf77kMHnRVj5w 3FOv9datxwp42KQTgVkwJM35RQGq/+Ui6xIGE+DjpJDqQr3WHJvzYLwc9H6jnEFPHfdL TfpsJMqHnIm+FIxdJNSnc9v8AWQg0L8+ilZjBxerAWUl+TgOihjh70jarPhqiX6846fa G5FRpEuwAQw28Mw5+c0HibocXvQje/ueyaFDwvhauvIYPCBwBL8L4sS6VMSlbNkbNVHu tQrUmA5cyhHUfh1cuL79L5w/xAKfjigankq9UL6axZ9KeDPQxj7m3I5KcV/PqE5AaPNd 1Wdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization; bh=JkF8XXC6VKDqLPcvuUL8V0poVuEtOLUMW1Km6XhHzwM=; b=TjjTSjJLiQTh9/lz/RcglE5L2ioUHQYv3qszARhQPFR9xVsDWYIjcJFnOxiMcRVKJT O2a7HwidXrqcr7th/C7i2LhVU3UCuSDnqd5MeMs+2H1idIohIyhVmMaoa6S/LXMmkIDO cyzyX31FeNTLe8c6JquWPaXQGjdRtrQKeLAMXrwPSfmioPtAp/U1FCri4WYK6BBg42WT kWL7uq9PM1xGMiybu7FGp5pA2mOMjY7cP4b7YAcpdqUhFrywpmB+6NJcQfb3gzM5m30u n9xh3at0hqWAxLnNpPC/YqYmTJmRqHWdd2oObbxznboUv30CqLG848UYRDGEuuvU7Sxz OFzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14-v6si18442437pgo.449.2018.09.18.09.56.31; Tue, 18 Sep 2018 09:56:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730287AbeIRW2d convert rfc822-to-8bit (ORCPT + 99 others); Tue, 18 Sep 2018 18:28:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33646 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729680AbeIRW2d (ORCPT ); Tue, 18 Sep 2018 18:28:33 -0400 Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A13BA308338F; Tue, 18 Sep 2018 16:55:07 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46B0F89236; Tue, 18 Sep 2018 16:55:06 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <14f91823-474e-1b46-d305-12229dac8967@gmail.com> References: <14f91823-474e-1b46-d305-12229dac8967@gmail.com> <0d51fca9a29458a40121df0c5380af91e3429c08.camel@infradead.org> <153618445730.7946.10001472635835806478.stgit@warthog.procyon.org.uk> <1537253993.20009.62.camel@infradead.org> <14067.1537285833@warthog.procyon.org.uk> <745318a0-51bd-be8f-2251-44701ad75830@gmail.com> <19247.1537288419@warthog.procyon.org.uk> To: Denis Kenzior Cc: dhowells@redhat.com, David Woodhouse , jmorris@namei.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/22] KEYS: Support TPM-wrapped key and crypto ops MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23697.1537289705.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 18 Sep 2018 17:55:05 +0100 Message-ID: <23698.1537289705@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 18 Sep 2018 16:55:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Denis Kenzior wrote: > In theory the PEM file already contains the type of the certificate, at least > at a high level. E.g. private, public, tpm. So if we accept PEM files > directly that could be potentially a faster way of determining the parser to > use and would still work with keyctl update/instantiate, right? Yes. It shouldn't be much code, either. You still have to check for X.509 DER since the kernel currently supports that. David