Displaying 1 result from an estimated 1 matches for "ssh_com_private_key_magic".
2005 May 19
1
ssh-keygen private keys export - new feature
...N "---- BEGIN SSH2 PUBLIC KEY ----"
#define SSH_COM_PUBLIC_END "---- END SSH2 PUBLIC KEY ----"
#define SSH_COM_PRIVATE_BEGIN "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----"
+#define SSH_COM_PRIVATE_END "---- END SSH2 ENCRYPTED PRIVATE KEY ----"
#define SSH_COM_PRIVATE_KEY_MAGIC 0x3f6ff9eb
+static int
+buffer_put_bignum_bits(Buffer *b, const BIGNUM *value)
+{
+ u_int bignum_bits = BN_num_bits(value);
+ u_int bytes = (bignum_bits + 7) / 8;
+ u_char *buf = xmalloc(bytes);
+ int oi;
+
+ /* Get the value of in binary */
+ oi = BN_bn2bin(value, buf);
+ if (oi != bytes) {
+ er...