mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-25 03:12:10 +00:00
- djm@cvs.openbsd.org 2013/07/12 00:20:00
[sftp.c ssh-keygen.c ssh-pkcs11.c] fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
This commit is contained in:
parent
ce98654674
commit
746d1a6c52
@ -41,6 +41,9 @@
|
||||
[auth-options.c auth-rsa.c bufaux.c buffer.h channels.c hostfile.c]
|
||||
[hostfile.h mux.c packet.c packet.h roaming_common.c serverloop.c]
|
||||
fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
|
||||
- djm@cvs.openbsd.org 2013/07/12 00:20:00
|
||||
[sftp.c ssh-keygen.c ssh-pkcs11.c]
|
||||
fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
|
||||
|
||||
20130702
|
||||
- (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config
|
||||
|
5
sftp.c
5
sftp.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: sftp.c,v 1.146 2013/06/04 20:42:36 dtucker Exp $ */
|
||||
/* $OpenBSD: sftp.c,v 1.147 2013/07/12 00:20:00 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||
*
|
||||
@ -1830,7 +1830,8 @@ static unsigned char
|
||||
complete(EditLine *el, int ch)
|
||||
{
|
||||
char **argv, *line, quote;
|
||||
u_int argc, carg, cursor, len, terminated, ret = CC_ERROR;
|
||||
int argc, carg;
|
||||
u_int cursor, len, terminated, ret = CC_ERROR;
|
||||
const LineInfo *lf;
|
||||
struct complete_ctx *complete_ctx;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ssh-keygen.c,v 1.227 2013/05/17 00:13:14 djm Exp $ */
|
||||
/* $OpenBSD: ssh-keygen.c,v 1.228 2013/07/12 00:20:00 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -524,7 +524,7 @@ do_convert_from_ssh2(struct passwd *pw, Key **k, int *private)
|
||||
fatal("%s: %s: %s", __progname, identity_file, strerror(errno));
|
||||
encoded[0] = '\0';
|
||||
while ((blen = get_line(fp, line, sizeof(line))) != -1) {
|
||||
if (line[blen - 1] == '\\')
|
||||
if (blen > 0 && line[blen - 1] == '\\')
|
||||
escaped++;
|
||||
if (strncmp(line, "----", 4) == 0 ||
|
||||
strstr(line, ": ") != NULL) {
|
||||
@ -1797,7 +1797,8 @@ add_cert_option(char *opt)
|
||||
static void
|
||||
show_options(const Buffer *optbuf, int v00, int in_critical)
|
||||
{
|
||||
u_char *name, *data;
|
||||
char *name;
|
||||
u_char *data;
|
||||
u_int dlen;
|
||||
Buffer options, option;
|
||||
|
||||
|
12
ssh-pkcs11.c
12
ssh-pkcs11.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ssh-pkcs11.c,v 1.7 2013/05/17 00:13:14 djm Exp $ */
|
||||
/* $OpenBSD: ssh-pkcs11.c,v 1.8 2013/07/12 00:20:00 djm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2010 Markus Friedl. All rights reserved.
|
||||
*
|
||||
@ -263,8 +263,8 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa,
|
||||
pin = read_passphrase(prompt, RP_ALLOW_EOF);
|
||||
if (pin == NULL)
|
||||
return (-1); /* bail out */
|
||||
if ((rv = f->C_Login(si->session, CKU_USER, pin, strlen(pin)))
|
||||
!= CKR_OK) {
|
||||
if ((rv = f->C_Login(si->session, CKU_USER,
|
||||
(u_char *)pin, strlen(pin))) != CKR_OK) {
|
||||
free(pin);
|
||||
error("C_Login failed: %lu", rv);
|
||||
return (-1);
|
||||
@ -328,7 +328,7 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
|
||||
|
||||
/* remove trailing spaces */
|
||||
static void
|
||||
rmspace(char *buf, size_t len)
|
||||
rmspace(u_char *buf, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@ -366,8 +366,8 @@ pkcs11_open_session(struct pkcs11_provider *p, CK_ULONG slotidx, char *pin)
|
||||
return (-1);
|
||||
}
|
||||
if (login_required && pin) {
|
||||
if ((rv = f->C_Login(session, CKU_USER, pin, strlen(pin)))
|
||||
!= CKR_OK) {
|
||||
if ((rv = f->C_Login(session, CKU_USER,
|
||||
(u_char *)pin, strlen(pin))) != CKR_OK) {
|
||||
error("C_Login failed: %lu", rv);
|
||||
if ((rv = f->C_CloseSession(session)) != CKR_OK)
|
||||
error("C_CloseSession failed: %lu", rv);
|
||||
|
Loading…
Reference in New Issue
Block a user