Blame lasso/key.h

Packit 228f82
/*
Packit 228f82
 * Lasso - A free implementation of the Liberty Alliance specifications.
Packit 228f82
 *
Packit 228f82
 * Copyright (C) 2004-2011 Entr'ouvert
Packit 228f82
 * http://lasso.entrouvert.org
Packit 228f82
 *
Packit 228f82
 * Authors: See AUTHORS file in top-level directory.
Packit 228f82
 *
Packit 228f82
 * This program is free software; you can redistribute it and/or modify
Packit 228f82
 * it under the terms of the GNU General Public License as published by
Packit 228f82
 * the Free Software Foundation; either version 2 of the License, or
Packit 228f82
 * (at your option) any later version.
Packit 228f82
 *
Packit 228f82
 * This program is distributed in the hope that it will be useful,
Packit 228f82
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 228f82
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 228f82
 * GNU General Public License for more details.
Packit 228f82
 *
Packit 228f82
 * You should have received a copy of the GNU General Public License
Packit 228f82
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
Packit 228f82
 */
Packit 228f82
Packit 228f82
#ifndef __LASSO_KEY_H__
Packit 228f82
#define __LASSO_KEY_H__
Packit 228f82
Packit 228f82
#ifdef __cplusplus
Packit 228f82
extern "C" {
Packit 228f82
#endif /* __cplusplus */
Packit 228f82
Packit 228f82
#include "xml/xml.h"
Packit 228f82
Packit 228f82
#define LASSO_TYPE_KEY (lasso_key_get_type())
Packit 228f82
#define LASSO_KEY(obj) \
Packit 228f82
	(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_KEY, \
Packit 228f82
				LassoKey))
Packit 228f82
#define LASSO_KEY_CLASS(klass) \
Packit 228f82
	(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_KEY, \
Packit 228f82
				LassoKeyClass))
Packit 228f82
#define LASSO_IS_KEY(obj) \
Packit 228f82
	(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_KEY))
Packit 228f82
#define LASSO_IS_KEY_CLASS(klass) \
Packit 228f82
	(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_KEY))
Packit 228f82
#define LASSO_KEY_GET_CLASS(o) \
Packit 228f82
	(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_KEY, \
Packit 228f82
				LassoKeyClass))
Packit 228f82
Packit 228f82
typedef struct _LassoKey LassoKey;
Packit 228f82
typedef struct _LassoKeyClass LassoKeyClass;
Packit 228f82
typedef struct _LassoKeyPrivate LassoKeyPrivate;
Packit 228f82
Packit 228f82
typedef enum _LassoKeyType {
Packit 228f82
	LASSO_KEY_TYPE_FOR_SIGNATURE,
Packit 228f82
} LassoKeyType;
Packit 228f82
Packit 228f82
struct _LassoKey {
Packit 228f82
	LassoNode parent;
Packit 228f82
	/*< private >*/
Packit 228f82
	LassoKeyPrivate *private_data;
Packit 228f82
};
Packit 228f82
Packit 228f82
struct _LassoKeyClass {
Packit 228f82
	LassoNodeClass parent;
Packit 228f82
};
Packit 228f82
Packit 228f82
LASSO_EXPORT GType lasso_key_get_type();
Packit 228f82
Packit 228f82
LASSO_EXPORT LassoKey* lasso_key_new_for_signature_from_memory(const void *buffer, size_t size,
Packit 228f82
		char *password, LassoSignatureMethod signature_method, char *certificate);
Packit 228f82
Packit 228f82
LASSO_EXPORT LassoKey* lasso_key_new_for_signature_from_base64_string(char *base64_string,
Packit 228f82
		char *password, LassoSignatureMethod signature_method, char *certificate);
Packit 228f82
Packit 228f82
LASSO_EXPORT LassoKey* lasso_key_new_for_signature_from_file(char *filename_or_buffer,
Packit 228f82
		char *password, LassoSignatureMethod signature_method, char *certificate);
Packit 228f82
Packit 228f82
LASSO_EXPORT lasso_error_t lasso_key_query_verify(LassoKey* key, const char *query);
Packit 228f82
Packit 228f82
LASSO_EXPORT char* lasso_key_query_sign(LassoKey *key, const char *query);
Packit 228f82
Packit 228f82
LASSO_EXPORT lasso_error_t lasso_key_saml2_xml_verify(LassoKey *key, char *id, xmlNode *document);
Packit 228f82
Packit 228f82
LASSO_EXPORT xmlNode *lasso_key_saml2_xml_sign(LassoKey *key, const char *id, xmlNode *document);
Packit 228f82
Packit 228f82
#ifdef __cplusplus
Packit 228f82
}
Packit 228f82
#endif /* __cplusplus */
Packit 228f82
Packit 228f82
#endif /* __LASSO_KEY_H__ */