diff options
Diffstat (limited to 'net-libs/liboauth/files')
-rw-r--r-- | net-libs/liboauth/files/liboauth-1.0.1-doxygen-out-of-tree.patch | 50 | ||||
-rw-r--r-- | net-libs/liboauth/files/liboauth-1.0.3-openssl-1.1.patch | 143 |
2 files changed, 0 insertions, 193 deletions
diff --git a/net-libs/liboauth/files/liboauth-1.0.1-doxygen-out-of-tree.patch b/net-libs/liboauth/files/liboauth-1.0.1-doxygen-out-of-tree.patch deleted file mode 100644 index 3ed37ec..0000000 --- a/net-libs/liboauth/files/liboauth-1.0.1-doxygen-out-of-tree.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -urp liboauth-1.0.1-orig/Doxyfile.in liboauth-1.0.1/Doxyfile.in ---- liboauth-1.0.1-orig/Doxyfile.in 2012-11-01 04:34:49.000000000 +0000 -+++ liboauth-1.0.1/Doxyfile.in 2013-03-14 14:25:11.000000000 +0000 -@@ -45,7 +45,7 @@ PROJECT_BRIEF = - # exceed 55 pixels and the maximum width should not exceed 200 pixels. - # Doxygen will copy the logo to the output directory. - --PROJECT_LOGO = doc/libOAuth.png -+PROJECT_LOGO = @top_srcdir@/doc/libOAuth.png - - # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) - # base path where the generated documentation will be put. -@@ -130,7 +130,7 @@ FULL_PATH_NAMES = YES - # relative paths, which will be relative from the directory where doxygen is - # started. - --STRIP_FROM_PATH = src/ -+STRIP_FROM_PATH = @top_srcdir@/src/ - - # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of - # the path mentioned in the documentation of a class, which tells -@@ -661,8 +661,8 @@ WARN_LOGFILE = - # directories like "/usr/src/myproject". Separate the files or directories - # with spaces. - --INPUT = src/oauth.h \ -- doc/mainpage.dox -+INPUT = @top_srcdir@/src/oauth.h \ -+ @top_srcdir@/doc/mainpage.dox - - # This tag can be used to specify the character encoding of the source files - # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -@@ -722,7 +722,7 @@ EXCLUDE_SYMBOLS = - # directories that contain example code fragments that are included (see - # the \include command). - --EXAMPLE_PATH = tests/ -+EXAMPLE_PATH = @top_srcdir@/tests/ - - # If the value of the EXAMPLE_PATH tag contains directories, you can use the - # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -@@ -742,7 +742,7 @@ EXAMPLE_RECURSIVE = NO - # directories that contain image that are included in the documentation (see - # the \image command). - --IMAGE_PATH = doc/ -+IMAGE_PATH = @top_srcdir@/doc/ - - # The INPUT_FILTER tag can be used to specify a program that doxygen should - # invoke to filter for each input file. Doxygen will invoke the filter program diff --git a/net-libs/liboauth/files/liboauth-1.0.3-openssl-1.1.patch b/net-libs/liboauth/files/liboauth-1.0.3-openssl-1.1.patch deleted file mode 100644 index 829bf4a..0000000 --- a/net-libs/liboauth/files/liboauth-1.0.3-openssl-1.1.patch +++ /dev/null @@ -1,143 +0,0 @@ -From bf51f1f17bdfcdbf09b7edad9995ccbf17c41109 Mon Sep 17 00:00:00 2001 -From: Lars Wendler <polynomial-c@gentoo.org> -Date: Thu, 15 Nov 2018 12:11:11 +0100 -Subject: [PATCH] Fixed build with openssl-1.1 - -https://github.com/x42/liboauth/issues/9 ---- - src/hash.c | 60 +++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 39 insertions(+), 21 deletions(-) - -diff --git a/src/hash.c b/src/hash.c -index 17ff5c8..551991f 100644 ---- a/src/hash.c -+++ b/src/hash.c -@@ -362,6 +362,11 @@ looser: - #include "oauth.h" // base64 encode fn's. - #include <openssl/hmac.h> - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) -+#define EVP_MD_CTX_new EVP_MD_CTX_create -+#define EVP_MD_CTX_free EVP_MD_CTX_destroy -+#endif -+ - char *oauth_sign_hmac_sha1 (const char *m, const char *k) { - return(oauth_sign_hmac_sha1_raw (m, strlen(m), k, strlen(k))); - } -@@ -386,7 +391,7 @@ char *oauth_sign_rsa_sha1 (const char *m, const char *k) { - unsigned char *sig = NULL; - unsigned char *passphrase = NULL; - unsigned int len=0; -- EVP_MD_CTX md_ctx; -+ EVP_MD_CTX *md_ctx; - - EVP_PKEY *pkey; - BIO *in; -@@ -399,24 +404,31 @@ char *oauth_sign_rsa_sha1 (const char *m, const char *k) { - return xstrdup("liboauth/OpenSSL: can not read private key"); - } - -+ md_ctx = EVP_MD_CTX_new(); -+ if (md_ctx == NULL) { -+ return xstrdup("liboauth/OpenSSL: failed to allocate EVP_MD_CTX"); -+ } -+ - len = EVP_PKEY_size(pkey); - sig = (unsigned char*)xmalloc((len+1)*sizeof(char)); - -- EVP_SignInit(&md_ctx, EVP_sha1()); -- EVP_SignUpdate(&md_ctx, m, strlen(m)); -- if (EVP_SignFinal (&md_ctx, sig, &len, pkey)) { -+ EVP_SignInit(md_ctx, EVP_sha1()); -+ EVP_SignUpdate(md_ctx, m, strlen(m)); -+ if (EVP_SignFinal (md_ctx, sig, &len, pkey)) { - char *tmp; - sig[len] = '\0'; - tmp = oauth_encode_base64(len,sig); - OPENSSL_free(sig); - EVP_PKEY_free(pkey); -+ EVP_MD_CTX_free(md_ctx); - return tmp; - } -+ EVP_MD_CTX_free(md_ctx); - return xstrdup("liboauth/OpenSSL: rsa-sha1 signing failed"); - } - - int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s) { -- EVP_MD_CTX md_ctx; -+ EVP_MD_CTX *md_ctx; - EVP_PKEY *pkey; - BIO *in; - X509 *cert = NULL; -@@ -440,10 +452,10 @@ int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s) { - b64d= (unsigned char*) xmalloc(sizeof(char)*strlen(s)); - slen = oauth_decode_base64(b64d, s); - -- EVP_VerifyInit(&md_ctx, EVP_sha1()); -- EVP_VerifyUpdate(&md_ctx, m, strlen(m)); -- err = EVP_VerifyFinal(&md_ctx, b64d, slen, pkey); -- EVP_MD_CTX_cleanup(&md_ctx); -+ EVP_VerifyInit(md_ctx, EVP_sha1()); -+ EVP_VerifyUpdate(md_ctx, m, strlen(m)); -+ err = EVP_VerifyFinal(md_ctx, b64d, slen, pkey); -+ EVP_MD_CTX_cleanup(md_ctx); - EVP_PKEY_free(pkey); - xfree(b64d); - return (err); -@@ -455,35 +467,41 @@ int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s) { - */ - char *oauth_body_hash_file(char *filename) { - unsigned char fb[BUFSIZ]; -- EVP_MD_CTX ctx; -+ EVP_MD_CTX *ctx; - size_t len=0; - unsigned char *md; - FILE *F= fopen(filename, "r"); - if (!F) return NULL; - -- EVP_MD_CTX_init(&ctx); -- EVP_DigestInit(&ctx,EVP_sha1()); -+ ctx = EVP_MD_CTX_new(); -+ if (ctx == NULL) { -+ return xstrdup("liboauth/OpenSSL: failed to allocate EVP_MD_CTX"); -+ } -+ EVP_DigestInit(ctx,EVP_sha1()); - while (!feof(F) && (len=fread(fb,sizeof(char),BUFSIZ, F))>0) { -- EVP_DigestUpdate(&ctx, fb, len); -+ EVP_DigestUpdate(ctx, fb, len); - } - fclose(F); - len=0; - md=(unsigned char*) xcalloc(EVP_MD_size(EVP_sha1()),sizeof(unsigned char)); -- EVP_DigestFinal(&ctx, md,(unsigned int*) &len); -- EVP_MD_CTX_cleanup(&ctx); -+ EVP_DigestFinal(ctx, md,(unsigned int*) &len); -+ EVP_MD_CTX_cleanup(ctx); - return oauth_body_hash_encode(len, md); - } - - char *oauth_body_hash_data(size_t length, const char *data) { -- EVP_MD_CTX ctx; -+ EVP_MD_CTX *ctx; - size_t len=0; - unsigned char *md; - md=(unsigned char*) xcalloc(EVP_MD_size(EVP_sha1()),sizeof(unsigned char)); -- EVP_MD_CTX_init(&ctx); -- EVP_DigestInit(&ctx,EVP_sha1()); -- EVP_DigestUpdate(&ctx, data, length); -- EVP_DigestFinal(&ctx, md,(unsigned int*) &len); -- EVP_MD_CTX_cleanup(&ctx); -+ ctx = EVP_MD_CTX_new(); -+ if (ctx == NULL) { -+ return xstrdup("liboauth/OpenSSL: failed to allocate EVP_MD_CTX"); -+ } -+ EVP_DigestInit(ctx,EVP_sha1()); -+ EVP_DigestUpdate(ctx, data, length); -+ EVP_DigestFinal(ctx, md,(unsigned int*) &len); -+ EVP_MD_CTX_free(ctx); - return oauth_body_hash_encode(len, md); - } - --- -2.19.1 - |