2005-10-07 18:59:50 +00:00
|
|
|
/*
|
2005-11-29 20:54:36 +00:00
|
|
|
+--------------------------------------------------------------------+
|
|
|
|
| PECL :: gnupg |
|
|
|
|
+--------------------------------------------------------------------+
|
|
|
|
| Redistribution and use in source and binary forms, with or without |
|
|
|
|
| modification, are permitted provided that the conditions mentioned |
|
|
|
|
| in the accompanying LICENSE file are met. |
|
|
|
|
+--------------------------------------------------------------------+
|
2006-03-16 15:52:43 +00:00
|
|
|
| Copyright (c) 2006, Thilo Raufeisen <traufeisen@php.net> |
|
2013-07-08 14:11:30 +00:00
|
|
|
| Copyright (c) 2013, Jim Jagielski <jimjag@php.net> |
|
2016-05-22 17:52:23 +00:00
|
|
|
| Copyright (c) 2016, Jakub Zelenka <bukka@php.net> |
|
2005-11-29 20:54:36 +00:00
|
|
|
+--------------------------------------------------------------------+
|
2005-10-07 18:59:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PHP_GNUPG_H
|
|
|
|
#define PHP_GNUPG_H
|
|
|
|
|
|
|
|
extern zend_module_entry gnupg_module_entry;
|
|
|
|
#define phpext_gnupg_ptr &gnupg_module_entry
|
|
|
|
|
2016-08-29 19:05:08 +00:00
|
|
|
#define PHP_GNUPG_VERSION "1.4.0"
|
2008-03-31 09:39:35 +00:00
|
|
|
|
2005-10-07 18:59:50 +00:00
|
|
|
#ifdef PHP_WIN32
|
|
|
|
#define PHP_GNUPG_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define PHP_GNUPG_API
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ZTS
|
|
|
|
#include "TSRM.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gpgme.h>
|
2016-05-21 20:27:06 +00:00
|
|
|
#include "phpc/phpc.h"
|
2005-10-07 18:59:50 +00:00
|
|
|
|
2016-05-21 20:27:06 +00:00
|
|
|
PHPC_OBJ_STRUCT_BEGIN(gnupg)
|
2005-10-07 18:59:50 +00:00
|
|
|
gpgme_ctx_t ctx;
|
2016-05-21 20:27:06 +00:00
|
|
|
gpgme_error_t err;
|
|
|
|
int errormode;
|
|
|
|
char* errortxt;
|
|
|
|
int signmode;
|
|
|
|
gpgme_key_t *encryptkeys;
|
|
|
|
unsigned int encrypt_size;
|
|
|
|
HashTable *signkeys;
|
|
|
|
HashTable *decryptkeys;
|
|
|
|
PHPC_OBJ_STRUCT_END()
|
2005-10-07 18:59:50 +00:00
|
|
|
|
|
|
|
PHP_MINIT_FUNCTION(gnupg);
|
|
|
|
PHP_MSHUTDOWN_FUNCTION(gnupg);
|
|
|
|
PHP_MINFO_FUNCTION(gnupg);
|
|
|
|
|
|
|
|
PHP_FUNCTION(gnupg_keyinfo);
|
|
|
|
PHP_FUNCTION(gnupg_verify);
|
|
|
|
PHP_FUNCTION(gnupg_geterror);
|
|
|
|
PHP_FUNCTION(gnupg_setsignmode);
|
|
|
|
PHP_FUNCTION(gnupg_setarmor);
|
|
|
|
PHP_FUNCTION(gnupg_sign);
|
2005-10-24 17:33:59 +00:00
|
|
|
PHP_FUNCTION(gnupg_clearsignkeys);
|
|
|
|
PHP_FUNCTION(gnupg_clearencryptkeys);
|
2005-10-25 16:28:23 +00:00
|
|
|
PHP_FUNCTION(gnupg_cleardecryptkeys);
|
2005-10-07 18:59:50 +00:00
|
|
|
PHP_FUNCTION(gnupg_getprotocol);
|
|
|
|
PHP_FUNCTION(gnupg_encrypt);
|
2005-10-09 15:55:02 +00:00
|
|
|
PHP_FUNCTION(gnupg_encryptsign);
|
2005-10-07 18:59:50 +00:00
|
|
|
PHP_FUNCTION(gnupg_decrypt);
|
2017-09-07 23:29:31 +00:00
|
|
|
PHP_FUNCTION(gnupg_messagekeys);
|
2005-10-09 15:55:02 +00:00
|
|
|
PHP_FUNCTION(gnupg_decryptverify);
|
2005-10-07 18:59:50 +00:00
|
|
|
PHP_FUNCTION(gnupg_export);
|
2005-10-15 14:42:56 +00:00
|
|
|
PHP_FUNCTION(gnupg_import);
|
2005-10-18 12:40:03 +00:00
|
|
|
PHP_FUNCTION(gnupg_init);
|
2005-10-24 17:33:59 +00:00
|
|
|
PHP_FUNCTION(gnupg_addsignkey);
|
|
|
|
PHP_FUNCTION(gnupg_addencryptkey);
|
2005-10-25 16:28:23 +00:00
|
|
|
PHP_FUNCTION(gnupg_adddecryptkey);
|
|
|
|
PHP_FUNCTION(gnupg_deletekey);
|
|
|
|
PHP_FUNCTION(gnupg_gettrustlist);
|
|
|
|
PHP_FUNCTION(gnupg_listsignatures);
|
2005-11-12 14:07:59 +00:00
|
|
|
PHP_FUNCTION(gnupg_seterrormode);
|
2005-10-07 18:59:50 +00:00
|
|
|
|
|
|
|
#ifdef ZTS
|
|
|
|
#define GNUPG_G(v) TSRMG(gnupg_globals_id, zend_gnupg_globals *, v)
|
|
|
|
#else
|
|
|
|
#define GNUPG_G(v) (gnupg_globals.v)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* PHP_GNUPG_H */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* End:
|
|
|
|
* vim600: noet sw=4 ts=4 fdm=marker
|
|
|
|
* vim<600: noet sw=4 ts=4
|
|
|
|
*/
|