from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209580

userrating:


May 25th. 2007:
Words

486

Views

258587

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149876

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





curl_easy_ssls_import

Section: C Library Functions (3)
Updated: 202-0-19
Index Return to Main Contents
 

NAME

curl_easy_ssls_import - import SSL sessions  

SYNOPSIS

#include <curl/curl.h>

CURLcode curl_easy_ssls_import(CURL *handle,
                               const char *session_key,
                               const unsigned char *shmac, size_t shmac_len,
                               const unsigned char *sdata, size_t sdata_len);
 

DESCRIPTION

This function imports a previously exported SSL session ticket. sdata and sdata_len must always be provided. If session_key is NULL, then shmac and shmac_len must be given as received during the export. See curl_easy_ssls_export(3) for a description of those.

Import of session tickets from other curl versions may fail due to changes in the handling of shmac or sdata. A session ticket which has already expired is silently discarded.  

PROTOCOLS

This functionality affects all TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.

This option works only with the following TLS backends: GnuTLS, OpenSSL, mbedTLS and wolfSSL  

EXAMPLE

int main(void)
{
  CURLSHcode sh;
  CURLSH *share = curl_share_init();
  CURLcode result;
  CURL *curl;

  sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
  if(sh)
    printf("Error: %sn", curl_share_strerror(sh));

  curl = curl_easy_init();
  if(curl) {
    extern unsigned char *shmac, *sdata;
    size_t hlen = 4, slen = 5;

    curl_easy_setopt(curl, CURLOPT_SHARE, share);

    /* read shmac and sdata from storage */
    result = curl_easy_ssls_import(curl, NULL, shmac, hlen, sdata, slen);

    /* always cleanup */
    curl_easy_cleanup(curl);
  }
  curl_share_cleanup(share);
}
 

AVAILABILITY

Added in curl 8.12.0  

RETURN VALUE

This function returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3). If CURLOPT_ERRORBUFFER(3) was set with curl_easy_setopt(3) there can be an error message stored in the error buffer when non-zero is returned.  

SEE ALSO

CURLOPT_SHARE(3), curl_easy_ssls_export(3), curl_share_setopt(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
PROTOCOLS
EXAMPLE
AVAILABILITY
RETURN VALUE
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 15.0 ms