From owner-svn-src-all@freebsd.org Wed Jun 5 22:46:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6AAA15BB627; Wed, 5 Jun 2019 22:46:20 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E3EB70424; Wed, 5 Jun 2019 22:46:20 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18414B9B2; Wed, 5 Jun 2019 22:46:20 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x55MkJMq018341; Wed, 5 Jun 2019 22:46:19 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x55MkJvd018338; Wed, 5 Jun 2019 22:46:19 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201906052246.x55MkJvd018338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 5 Jun 2019 22:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348709 - head/sys/geom/eli X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sys/geom/eli X-SVN-Commit-Revision: 348709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E3EB70424 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2019 22:46:21 -0000 Author: oshogbo Date: Wed Jun 5 22:46:18 2019 New Revision: 348709 URL: https://svnweb.freebsd.org/changeset/base/348709 Log: geli: build warning fixes Submitted by: Aaron Prieger Reviewed by: sbruno Differential Revision: https://reviews.freebsd.org/D11068 Modified: head/sys/geom/eli/g_eli.h head/sys/geom/eli/g_eli_hmac.c head/sys/geom/eli/pkcs5v2.c head/sys/geom/eli/pkcs5v2.h Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Wed Jun 5 22:40:49 2019 (r348708) +++ head/sys/geom/eli/g_eli.h Wed Jun 5 22:46:18 2019 (r348709) @@ -721,12 +721,12 @@ struct hmac_ctx { SHA512_CTX outerctx; }; -void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, +void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[], size_t hkeylen); void g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data, size_t datasize); void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize); -void g_eli_crypto_hmac(const uint8_t *hkey, size_t hkeysize, +void g_eli_crypto_hmac(const char hkey[], size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize); void g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key, Modified: head/sys/geom/eli/g_eli_hmac.c ============================================================================== --- head/sys/geom/eli/g_eli_hmac.c Wed Jun 5 22:40:49 2019 (r348708) +++ head/sys/geom/eli/g_eli_hmac.c Wed Jun 5 22:46:18 2019 (r348709) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include void -g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const uint8_t *hkey, +g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[], size_t hkeylen) { u_char k_ipad[128], k_opad[128], key[128]; @@ -110,7 +110,7 @@ g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t } void -g_eli_crypto_hmac(const uint8_t *hkey, size_t hkeysize, const uint8_t *data, +g_eli_crypto_hmac(const char hkey[], size_t hkeysize, const uint8_t *data, size_t datasize, uint8_t *md, size_t mdsize) { struct hmac_ctx ctx; Modified: head/sys/geom/eli/pkcs5v2.c ============================================================================== --- head/sys/geom/eli/pkcs5v2.c Wed Jun 5 22:40:49 2019 (r348708) +++ head/sys/geom/eli/pkcs5v2.c Wed Jun 5 22:46:18 2019 (r348709) @@ -52,7 +52,7 @@ xor(uint8_t *dst, const uint8_t *src, size_t size) void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, - size_t saltsize, const char *passphrase, u_int iterations) + size_t saltsize, const char passphrase[], u_int iterations) { uint8_t md[SHA512_MDLEN], saltcount[saltsize + sizeof(uint32_t)]; uint8_t *counter, *keyp; @@ -97,7 +97,7 @@ static int pkcs5v2_probe(int iterations) { uint8_t key[G_ELI_USERKEYLEN], salt[G_ELI_SALTLEN]; - uint8_t passphrase[] = "passphrase"; + const char passphrase[] = "passphrase"; struct rusage start, end; int usecs; Modified: head/sys/geom/eli/pkcs5v2.h ============================================================================== --- head/sys/geom/eli/pkcs5v2.h Wed Jun 5 22:40:49 2019 (r348708) +++ head/sys/geom/eli/pkcs5v2.h Wed Jun 5 22:46:18 2019 (r348709) @@ -31,7 +31,7 @@ #ifndef _PKCS5V2_H_ #define _PKCS5V2_H_ void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, - size_t saltsize, const char *passphrase, u_int iterations); + size_t saltsize, const char passphrase[], u_int iterations); #ifndef _KERNEL int pkcs5v2_calculate(int usecs); #endif