|
Packit Service |
3749ba |
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#include <stdlib.h>
|
|
Packit Service |
3749ba |
#include "p11-kit/p11-kit.h"
|
|
Packit Service |
3749ba |
/*
|
|
Packit Service |
3749ba |
* Copyright (c) 2011 Collabora Ltd.
|
|
Packit Service |
3749ba |
*
|
|
Packit Service |
3749ba |
* Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
3749ba |
* modification, are permitted provided that the following conditions
|
|
Packit Service |
3749ba |
* are met:
|
|
Packit Service |
3749ba |
*
|
|
Packit Service |
3749ba |
* * Redistributions of source code must retain the above
|
|
Packit Service |
3749ba |
* copyright notice, this list of conditions and the
|
|
Packit Service |
3749ba |
* following disclaimer.
|
|
Packit Service |
3749ba |
* * Redistributions in binary form must reproduce the
|
|
Packit Service |
3749ba |
* above copyright notice, this list of conditions and
|
|
Packit Service |
3749ba |
* the following disclaimer in the documentation and/or
|
|
Packit Service |
3749ba |
* other materials provided with the distribution.
|
|
Packit Service |
3749ba |
* * The names of contributors to this software may not be
|
|
Packit Service |
3749ba |
* used to endorse or promote products derived from this
|
|
Packit Service |
3749ba |
* software without specific prior written permission.
|
|
Packit Service |
3749ba |
*
|
|
Packit Service |
3749ba |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
Packit Service |
3749ba |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
Packit Service |
3749ba |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
Packit Service |
3749ba |
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
Packit Service |
3749ba |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
Packit Service |
3749ba |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
Packit Service |
3749ba |
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
Packit Service |
3749ba |
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
Packit Service |
3749ba |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit Service |
3749ba |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
Packit Service |
3749ba |
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
|
Packit Service |
3749ba |
* DAMAGE.
|
|
Packit Service |
3749ba |
*
|
|
Packit Service |
3749ba |
* Author: Stef Walter <stefw@collabora.co.uk>
|
|
Packit Service |
3749ba |
*/
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#ifndef P11_KIT_PIN_H
|
|
Packit Service |
3749ba |
#define P11_KIT_PIN_H
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#include <p11-kit/uri.h>
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#ifdef __cplusplus
|
|
Packit Service |
3749ba |
extern "C" {
|
|
Packit Service |
3749ba |
#endif
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
typedef struct p11_kit_pin P11KitPin;
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
typedef enum {
|
|
Packit Service |
3749ba |
P11_KIT_PIN_FLAGS_USER_LOGIN = 1<<0,
|
|
Packit Service |
3749ba |
P11_KIT_PIN_FLAGS_SO_LOGIN = 1<<1,
|
|
Packit Service |
3749ba |
P11_KIT_PIN_FLAGS_CONTEXT_LOGIN = 1<<2,
|
|
Packit Service |
3749ba |
P11_KIT_PIN_FLAGS_RETRY = 1<<3,
|
|
Packit Service |
3749ba |
P11_KIT_PIN_FLAGS_MANY_TRIES = 1<<4,
|
|
Packit Service |
3749ba |
P11_KIT_PIN_FLAGS_FINAL_TRY = 1<<5
|
|
Packit Service |
3749ba |
} P11KitPinFlags;
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#define P11_KIT_PIN_FALLBACK ""
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
typedef void (*p11_kit_pin_destroy_func) (void *data);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
P11KitPin* p11_kit_pin_new (const unsigned char *value,
|
|
Packit Service |
3749ba |
size_t length);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
P11KitPin* p11_kit_pin_new_for_string (const char *value);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
P11KitPin* p11_kit_pin_new_for_buffer (unsigned char *buffer,
|
|
Packit Service |
3749ba |
size_t length,
|
|
Packit Service |
3749ba |
p11_kit_pin_destroy_func destroy);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
P11KitPin* p11_kit_pin_ref (P11KitPin *pin);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
void p11_kit_pin_unref (P11KitPin *pin);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
const unsigned char * p11_kit_pin_get_value (P11KitPin *pin,
|
|
Packit Service |
3749ba |
size_t *length);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
size_t p11_kit_pin_get_length (P11KitPin *pin);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
typedef P11KitPin* (*p11_kit_pin_callback) (const char *pin_source,
|
|
Packit Service |
3749ba |
P11KitUri *pin_uri,
|
|
Packit Service |
3749ba |
const char *pin_description,
|
|
Packit Service |
3749ba |
P11KitPinFlags pin_flags,
|
|
Packit Service |
3749ba |
void *callback_data);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
int p11_kit_pin_register_callback (const char *pin_source,
|
|
Packit Service |
3749ba |
p11_kit_pin_callback callback,
|
|
Packit Service |
3749ba |
void *callback_data,
|
|
Packit Service |
3749ba |
p11_kit_pin_destroy_func callback_destroy);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
void p11_kit_pin_unregister_callback (const char *pin_source,
|
|
Packit Service |
3749ba |
p11_kit_pin_callback callback,
|
|
Packit Service |
3749ba |
void *callback_data);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
P11KitPin* p11_kit_pin_request (const char *pin_source,
|
|
Packit Service |
3749ba |
P11KitUri *pin_uri,
|
|
Packit Service |
3749ba |
const char *pin_description,
|
|
Packit Service |
3749ba |
P11KitPinFlags pin_flags);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
P11KitPin* p11_kit_pin_file_callback (const char *pin_source,
|
|
Packit Service |
3749ba |
P11KitUri *pin_uri,
|
|
Packit Service |
3749ba |
const char *pin_description,
|
|
Packit Service |
3749ba |
P11KitPinFlags pin_flags,
|
|
Packit Service |
3749ba |
void *callback_data);
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#ifdef __cplusplus
|
|
Packit Service |
3749ba |
} /* extern "C" */
|
|
Packit Service |
3749ba |
#endif
|
|
Packit Service |
3749ba |
|
|
Packit Service |
3749ba |
#endif /* P11_KIT_URI_H */
|
|
Packit Service |
3749ba |
void *p11_kit_pin_gnu_c_funcs[] = {
|
|
Packit Service |
3749ba |
p11_kit_pin_new,
|
|
Packit Service |
3749ba |
p11_kit_pin_new_for_string,
|
|
Packit Service |
3749ba |
p11_kit_pin_new_for_buffer,
|
|
Packit Service |
3749ba |
p11_kit_pin_ref,
|
|
Packit Service |
3749ba |
p11_kit_pin_unref,
|
|
Packit Service |
3749ba |
p11_kit_pin_get_value,
|
|
Packit Service |
3749ba |
p11_kit_pin_get_length,
|
|
Packit Service |
3749ba |
p11_kit_pin_register_callback,
|
|
Packit Service |
3749ba |
p11_kit_pin_unregister_callback,
|
|
Packit Service |
3749ba |
p11_kit_pin_request,
|
|
Packit Service |
3749ba |
p11_kit_pin_file_callback,
|
|
Packit Service |
3749ba |
};
|