Message ID | 20180817085425.9097-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBSE23LNQKGQEVPOIHGQ@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::440; helo=mail-wr1-x440.google.com; envelope-from=swupdate+bncbcxploxj6ikrbse23lnqkgqevpoihgq@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="HJ3zhaMV"; dkim-atps=neutral Received: from mail-wr1-x440.google.com (mail-wr1-x440.google.com [IPv6:2a00:1450:4864:20::440]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41sH7w2hxGz9s2P for <incoming@patchwork.ozlabs.org>; Fri, 17 Aug 2018 18:54:35 +1000 (AEST) Received: by mail-wr1-x440.google.com with SMTP id r4-v6sf5255533wrt.2 for <incoming@patchwork.ozlabs.org>; Fri, 17 Aug 2018 01:54:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1534496072; cv=pass; d=google.com; s=arc-20160816; b=eUUg5T4Aojqu6Es2J665XR0meZn2OrJeMRYDVReHNJ8HB4foM1QsxP0NEXv8vEgbh2 CLa3yCeHFbxc6mw96Z4LGDJizXzRoLb/xcQa2Z+3D43DrdllkPj/7py790+n2xps0sGc H06pOJ/Wp1VBVUo5vhjw2+57ivfaM84pdwrazkZBtLK7ZqAcbeT9Bn/bzJCyu260mO8m i/3SUfD3vqVB3ZehvVeZnY03NPbNKguMkv5zvxx1kf9WNSDMjcE0wGSWapgzAWvNzHHN YRemxSAIrtiP00p2kO811odx/QyHf1T4zyBm8RPIZIRcpm7TU6utFn0PvUTxYcw8dFCq F1yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=dSRnXsluKJqIitf4cHNb9bJ07cPzrKjj4NsDibESK8A=; b=yWu/lcq4Nrw8SWixjEGn2UOCNkqNQv4bB9ivB4LOmY6X/UXFTInZk+5WMaX6UHTHy+ 6LBDjyu48F4T0M4X3FgCvLiTsSvYkW7pmx0GuZyMmF7vXU/rD1MMB/VboX0Q0NRm6XUf h9Ct5+XuOSus7rV0sRNqCstTzYyTzeZqye7QwNw4MeStK6drUET8512wYiRSlknMCCiW 0Q1Y1JGN/8dw0X3eoWdjvcbbVeVSstDwXnt/cpIgRv3tKvhdohKHENjne1RK9n0zyTwt +kOqdQJvr8ZOa9LBzhT/06JL1P/3toPUvNcztaw/tC5Pknq5UhvbmnVuvau9HXIPwkbf xYzg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=dSRnXsluKJqIitf4cHNb9bJ07cPzrKjj4NsDibESK8A=; b=HJ3zhaMVk0Vu6DH4LsUI7XWm60XvrlAmJk1mYNEmn9IRR6dgm5fLRlOFcq6C3BjjMk huS/p/sa48n+U34Spjn20HQM131PbHQbC4wQHHovJ+W9bPyJ6vm8GX1YJNE3YJQLbp5C h+GV+POXIlKgKcTLOpuSSUomXMMeKGEjB8vz2jfVoNKxD7qkt615cV+hOAgYSciqLE8t NRzugpqC4rDkaqgc/REnIddGpcwMsWKPL7zBM/fD7oriYfkWQl/E2IUTU/y387FKyn8Q xzSJthbUDp91XSIPl+P9eRMiGgBLbUQRaUv3sRLubyzdR6+DhsTdGNTd5FcfWNjFkRpA hcPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=dSRnXsluKJqIitf4cHNb9bJ07cPzrKjj4NsDibESK8A=; b=dhhSSXp94BI05wmXij5t6dgRWPHhQTjEzjoudStgltIHlPwmL3Jpum/PCuS962Gluq M+U/LIX/kwZ7sC4g33sel7Yhyt7dv/qqdBzi2UgpcMO5yHzUp3Gt36WJWignnRvpq1AS pX2f80y/3DE4Iib/fo/Bku3U4p1TGDz1hBbd7MY+bAFf5M43E5BoVdG+zl11t40nGSyd +KZUjHzj9yXvpLnnKXORRgvqaEuZG76CmMR6YMI8aL9ZT0GvQvS1cFb6U3Yi8B0tD+oQ rgAdtWeURHPRQhjuNPxyMPJrvoajkRL3YUNSZweFgOVqLg2JFbYJ0vvjAgSsjuItdcHT eJnw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOUpUlHss1s8edU1aFaoeJrrcREr5txQDPYzHIP5Qu6pYXBYUQwBn3Xb UwInchj9Qtn9hhn9VMP6v1Y= X-Google-Smtp-Source: AA+uWPwM+GJqe0a2OgoKMDrSrzcJl2guQ8gus4SIjQAiaHbUfA3a7UfjHdTqK38NTCuCxW9+L9IT1g== X-Received: by 2002:a1c:c910:: with SMTP id f16-v6mr7838wmb.2.1534496072682; Fri, 17 Aug 2018 01:54:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a1c:f214:: with SMTP id s20-v6ls1540199wmc.0.gmail; Fri, 17 Aug 2018 01:54:31 -0700 (PDT) X-Received: by 2002:a1c:487:: with SMTP id 129-v6mr2646774wme.22.1534496071671; Fri, 17 Aug 2018 01:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534496071; cv=none; d=google.com; s=arc-20160816; b=ugsWRL3uQm6K9u+4FYkgDCOHJDg+yDQd5UVNTWQaprvZ7RuKG2w8CObDix0WWi5n2U 0uaU7i9/zjgDq93GqDW1An343tHf5aqHxVDwUyRNuHaKama5MO03h+fbIa8MnIPDcX6i HtcIek2pYBaoSKFnsALohbQDHuNZVJndWWpLQXN5+pZGZ0UpqDZHzzaNhkbgzbGn4lDj dygAXDR13XlmdUCxZhPOUlrNQlV97f/J/GDDKcuRNq4pRJPmn6Sz0sWEgicqJsvyfagf mARwYsaA2EuSk/Ul6b1gFyJ618K81BoORMwcBWSdeUEcUy+AFtAGayy5nLy4phf5rrt/ PkfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=74SQWp5MawrifhlpaIfywJzBI6SjvP1mddne35BHDR4=; b=TL39wv2ObQXpROkz8ToKy/sONU4bvi1OFkQ8uz+Qw4Pmf3A1nw3PmWLVg4zOOEA9R6 6h/SaZ7LEb/bmWp5CUnvnXTccnaMH3ZjbRo0Ik2jf1izGisBJvuMvpnOmeDpm8UJnBRq ji18z+Uw/FVq23z79Y64CBiEfaRYa5Su3yjUOUTdouHxavYa0KJ0qYNx2FF6crEvqPlK ZOGaIlX8HTucFZcxF6KDJ3n0aFokqQexTWfVv2Ejafld4NxYtzp3suHpbVeaPOcUvBHV xDOUzmQBlZSqw3Y56jNgzaOUlcivA1GB6onrfItZwZaOzGI6D9R7YVgfReeaMdkn0hhh ujQQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id i13-v6si61135wrh.5.2018.08.17.01.54.31 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 01:54:31 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 41sH7q3QZ6z1qxQK; Fri, 17 Aug 2018 10:54:31 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 41sH7q39d8z1qqkr; Fri, 17 Aug 2018 10:54:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id SRvqjG3bZxEO; Fri, 17 Aug 2018 10:54:30 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Fri, 17 Aug 2018 10:54:30 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 5A30045405F3; Fri, 17 Aug 2018 10:54:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mpbK5sBLTkUk; Fri, 17 Aug 2018 10:54:28 +0200 (CEST) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id E4FD94540506; Fri, 17 Aug 2018 10:54:27 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] Fix build failure by loading CMS certificate Date: Fri, 17 Aug 2018 10:54:25 +0200 Message-Id: <20180817085425.9097-1-sbabic@denx.de> X-Mailer: git-send-email 2.17.1 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Fix build failure by loading CMS certificate
|
expand
|
diff --git a/corelib/verify_signature.c b/corelib/verify_signature.c index a3192f5..664f680 100644 --- a/corelib/verify_signature.c +++ b/corelib/verify_signature.c @@ -243,7 +243,11 @@ static X509_STORE *load_cert_chain(const char *file) crt = PEM_read_bio_X509(castore_bio, NULL, 0, NULL); if (crt) { crt_count++; - TRACE("Read PEM #%d: %s", crt_count, crt->name); + char *subj = X509_NAME_oneline(X509_get_subject_name(crt), NULL, 0); + char *issuer = X509_NAME_oneline(X509_get_issuer_name(crt), NULL, 0); + TRACE("Read PEM #%d: %s %s", crt_count, issuer, subj); + free(subj); + free(issuer); if (X509_STORE_add_cert(castore, crt) == 0) { TRACE("Adding certificate to X509_STORE failed"); BIO_free(castore_bio);
The correct way to access certificate names is using accessors provided by openSSL library instead of direct access to fields inside X509 structure. Changes in openSSL cause build error because "name" is not anymore part of X509 struct. Fix it using accessor to get issuer and subject of a certificate. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/verify_signature.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)