version 1.25, 2015/11/16 22:50:01 |
version 1.26, 2015/11/16 23:47:52 |
|
|
return SSH_ERR_BIGNUM_TOO_LARGE; |
return SSH_ERR_BIGNUM_TOO_LARGE; |
if (cp[e] == '\0') |
if (cp[e] == '\0') |
skip = 0; |
skip = 0; |
else if (index(" \t\r\n", cp[e]) == NULL) |
else if (strchr(" \t\r\n", cp[e]) == NULL) |
return SSH_ERR_INVALID_FORMAT; |
return SSH_ERR_INVALID_FORMAT; |
cp[e] = '\0'; |
cp[e] = '\0'; |
if (BN_dec2bn(&v, cp) <= 0) |
if (BN_dec2bn(&v, cp) <= 0) |
|
|
#ifdef WITH_SSH1 |
#ifdef WITH_SSH1 |
/* Get number of bits. */ |
/* Get number of bits. */ |
bits = strtoul(cp, &ep, 10); |
bits = strtoul(cp, &ep, 10); |
if (*cp == '\0' || index(" \t\r\n", *ep) == NULL || |
if (*cp == '\0' || strchr(" \t\r\n", *ep) == NULL || |
bits == 0 || bits > SSHBUF_MAX_BIGNUM * 8) |
bits == 0 || bits > SSHBUF_MAX_BIGNUM * 8) |
return SSH_ERR_INVALID_FORMAT; /* Bad bit count... */ |
return SSH_ERR_INVALID_FORMAT; /* Bad bit count... */ |
/* Get public exponent, public modulus. */ |
/* Get public exponent, public modulus. */ |