1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-02-02 15:31:06 +02:00

[backfire] merge r21492, r21556 and r21762

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21763 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-06-12 13:00:55 +00:00
parent 87686a9bba
commit cb8ef04009
3 changed files with 14 additions and 3 deletions

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
PKG_RELEASE:=9
PKG_RELEASE:=11
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

View File

@ -35,12 +35,22 @@ SSL_CTX * uh_tls_ctx_init()
int uh_tls_ctx_cert(SSL_CTX *c, const char *file)
{
return SSL_CTX_use_certificate_file(c, file, SSL_FILETYPE_ASN1);
int rv;
if( (rv = SSL_CTX_use_certificate_file(c, file, SSL_FILETYPE_PEM)) < 1 )
rv = SSL_CTX_use_certificate_file(c, file, SSL_FILETYPE_ASN1);
return rv;
}
int uh_tls_ctx_key(SSL_CTX *c, const char *file)
{
return SSL_CTX_use_PrivateKey_file(c, file, SSL_FILETYPE_ASN1);
int rv;
if( (rv = SSL_CTX_use_PrivateKey_file(c, file, SSL_FILETYPE_PEM)) < 1 )
rv = SSL_CTX_use_PrivateKey_file(c, file, SSL_FILETYPE_ASN1);
return rv;
}
void uh_tls_ctx_free(struct listener *l)

View File

@ -550,6 +550,7 @@ int main (int argc, char **argv)
&hints, (opt == 's'), &conf
);
memset(bind, 0, sizeof(bind));
break;
#ifdef HAVE_TLS