From 50a6490a7bb139bdc0de87d68a1396ca4fe011d0 Mon Sep 17 00:00:00 2001 From: tobhe Date: Mon, 20 Apr 2020 20:03:39 +0000 Subject: Remove unused 'dsa_cert' variable. ok markus@ --- sbin/iked/crypto.c | 7 +------ sbin/iked/iked.h | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'sbin') diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c index 945bf04666b..59429c5a378 100644 --- a/sbin/iked/crypto.c +++ b/sbin/iked/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.24 2020/04/08 20:04:19 tobhe Exp $ */ +/* $OpenBSD: crypto.c,v 1.25 2020/04/20 20:03:38 tobhe Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -577,8 +577,6 @@ dsa_free(struct iked_dsa *dsa) EVP_MD_CTX_destroy((EVP_MD_CTX *)dsa->dsa_ctx); if (dsa->dsa_key) EVP_PKEY_free(dsa->dsa_key); - if (dsa->dsa_cert) - X509_free(dsa->dsa_cert); } ibuf_release(dsa->dsa_keydata); @@ -609,7 +607,6 @@ dsa_setkey(struct iked_dsa *dsa, void *key, size_t keylen, uint8_t type) goto sslerr; if ((pkey = X509_get_pubkey(cert)) == NULL) goto sslerr; - dsa->dsa_cert = cert; dsa->dsa_key = pkey; break; case IKEV2_CERT_RSA_KEY: @@ -629,7 +626,6 @@ dsa_setkey(struct iked_dsa *dsa, void *key, size_t keylen, uint8_t type) goto sslerr; RSA_free(rsa); /* pkey now has the reference */ - dsa->dsa_cert = NULL; dsa->dsa_key = pkey; break; case IKEV2_CERT_ECDSA: @@ -647,7 +643,6 @@ dsa_setkey(struct iked_dsa *dsa, void *key, size_t keylen, uint8_t type) goto sslerr; EC_KEY_free(ec); /* pkey now has the reference */ - dsa->dsa_cert = NULL; dsa->dsa_key = pkey; break; default: diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 609913dda7c..e234af3b509 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.145 2020/04/13 19:10:32 tobhe Exp $ */ +/* $OpenBSD: iked.h,v 1.146 2020/04/20 20:03:38 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -328,7 +328,6 @@ struct iked_dsa { void *dsa_ctx; /* PRF or signature hash ctx */ struct ibuf *dsa_keydata; /* public, private or shared key */ void *dsa_key; /* parsed public or private key */ - void *dsa_cert; /* parsed certificate */ int dsa_hmac; /* HMAC or public/private key */ int dsa_sign; /* Sign or verify operation */ }; -- cgit v1.2.3