~ubuntu-branches/ubuntu/quantal/ykclient/quantal

« back to all changes in this revision

Viewing changes to ykclient.h

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen
  • Date: 2012-06-29 07:56:18 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120629075618-se3xmwmzmr4fw71r
Tags: 2.8-1
* New upstream release
* Enable tests again
* Add Fredrik and Simon to uploaders as well as DM-Upload-Allowed: yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ykclient.h --- Prototypes for Yubikey OTP validation client library.
2
2
 *
3
3
 * Written by Simon Josefsson <simon@josefsson.org>.
4
 
 * Copyright (c) 2006, 2007, 2008, 2009, 2011 Yubico AB
 
4
 * Copyright (c) 2006-2012 Yubico AB
5
5
 * All rights reserved.
6
6
 *
7
7
 * Redistribution and use in source and binary forms, with or without
36
36
#include <stdint.h>
37
37
#include <string.h>
38
38
 
 
39
# ifdef __cplusplus
 
40
extern "C"
 
41
{
 
42
# endif
 
43
 
39
44
typedef enum
40
45
{
41
46
  /* Official yubikey client API errors. */
58
63
  YKCLIENT_HEX_DECODE_ERROR,
59
64
  YKCLIENT_BAD_SERVER_SIGNATURE,
60
65
  YKCLIENT_NOT_IMPLEMENTED,
61
 
  YKCLIENT_CURL_PERFORM_ERROR
 
66
  YKCLIENT_CURL_PERFORM_ERROR,
 
67
  YKCLIENT_BAD_INPUT
62
68
} ykclient_rc;
63
69
 
64
70
typedef struct ykclient_st ykclient_t;
86
92
extern void ykclient_set_url_template (ykclient_t * ykc,
87
93
                                       const char *url_template);
88
94
 
 
95
extern int ykclient_set_url_templates (ykclient_t * ykc,
 
96
                                       size_t num_templates, const char **url_templates);
 
97
 
89
98
/* By default the signature returned by the server is verified (modify
90
99
   this choice by calling ykclient_set_verify_signature()). */
91
100
extern void ykclient_set_ca_path (ykclient_t * ykc, const char *ca_path);
114
123
                                   size_t urlcount,
115
124
                                   const char **urls, const char *api_key);
116
125
 
 
126
# ifdef __cplusplus
 
127
}
 
128
# endif
 
129
 
117
130
#endif