I cleaned up some warnings that I detected and put together another patch:
I also created a macro for the initial prototype:
+#define libssh2_userauth_publickey_frommemory(session, username, publickey, \
+ privatekey, passphrase) \
+ libssh2_userauth_publickey_frommemory_ex((session), (username), \
+ (unsigned int)strlen(username), \
+ (publickey), \
+ (unsigned int)strlen(publickey), \
+ (privatekey), \
+ (unsigned int)strlen(privatekey), \
I just realized that I didn't apply the changes for the documentation of
this new authentication. I'll add it shortly.
I'd really appreciate some feedback.
On Mon, Sep 1, 2014 at 4:06 PM, David Calavera <david.calavera_at_gmail.com>
> I was doing some digging to see how I could pass auth keys by memory when
> I discovered this old thread from 2012 with a patch:
> I'm really interested in seeing this incorporated to libssh2, so I decided to try to address the problems raised in the next message in that thread:
> I created a new patch that addressed part those points. You can see it at:
> I replaced the use of `memcpy_s` to use `memcpy`. I also formatted the
> code to use less that 80 columns.
> I ran `./configure --enable-debug` to try to address the warnings in the
> code, but unfortunately I didn't get any. I'm not sure if I'm doing
> anything wrong, I posted the output here:
> I'd really appreciate if anybody could point me to those warnings if there
> is anything I'm missing.
> As I said, I'm really interested in seeing this merged into libssh2.
> Please, let me know if there is anything else I can help with to make that
Received on 2014-09-02