1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_SSH_AUTH_TYPES (3) 9 - CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 (3) 10 - CURLOPT_SSH_KNOWNHOSTS (3) 11 - CURLOPT_SSH_PUBLIC_KEYFILE (3) 12--- 13 14# NAME 15 16CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 - MD5 checksum of SSH server public key 17 18# SYNOPSIS 19 20~~~c 21#include <curl/curl.h> 22 23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, 24 char *md5); 25~~~ 26 27# DESCRIPTION 28 29Pass a char pointer pointing to a string containing 32 hexadecimal digits. The 30string should be the 128 bit MD5 checksum of the remote host's public key, and 31libcurl aborts the connection to the host unless the MD5 checksum match. 32 33MD5 is a weak algorithm. We strongly recommend using 34CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256(3) instead. 35 36The application does not have to keep the string around after setting this 37option. 38 39# DEFAULT 40 41NULL 42 43# PROTOCOLS 44 45SCP and SFTP 46 47# EXAMPLE 48 49~~~c 50int main(void) 51{ 52 CURL *curl = curl_easy_init(); 53 if(curl) { 54 CURLcode res; 55 curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file"); 56 curl_easy_setopt(curl, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, 57 "afe17cd62a0f3b61f1ab9cb22ba269a7"); 58 res = curl_easy_perform(curl); 59 curl_easy_cleanup(curl); 60 } 61} 62~~~ 63 64# AVAILABILITY 65 66Added in 7.17.1 67 68# RETURN VALUE 69 70Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 71CURLE_OUT_OF_MEMORY if there was insufficient heap space. 72