seafile: upgrade to 6.3.0lilik-openwrt-22.03
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=django-formtools | |||
PKG_VERSION:=2.1 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=BSD-3-Clause | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/4a/86/ccbb8225dec0621f99f7e19f3dea0a629f1e41bd99fd58ac3e2f388e028f | |||
PKG_HASH:=7703793f1675aa6e871f9fed147e8563816d7a5b9affdc5e3459899596217f7c | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/django-formtools | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=A set of high-level abstractions for Django forms | |||
URL:=https://django-formtools.readthedocs.io/en/latest/ | |||
DEPENDS:=+python +django | |||
endef | |||
define Package/django-formtools/description | |||
Django "formtools" is a set of high-level abstractions for Django forms. | |||
Currently for form previews and multi-step forms. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/django-formtools/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,django-formtools)) |
@ -0,0 +1,47 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=django-ranged-response | |||
PKG_VERSION:=0.2.0 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=MIT | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/70/e3/9372fcdca8e9c3205e7979528ccd1a14354a9a24d38efff11c1846ff8bf1 | |||
PKG_HASH:=f71fff352a37316b9bead717fc76e4ddd6c9b99c4680cdf4783b9755af1cf985 | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/django-ranged-response | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=Modified Django FileResponse that adds Content-Range headers. | |||
URL:=https://github.com/wearespindle/django-ranged-fileresponse | |||
DEPENDS:=+python +django | |||
endef | |||
define Package/django-ranged-response/description | |||
Modified Django FileResponse that adds Content-Range headers. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/django-ranged-response/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,django-ranged-response)) |
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=django-simple-captcha | |||
PKG_VERSION:=0.5.9 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=MIT | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/d7/f4/ea95b04ed3abc7bf225716f17e35c5a185f6100db4d7541a46696ce40351 | |||
PKG_HASH:=0c30a14f02502119fd1a4d308dd5d2b899d0f4284825a396bbb010afd904754a | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/django-simple-captcha | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=A very simple, yet powerful, Django captcha application | |||
URL:=https://github.com/mbi/django-simple-captcha | |||
DEPENDS:=+python +python-six +django +pillow +django-ranged-response | |||
endef | |||
define Package/django-simple-captcha/description | |||
Django Simple Captcha is an extremely simple, yet highly customizable Django | |||
application to add captcha images to any Django form. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/django-simple-captcha/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,django-simple-captcha)) |
@ -0,0 +1,47 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=django-webpack-loader | |||
PKG_VERSION:=0.6.0 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=MIT | |||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/ff/0f/e812908c5dcc7c8cac5beba2cddd14bbfe045496117b3d306a71b19fc828 | |||
PKG_HASH:=60bab6b9a037a5346fad12d2a70a6bc046afb33154cf75ed640b93d3ebd5f520 | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/django-webpack-loader | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=Transparently use webpack with django | |||
URL:=https://github.com/owais/django-webpack-loader | |||
DEPENDS:=+python +django | |||
endef | |||
define Package/django-webpack-loader/description | |||
Use webpack to generate your static bundles without django’s staticfiles or opaque wrappers. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/django-webpack-loader/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,django-webpack-loader)) |
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=pyjwt | |||
PKG_VERSION:=1.6.4 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=MIT | |||
PKG_SOURCE:=PyJWT-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/00/5e/b358c9bb24421e6155799d995b4aa3aa3307ffc7ecae4ad9d29fd7e07a73 | |||
PKG_HASH:=4ee413b357d53fd3fb44704577afac88e72e878716116270d722723d65b42176 | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/PyJWT-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/pyjwt | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=JSON Web Token implementation in Python | |||
URL:=http://github.com/jpadilla/pyjwt | |||
DEPENDS:=+python | |||
endef | |||
define Package/pyjwt/description | |||
A Python implementation of RFC 7519. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/pyjwt/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,pyjwt)) |
@ -0,0 +1,49 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=python-certifi | |||
PKG_VERSION:=2018.4.16 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=MPL-2.0 | |||
PKG_SOURCE:=certifi-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/4d/9c/46e950a6f4d6b4be571ddcae21e7bc846fcbb88f1de3eff0f6dd0a6be55d | |||
PKG_HASH:=13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7 | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/certifi-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/python-certifi | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=Python package for providing Mozilla's CA Bundle. | |||
URL:=http://certifi.io/ | |||
DEPENDS:=+python | |||
endef | |||
define Package/python-certifi/description | |||
Certifi is a carefully curated collection of Root Certificates for validating the | |||
trustworthiness of SSL certificates while verifying the identity of TLS hosts. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/python-certifi/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,python-certifi)) |
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=python-oauthlib | |||
PKG_VERSION:=2.1.0 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=BSD-3-Clause | |||
PKG_SOURCE:=oauthlib-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/df/5f/3f4aae7b28db87ddef18afed3b71921e531ca288dc604eb981e9ec9f8853 | |||
PKG_HASH:=ac35665a61c1685c56336bda97d5eefa246f1202618a1d6f34fccb1bdd404162 | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/oauthlib-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/python-oauthlib | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=A generic, spec-compliant, thorough implementation of the OAuth request-signing logic | |||
URL:=https://github.com/oauthlib/oauthlib | |||
DEPENDS:=+python | |||
endef | |||
define Package/python-oauthlib/description | |||
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic for Python | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/python-oauthlib/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,python-oauthlib)) |
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=python-qrcode | |||
PKG_VERSION:=6.0 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=BSD-3-Clause | |||
PKG_SOURCE:=qrcode-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/8d/b6/beed3d50e1047a2aa6437d3a653e5f31feb7f4de8bc054299dc205682e41 | |||
PKG_HASH:=037b0db4c93f44586e37f84c3da3f763874fcac85b2974a69a98e399ac78e1bf | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/qrcode-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/python-qrcode | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=QR Code image generator | |||
URL:=https://github.com/lincolnloop/python-qrcode | |||
DEPENDS:=+python +python-six | |||
endef | |||
define Package/python-qrcode/description | |||
Pure python QR Code generator | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/python-qrcode/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,python-qrcode)) |
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=python-requests-oauthlib | |||
PKG_VERSION:=1.0.0 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=ISC | |||
PKG_SOURCE:=requests-oauthlib-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/95/be/072464f05b70e4142cb37151e215a2037b08b1400f8a56f2538b76ca6205 | |||
PKG_HASH:=8886bfec5ad7afb391ed5443b1f697c6f4ae98d0e5620839d8b4499c032ada3f | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/requests-oauthlib-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/python-requests-oauthlib | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=OAuthlib authentication support for Requests. | |||
URL:=https://github.com/requests/requests-oauthlib | |||
DEPENDS:=+python +python-requests +python-oauthlib +python-cryptography +pyjwt | |||
endef | |||
define Package/python-requests-oauthlib/description | |||
This project provides first-class OAuth library support for Requests. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/python-requests-oauthlib/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,python-requests-oauthlib)) |
@ -0,0 +1,48 @@ | |||
# | |||
# Copyright (C) 2007-2016 OpenWrt.org | |||
# | |||
# This is free software, licensed under the GNU General Public License v2. | |||
# See /LICENSE for more information. | |||
# | |||
include $(TOPDIR)/rules.mk | |||
PKG_NAME:=python-requests | |||
PKG_VERSION:=2.19.1 | |||
PKG_RELEASE:=1 | |||
PKG_LICENSE:=Apache-2.0 | |||
PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz | |||
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/54/1f/782a5734931ddf2e1494e4cd615a51ff98e1879cbe9eecbdfeaf09aa75e9 | |||
PKG_HASH:=ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a | |||
PKG_BUILD_DIR:=$(BUILD_DIR)/requests-$(PKG_VERSION) | |||
include $(INCLUDE_DIR)/package.mk | |||
include ../python-package.mk | |||
define Package/python-requests | |||
SUBMENU:=Python | |||
SECTION:=lang | |||
CATEGORY:=Languages | |||
MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
TITLE:=HTTP library for Python | |||
URL:=http://python-requests.org/ | |||
DEPENDS:=+python +chardet +python-idna +python-urllib3 +python-certifi | |||
endef | |||
define Package/python-requests/description | |||
Requests is the only Non-GMO HTTP library for Python, safe for human consumption. | |||
endef | |||
define Build/Compile | |||
$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) | |||
endef | |||
define Package/python-requests/install | |||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) | |||
$(CP) \ | |||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ | |||
$(1)$(PYTHON_PKG_DIR) | |||
endef | |||
$(eval $(call BuildPackage,python-requests)) |
@ -0,0 +1,153 @@ | |||
From afeb62f01ad6e610cd19dcde0ceffc018b3247ec Mon Sep 17 00:00:00 2001 | |||
From: Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
Date: Wed, 6 Jun 2018 18:05:33 -0300 | |||
Subject: [PATCH] Remove API deprecated in openssl 1.1 | |||
With openssl 1.1, we do not call OpenSSL_add_all_algorithms(), as | |||
library initialization is done automatically. | |||
Functions RAND_pseudo_bytes and RSA_generate_key were deprecated as | |||
well. | |||
Also, we need to #include <openssl/bn.h> for BN_num_bytes(). | |||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
--- | |||
lib/rsa.c | 19 ++++++++++++++----- | |||
net/common/processors/keepalive-proc.c | 4 ++-- | |||
net/common/processors/keepalive2-proc.c | 2 +- | |||
net/common/processors/sendsessionkey-proc.c | 2 +- | |||
net/common/processors/sendsessionkey-v2-proc.c | 2 +- | |||
net/server/user-mgr.c | 4 ++++ | |||
tools/ccnet-init.c | 2 ++ | |||
7 files changed, 25 insertions(+), 10 deletions(-) | |||
diff --git a/lib/rsa.c b/lib/rsa.c | |||
index 7cca150..23abb82 100644 | |||
--- a/lib/rsa.c | |||
+++ b/lib/rsa.c | |||
@@ -4,6 +4,7 @@ | |||
#include <openssl/rand.h> | |||
#include <openssl/rsa.h> | |||
#include <openssl/err.h> | |||
+#include <openssl/bn.h> | |||
#include <string.h> | |||
#include <glib.h> | |||
@@ -207,9 +208,17 @@ RSA * | |||
generate_private_key(u_int bits) | |||
{ | |||
RSA *private = NULL; | |||
- | |||
- private = RSA_generate_key(bits, 35, NULL, NULL); | |||
- if (private == NULL) | |||
- g_error ("rsa_generate_private_key: key generation failed."); | |||
- return private; | |||
+ BIGNUM *e = NULL; | |||
+ | |||
+ private = RSA_new(); | |||
+ e = BN_new(); | |||
+ if (private == NULL || e == NULL || !BN_set_word(e, 35) || | |||
+ !RSA_generate_key_ex(private, bits, e, NULL)) { | |||
+ RSA_free(private); | |||
+ BN_free(e); | |||
+ g_error ("rsa_generate_private_key: key generation failed."); | |||
+ return NULL; | |||
+ } | |||
+ BN_free(e); | |||
+ return private; | |||
} | |||
diff --git a/net/common/processors/keepalive-proc.c b/net/common/processors/keepalive-proc.c | |||
index 609d102..42a0c23 100644 | |||
--- a/net/common/processors/keepalive-proc.c | |||
+++ b/net/common/processors/keepalive-proc.c | |||
@@ -401,7 +401,7 @@ static void send_challenge(CcnetProcessor *processor) | |||
unsigned char *buf; | |||
int len; | |||
- RAND_pseudo_bytes (priv->random_buf, 40); | |||
+ RAND_bytes (priv->random_buf, 40); | |||
buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len); | |||
ccnet_processor_send_update (processor, "311", NULL, (char *)buf, len); | |||
@@ -434,7 +434,7 @@ static void send_challenge_user(CcnetProcessor *processor, CcnetUser *user) | |||
ccnet_debug ("[Keepalive] Send user challenge to %.8s\n", | |||
processor->peer->id); | |||
- RAND_pseudo_bytes (priv->random_buf, 40); | |||
+ RAND_bytes (priv->random_buf, 40); | |||
buf = public_key_encrypt (user->pubkey, priv->random_buf, 40, &len); | |||
ccnet_processor_send_update (processor, "321", NULL, (char *)buf, len); | |||
diff --git a/net/common/processors/keepalive2-proc.c b/net/common/processors/keepalive2-proc.c | |||
index d3e799e..d81c266 100644 | |||
--- a/net/common/processors/keepalive2-proc.c | |||
+++ b/net/common/processors/keepalive2-proc.c | |||
@@ -306,7 +306,7 @@ static void send_challenge(CcnetProcessor *processor) | |||
unsigned char *buf; | |||
int len; | |||
- RAND_pseudo_bytes (priv->random_buf, 40); | |||
+ RAND_bytes (priv->random_buf, 40); | |||
buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len); | |||
if (len < 0) { | |||
ccnet_debug ("[Keepalive] Failed to encrypt challenge " | |||
diff --git a/net/common/processors/sendsessionkey-proc.c b/net/common/processors/sendsessionkey-proc.c | |||
index 3ec2757..10c3340 100644 | |||
--- a/net/common/processors/sendsessionkey-proc.c | |||
+++ b/net/common/processors/sendsessionkey-proc.c | |||
@@ -124,7 +124,7 @@ generate_session_key (CcnetProcessor *processor, int *len_p) | |||
unsigned char random_buf[40]; | |||
SHA_CTX s; | |||
- RAND_pseudo_bytes (random_buf, sizeof(random_buf)); | |||
+ RAND_bytes (random_buf, sizeof(random_buf)); | |||
SHA1_Init (&s); | |||
SHA1_Update (&s, random_buf, sizeof(random_buf)); | |||
diff --git a/net/common/processors/sendsessionkey-v2-proc.c b/net/common/processors/sendsessionkey-v2-proc.c | |||
index c1c6924..4805ba6 100644 | |||
--- a/net/common/processors/sendsessionkey-v2-proc.c | |||
+++ b/net/common/processors/sendsessionkey-v2-proc.c | |||
@@ -125,7 +125,7 @@ generate_session_key (CcnetProcessor *processor, int *len_p) | |||
unsigned char random_buf[40]; | |||
SHA_CTX s; | |||
- RAND_pseudo_bytes (random_buf, sizeof(random_buf)); | |||
+ RAND_bytes (random_buf, sizeof(random_buf)); | |||
SHA1_Init (&s); | |||
SHA1_Update (&s, random_buf, sizeof(random_buf)); | |||
diff --git a/net/server/user-mgr.c b/net/server/user-mgr.c | |||
index 0973959..3f0c3b3 100644 | |||
--- a/net/server/user-mgr.c | |||
+++ b/net/server/user-mgr.c | |||
@@ -811,9 +811,13 @@ hash_password_pbkdf2_sha256 (const char *passwd, | |||
char salt_str[SHA256_DIGEST_LENGTH*2+1]; | |||
if (!RAND_bytes (salt, sizeof(salt))) { | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L | |||
ccnet_warning ("Failed to generate salt " | |||
"with RAND_bytes(), use RAND_pseudo_bytes().\n"); | |||
RAND_pseudo_bytes (salt, sizeof(salt)); | |||
+#else | |||
+ ccnet_warning ("Failed to generate salt with RAND_bytes().\n"); | |||
+#endif | |||
} | |||
PKCS5_PBKDF2_HMAC (passwd, strlen(passwd), | |||
diff --git a/tools/ccnet-init.c b/tools/ccnet-init.c | |||
index 4748962..28c9995 100644 | |||
--- a/tools/ccnet-init.c | |||
+++ b/tools/ccnet-init.c | |||
@@ -162,7 +162,9 @@ main(int argc, char **argv) | |||
config_dir = ccnet_expand_path (config_dir); | |||
/* printf("[conf_dir=%s\n]", config_dir); */ | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L | |||
OpenSSL_add_all_algorithms(); | |||
+#endif | |||
if (RAND_status() != 1) { /* it should be seeded automatically */ | |||
fprintf(stderr, "PRNG is not seeded\n"); | |||
-- | |||
2.16.4 | |||
@ -0,0 +1,35 @@ | |||
From 13f95a28ce12216ba51cf0ca8d61c3d89689d02b Mon Sep 17 00:00:00 2001 | |||
From: Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
Date: Wed, 6 Jun 2018 18:11:47 -0300 | |||
Subject: [PATCH] Remove API deprecated in openssl 1.1 | |||
Openssl 1.1 has deprecated RAND_pseudo_bytes. It won't compile with | |||
openssl built witout deprecated API. | |||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> | |||
--- | |||
common/seafile-crypt.c | 5 +++++ | |||
1 file changed, 5 insertions(+) | |||
diff --git a/common/seafile-crypt.c b/common/seafile-crypt.c | |||
index c7d1702..c3cebf5 100644 | |||
--- a/common/seafile-crypt.c | |||
+++ b/common/seafile-crypt.c | |||
@@ -81,9 +81,14 @@ seafile_generate_random_key (const char *passwd, char *random_key) | |||
int rc = RAND_bytes (secret_key, sizeof(secret_key)); | |||
if (rc != 1) { | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L | |||
seaf_warning ("Failed to generate secret key for repo encryption " | |||
"with RAND_bytes(), use RAND_pseudo_bytes().\n"); | |||
RAND_pseudo_bytes (secret_key, sizeof(secret_key)); | |||
+#else | |||
+ seaf_warning ("Failed to generate secret key for repo encryption " | |||
+ "with RAND_bytes().\n"); | |||
+#endif | |||
} | |||
seafile_derive_key (passwd, strlen(passwd), 2, key, iv); | |||
-- | |||
2.16.4 | |||
@ -0,0 +1,32 @@ | |||
From 25dcf165f77c94f758383d35632293d69666d0ad Mon Sep 17 00:00:00 2001 | |||
From: cuihaikuo <haikuo.cui@seafile.com> | |||
Date: Thu, 7 Jun 2018 11:56:44 +0800 | |||
Subject: [PATCH] Fix that table SystemInfo can't be created in sqlite db. | |||
--- | |||
server/seafile-session.c | 10 +++++++++- | |||
1 file changed, 9 insertions(+), 1 deletion(-) | |||
diff --git a/server/seafile-session.c b/server/seafile-session.c | |||
index 76d9c12..2a1fc0c 100644 | |||
--- a/server/seafile-session.c | |||
+++ b/server/seafile-session.c | |||
@@ -424,9 +424,17 @@ create_system_default_repo (void *data) | |||
void | |||
schedule_create_system_default_repo (SeafileSession *session) | |||
{ | |||
- char *sql = "CREATE TABLE IF NOT EXISTS SystemInfo " | |||
+ int db_type = seaf_db_type (session->db); | |||
+ char *sql; | |||
+ | |||
+ if (db_type == SEAF_DB_TYPE_MYSQL) | |||
+ sql = "CREATE TABLE IF NOT EXISTS SystemInfo " | |||
"(id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, " | |||
"info_key VARCHAR(256), info_value VARCHAR(1024))"; | |||
+ else | |||
+ sql = "CREATE TABLE IF NOT EXISTS SystemInfo( " | |||
+ "info_key VARCHAR(256), info_value VARCHAR(1024))"; | |||
+ | |||
if (seaf_db_query (session->db, sql) < 0) | |||
return; | |||
@ -0,0 +1,26 @@ | |||
--- a/tools/seafile-admin | |||
+++ b/tools/seafile-admin | |||
@@ -831,7 +831,22 @@ def setup_seafile(args): | |||
conf[CONF_SEAFILE_CENTRAL_CONF_DIR] = os.path.join(cwd, 'conf') | |||
config_ccnet_seafile() | |||
init_ccnet_seafile() | |||
- init_seahub() | |||
+ | |||
+ # make sure ccnet-server is running to avoid an error creating django superuser | |||
+ if not is_running('ccnet-server'): | |||
+ argv = [ | |||
+ 'ccnet-server', | |||
+ '-F', | |||
+ conf[CONF_SEAFILE_CENTRAL_CONF_DIR], | |||
+ '-c', | |||
+ conf[CONF_CCNET_DIR], | |||
+ '-d' | |||
+ ] | |||
+ run_argv(argv) | |||
+ init_seahub() | |||
+ pkill('ccnet-server') | |||
+ else: | |||
+ init_seahub() | |||
print '-----------------------------------------------------------------' |