| 1 |
From: Brian May <[email protected]> |
| 2 |
Date: Wed, 26 Apr 2017 06:34:52 +1000 |
| 3 |
Subject: Add back in base64_encode and base64_decode |
| 4 |
|
| 5 |
These functions were removed upstream. See |
| 6 |
https://github.com/heimdal/heimdal/issues/107 |
| 7 |
|
| 8 |
Unfortunately the SONAME was not incremented for libroken. This could |
| 9 |
cause breakage. This change reintroduces the old names until the SONAME |
| 10 |
can be incremented. |
| 11 |
--- |
| 12 |
lib/roken/base64.c | 12 ++++++++++++ |
| 13 |
lib/roken/base64.h | 6 ++++++ |
| 14 |
lib/roken/version-script.map | 2 ++ |
| 15 |
3 files changed, 20 insertions(+) |
| 16 |
|
| 17 |
diff --git a/lib/roken/base64.c b/lib/roken/base64.c |
| 18 |
index 6ee4899..76364a5 100644 |
| 19 |
--- a/lib/roken/base64.c |
| 20 |
+++ b/lib/roken/base64.c |
| 21 |
@@ -51,6 +51,18 @@ pos(char c) |
| 22 |
return -1; |
| 23 |
} |
| 24 |
|
| 25 |
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
| 26 |
+base64_encode(const void *data, int size, char **str) |
| 27 |
+{ |
| 28 |
+ return rk_base64_encode(data, size, str); |
| 29 |
+} |
| 30 |
+ |
| 31 |
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
| 32 |
+base64_decode(const char *str, void *data) |
| 33 |
+{ |
| 34 |
+ return rk_base64_decode(str, data); |
| 35 |
+} |
| 36 |
+ |
| 37 |
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
| 38 |
rk_base64_encode(const void *data, int size, char **str) |
| 39 |
{ |
| 40 |
diff --git a/lib/roken/base64.h b/lib/roken/base64.h |
| 41 |
index 734a6b5..f5d094f 100644 |
| 42 |
--- a/lib/roken/base64.h |
| 43 |
+++ b/lib/roken/base64.h |
| 44 |
@@ -46,6 +46,12 @@ |
| 45 |
#endif |
| 46 |
#endif |
| 47 |
|
| 48 |
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
| 49 |
+base64_encode(const void *, int, char **); |
| 50 |
+ |
| 51 |
+ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
| 52 |
+base64_decode(const char *, void *); |
| 53 |
+ |
| 54 |
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL |
| 55 |
rk_base64_encode(const void *, int, char **); |
| 56 |
|
| 57 |
diff --git a/lib/roken/version-script.map b/lib/roken/version-script.map |
| 58 |
index ccd5925..1929732 100644 |
| 59 |
--- a/lib/roken/version-script.map |
| 60 |
+++ b/lib/roken/version-script.map |
| 61 |
@@ -2,6 +2,8 @@ HEIMDAL_ROKEN_1.0 { |
| 62 |
global: |
| 63 |
arg_printusage; |
| 64 |
arg_printusage_i18n; |
| 65 |
+ base64_decode; |
| 66 |
+ base64_encode; |
| 67 |
cgetcap; |
| 68 |
cgetclose; |
| 69 |
cgetmatch; |