pam_pkcs11 0.6.8

- Main Page
- Data Structures
- Files
- Directories

- File List
- Globals

Defines | Functions
uri.h File Reference

This module contains several functions to retrieve data from an URL. More...

`#include <stdlib.h>`

Go to the source code of this file.

## Defines

#define | URI_EXTERN extern

## Functions

URI_EXTERN int | is_uri (const char *path)
URI_EXTERN int | is_file (const char *path)
URI_EXTERN int | is_dir (const char *path)
URI_EXTERN int | is_symlink (const char *path)
URI_EXTERN int | get_from_uri (const char *uri_str, unsigned char **data, size_t *length)
| Downloads data from a given URI.

## Detailed Description

This module contains several functions to retrieve data from an URL.

Some examples of valid URL's:

- file:///home/mario/projects/pkcs11_login/tests/ca_crl_0.pem
- ftp://ftp.rediris.es/certs/rediris_cacert.pem
- http://www-t.zhwin.ch/ca/root_ca.crl
- ldap://directory.verisign.com:389/CN=VeriSign IECA, OU=IECA-3, OU=Contractor, OU=PKI, OU=DOD, O=U.S. Government, C=US?certificateRevocationList;binary

Definition in file uri.h.

## Define Documentation

#define URI_EXTERN extern

Definition at line 39 of file uri.h.

## Function Documentation

URI_EXTERN int get_from_uri | ( | const char * | uri_str,
|  | unsigned char ** | data,
|  | size_t * | length
| ) |  |

Downloads data from a given URI.

Parameters:

  uri_str | URL string where to retrieve data
  data | Pointer to a String buffer where data is retrieved
  length | Length of retrieved data

Returns:
  -1 on error, 0 on sucess

URI_EXTERN int is_dir | ( | const char * | path | ) |

URI_EXTERN int is_file | ( | const char * | path | ) |

URI_EXTERN int is_symlink | ( | const char * | path | ) |

URI_EXTERN int is_uri | ( | const char * | path | ) |