search for: do_convert_private_ssh2_to_blob

Displaying 1 result from an estimated 1 matches for "do_convert_private_ssh2_to_blob".

2005 May 19
1
ssh-keygen private keys export - new feature
...error("buffer_put_bignum_bits: BN_bn2bin() failed: oi %d != bytes %d", + oi, bytes); + return (-1); + } + + buffer_put_int(b, bignum_bits); + /* Store the binary data. */ + buffer_append(b, (char *)buf, oi); + + memset(buf, 0, bytes); + xfree(buf); + + return (0); +} + +static int +do_convert_private_ssh2_to_blob(const Key *key, u_char **blobp, u_int *lenp) +{ + Buffer b; + int len, len1; + char *pb; + + if (key == NULL) { + error("do_convert_private_ssh2_to_blob: key == NULL"); + return 0; + } + buffer_init(&b); + buffer_put_int(&b, SSH_COM_PRIVATE_KEY_MAGIC); + buffer_put_int(&b, 0...