aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/px5g-wolfssl/px5g-wolfssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/px5g-wolfssl/px5g-wolfssl.c')
-rw-r--r--package/utils/px5g-wolfssl/px5g-wolfssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/utils/px5g-wolfssl/px5g-wolfssl.c b/package/utils/px5g-wolfssl/px5g-wolfssl.c
index b937d220ca..763d7b4b71 100644
--- a/package/utils/px5g-wolfssl/px5g-wolfssl.c
+++ b/package/utils/px5g-wolfssl/px5g-wolfssl.c
@@ -232,8 +232,10 @@ int selfsigned(WC_RNG *rng, char **arg) {
subject, fstr, tstr);
if (type == EC_KEY_TYPE) {
+ newCert.sigType = CTC_SHA256wECDSA;
ret = wc_MakeCert(&newCert, derBuf, sizeof(derBuf), NULL, &ecKey, rng);
} else {
+ newCert.sigType = CTC_SHA256wRSA;
ret = wc_MakeCert(&newCert, derBuf, sizeof(derBuf), &rsaKey, NULL, rng);
}
if (ret <= 0) {
@@ -242,11 +244,9 @@ int selfsigned(WC_RNG *rng, char **arg) {
}
if (type == EC_KEY_TYPE) {
- newCert.sigType = CTC_SHA256wECDSA;
ret = wc_SignCert(newCert.bodySz, newCert.sigType, derBuf, sizeof(derBuf),
NULL, &ecKey, rng);
} else {
- newCert.sigType = CTC_SHA256wRSA;
ret = wc_SignCert(newCert.bodySz, newCert.sigType, derBuf, sizeof(derBuf),
&rsaKey, NULL, rng);
}