New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURLOPT_SSH_HOSTKEY_FUNCTION #7959
Conversation
I don't know how to squash all those commit ... |
@mickae1 do a |
thanks, it's done :) . |
I don't get what this error means : Where is this file lib1521.c ?? dynamically created ? From which conf file ? |
|
Ok, Corrected. But there is a lot of error due to ".libs/libcurlu.a(libcurlu_la-libssh2.o) has no symbols" Some times : I don't understand why ..... I've a warning about: But I don't know how to fix it ..... other error like: |
Do you think it's possible to put this pull in the version 7.79.2 ? |
The next release will be 7.80.0 and it has been closed for new features (such as this) for a few weeks already. Your PR's earliest chance is for a 7.81.0 release. Which might ship on January 5, 2022. |
Ok, the files has been modified accordingly . |
int keylen); /*length of the key*/ | ||
|
||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOSTKEYCHECK_FUNCTION, | ||
ssh_hostkeycheck_callback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's missing .fi
there as a last line of the SYNOPSIS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but in this file it's working, there is no .fi
I've clone the file and change only the text.
https://github.com/curl/curl/blob/master/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3#L62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried :
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOSTKEYDATA, void *pointer);
.fi
8212073
to
c3b6bb0
Compare
@bagder , can you give me some hints to make this pull successful ? Thank you, |
Hi @Badger, Can you give me some news ? Because I would like to have this feature for the next release :) Thanks, |
The featurewindow for the next release is closed, so this feature didn't make it in for the January 5 release. |
Ok, can you tell me what I've to do for the next next release ? What release would it be ? 7.82.0 ? |
I haven't been following along so I can't comment on the status of the work, and what might remain. I'll try to find some time to review it to see.
Correct, that's the next possible feature release. |
@danielgustafsson thank you, I've made the change needed, I will wait for your review, thank you ! |
Also run checksrc script locally and resolve all warnings. |
@MAntoniak Thanks.
I tried to start checksrc.bat on my windows machine, but I got no message :( |
@MAntoniak @bagder, looks OK to me, no ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this generally looks good. I only found some small things...
SCP and SFTP | ||
.SH EXAMPLE | ||
.nf | ||
int curl_sshhostkeycallback(void *clientp,/* custom pointer passed with CURLOPT_SSH_HOSTKEYDATA */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should avoid curl_
as a prefix for an example function, as we use that for public API functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the same syntax as this function ;
curl_sshkeycallback in the file curl.h line 867
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should I do ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just rename it without the leading curl_
prefix?
Pass a pointer to your callback function, which should match the prototype | ||
shown above. It overrides CURLOPT_SSH_KNOWNHOSTS. | ||
|
||
It gets called to act and decide for libcurl how to proceed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when is it called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok => It gets called when the verification of the hostkey is needed.
} | ||
.fi | ||
.SH AVAILABILITY | ||
Added in 7.82.0 , work only with libssh2 backend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 7.84.0, works only with libssh2 backend.
Oh, and we need a test or two. |
@bagder I would like to add some test, but I could n't find any test for CURLOPT_SSH_KEYFUNCTION to use a as a model.... |
8098b08
to
dbe4b54
Compare
I squashed every thing, it's better now :) |
@bagder @MAntoniak please :) |
SCP and SFTP | ||
.SH EXAMPLE | ||
.nf | ||
int curl_sshhostkeycallback(void *clientp,/* custom pointer passed with CURLOPT_SSH_HOSTKEYDATA */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just rename it without the leading curl_
prefix?
715b306
to
162d4a5
Compare
CURLOPT_SSH_HOSTKEYCHECK_FUNCTION The callback defined by CURLOPT_SSH_HOSTKEYCHECK_FUNCTION is called to check wether or not the connexion should continue. the host key is passed in argument with a custom handle for the application. It overrides CURLOPT_SSH_KNOWNHOSTS
@bagder please pleaase :) |
@bagder @danielgustafsson @MAntoniak ? please, I know you are busy , but I would like to have it for the next release :( |
Thanks. I did some minor edits before this landed. |
thank you very much all of you for your help :) |
The callback defined by CURLOPT_SSH_HOSTKEYCHECK_FUNCTION is called to check wether or not the connexion should continue.
the host key is passed in argument with a custom handle for the application.