[OpenWrt-Devel] [PATCH] px5g: Use SHA-256 when generating self-signed certificates

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sat Oct 31 17:03:16 EDT 2015

Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
Unfortunately I am not sure if and how px5g-standalone should be
adjusted, so this should be done by someone else if required.

 package/utils/px5g/px5g.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/utils/px5g/px5g.c b/package/utils/px5g/px5g.c
index eec8fd3..d662232 100644
--- a/package/utils/px5g/px5g.c
+++ b/package/utils/px5g/px5g.c
@@ -212,7 +212,7 @@ int selfsigned(char **arg)
 			" and validity %s-%s\n", subject, fstr, tstr);
-	x509write_crt_set_md_alg(&cert, POLARSSL_MD_SHA1);
+	x509write_crt_set_md_alg(&cert, POLARSSL_MD_SHA256);
 	x509write_crt_set_issuer_key(&cert, &key);
 	x509write_crt_set_subject_key(&cert, &key);
 	x509write_crt_set_subject_name(&cert, subject);
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list