geli: partially revert r348709
Let's change the unsigned arguments to the signed one, but let's don't change pointers to the array notation. Requested by: pjd
This commit is contained in:
parent
705aad98c6
commit
e7630efbe6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349000
@ -721,12 +721,12 @@ struct hmac_ctx {
|
|||||||
SHA512_CTX outerctx;
|
SHA512_CTX outerctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[],
|
void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey,
|
||||||
size_t hkeylen);
|
size_t hkeylen);
|
||||||
void g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data,
|
void g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data,
|
||||||
size_t datasize);
|
size_t datasize);
|
||||||
void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize);
|
void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize);
|
||||||
void g_eli_crypto_hmac(const char 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);
|
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,
|
void g_eli_key_fill(struct g_eli_softc *sc, struct g_eli_key *key,
|
||||||
|
@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <geom/eli/g_eli.h>
|
#include <geom/eli/g_eli.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char hkey[],
|
g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey,
|
||||||
size_t hkeylen)
|
size_t hkeylen)
|
||||||
{
|
{
|
||||||
u_char k_ipad[128], k_opad[128], key[128];
|
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 *md, size_t mdsize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
g_eli_crypto_hmac(const char 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)
|
size_t datasize, uint8_t *md, size_t mdsize)
|
||||||
{
|
{
|
||||||
struct hmac_ctx ctx;
|
struct hmac_ctx ctx;
|
||||||
|
@ -52,7 +52,7 @@ xor(uint8_t *dst, const uint8_t *src, size_t size)
|
|||||||
|
|
||||||
void
|
void
|
||||||
pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt,
|
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 md[SHA512_MDLEN], saltcount[saltsize + sizeof(uint32_t)];
|
||||||
uint8_t *counter, *keyp;
|
uint8_t *counter, *keyp;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#ifndef _PKCS5V2_H_
|
#ifndef _PKCS5V2_H_
|
||||||
#define _PKCS5V2_H_
|
#define _PKCS5V2_H_
|
||||||
void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt,
|
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
|
#ifndef _KERNEL
|
||||||
int pkcs5v2_calculate(int usecs);
|
int pkcs5v2_calculate(int usecs);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user