summaryrefslogtreecommitdiff
path: root/src/rexmpp.h
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2020-11-19 07:02:48 +0300
committerdefanor <defanor@uberspace.net>2020-11-19 07:02:48 +0300
commitf56e6496224eb5b997facfe80d9d6262c9296f93 (patch)
tree97375b7996902026c1448e43bb74426d0a1e2725 /src/rexmpp.h
parent19428c30ba198bf96c875f1574db99a1677df00d (diff)
Implement XEP-0373: OpenPGP for XMPP
Various checks and utility functions should still be added, and it currently relies on gpg(1) for key generation and validation, but PEP-based key distribution and basic OpenPGP functionality are there.
Diffstat (limited to 'src/rexmpp.h')
-rw-r--r--src/rexmpp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/rexmpp.h b/src/rexmpp.h
index 53f2cba..e1cfe0e 100644
--- a/src/rexmpp.h
+++ b/src/rexmpp.h
@@ -14,6 +14,7 @@
#include <gnutls/gnutls.h>
#include <gsasl.h>
#include <libxml/tree.h>
+#include <gpgme.h>
#include "rexmpp_tcp.h"
#include "rexmpp_socks.h"
#include "rexmpp_dns.h"
@@ -177,6 +178,8 @@ enum rexmpp_err {
REXMPP_E_SEND_BUFFER_NOT_EMPTY,
/** SASL-related error. */
REXMPP_E_SASL,
+ /** OpenGPG-related error. */
+ REXMPP_E_PGP,
/** TLS-related error. */
REXMPP_E_TLS,
/** TCP-related error. */
@@ -243,6 +246,7 @@ struct rexmpp
int track_roster_presence;
int track_roster_events;
int nick_notifications;
+ int retrieve_openpgp_keys;
/* Resource limits. */
uint32_t stanza_queue_size;
@@ -336,6 +340,9 @@ struct rexmpp
/* SASL structures. */
Gsasl *sasl_ctx;
Gsasl_session *sasl_session;
+
+ /* OpenPGP structures */
+ gpgme_ctx_t pgp_ctx;
};
/**
@@ -482,4 +489,9 @@ int rexmpp_xml_match (xmlNodePtr node,
xmlNodePtr rexmpp_xml_find_child (xmlNodePtr node,
const char *namespace,
const char *name);
+
+xmlNodePtr rexmpp_find_event (rexmpp_t *s,
+ const char *from,
+ const char *node,
+ xmlNodePtr *prev_event);
#endif