Pedro Monreal Gonzalez
fe4b96277c
- Backported support for OAUTH2 authentication from Fetchmail 7.0. - add imap oauthbearer support - support oauthbearer/xoauth2 with pop3 - add passwordfile and passwordfd options - add contrib/fetchnmail-oauth2.py token acquisition utility - FAQ: list gmail options including oauthbearer and app password - give each ctl it's own copy of password - re-read passwordfile on every poll - add query_to64_outsize() utility function - Chase and integrate interface change. - oauth2.c: calculate and pass in correct buffer size to to64frombits() - Increase max password length to handle oauth tokens - Bump max. passwordlen to 10000 bytes. - Add README.OAUTH2 - Added patches: * fetchmail-add-imap-oauthbearer-support.patch * fetchmail-support-oauthbearer-xoauth2-with-pop3.patch * fetchmail-add-passwordfile-and-passwordfd-options.patch * fetchmail-add-contrib-fetchnmail-oauth2.py-token-acquisition-u.patch * fetchmail-FAQ-list-gmail-options-including-oauthbearer-and-app.patch * fetchmail-give-each-ctl-it-s-own-copy-of-password.patch * fetchmail-re-read-passwordfile-on-every-poll.patch * fetchmail-add-query_to64_outsize-utility-function.patch * fetchmail-chase-and-integrate-interface-change.patch * fetchmail-oauth2-c-calculate-and-pass-in-correct-buffer-size-to-to64frombits.patch * fetchmail-increase-max-password-length-to-handle-oauth-tokens.patch * fetchmail-bump-max-passwordlen-to-1bytes.patch * fetchmail-add-readme-oauth2-issue-27.patch OBS-URL: https://build.opensuse.org/request/show/892934 OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=113
43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
From: Matthew Ogilvie <mmogilvi+fml@zoho.com>
|
|
Date: Fri, 21 Dec 2018 09:00:46 -0700
|
|
Subject: add query_to64_outsize() utility function
|
|
Git-repo: https://gitlab.com/fetchmail/fetchmail.git
|
|
Git-commit: cc6e146d516140df800da68976eb7c0aa1cef7c0
|
|
|
|
---
|
|
base64.c | 7 +++++++
|
|
fetchmail.h | 1 +
|
|
2 files changed, 8 insertions(+)
|
|
|
|
diff --git a/base64.c b/base64.c
|
|
index 3cd41691..25393b35 100644
|
|
--- a/base64.c
|
|
+++ b/base64.c
|
|
@@ -61,6 +61,13 @@ fail:
|
|
return rc;
|
|
}
|
|
|
|
+size_t query_to64_outsize(size_t inlen)
|
|
+/* Returns how much space needs to be allocated to receive the output from
|
|
+ * to64frombits(), including the '\0' terminator. */
|
|
+{
|
|
+ return ((inlen+2)/3)*4+1;
|
|
+}
|
|
+
|
|
int from64tobits(void *out_, const char *in, int maxlen)
|
|
/* base 64 to raw bytes in quasi-big-endian order, returning count of bytes */
|
|
/* maxlen limits output buffer size, set to zero to ignore */
|
|
diff --git a/fetchmail.h b/fetchmail.h
|
|
index 8b9dd6c4..2d378942 100644
|
|
--- a/fetchmail.h
|
|
+++ b/fetchmail.h
|
|
@@ -638,6 +638,7 @@ int prc_filecheck(const char *, const flag);
|
|
|
|
/* base64.c */
|
|
int to64frombits(char *, const void *, int inlen, size_t outlen);
|
|
+size_t query_to64_outsize(size_t inlen);
|
|
int from64tobits(void *, const char *, int mxoutlen);
|
|
|
|
/* unmime.c */
|
|
|