modes see RFC 5830. S-Box is id-tc26-gost-28147-param-Z (TC26Z) defined in
RFC 7836.
+** certtool: when outputting an encrypted private key do not insert the textual description
+ of it. This fixes a regression since 3.6.5 (#840).
+
** API and ABI modifications:
gnutls_aead_cipher_encryptv2: Added
gnutls_aead_cipher_decryptv2: Added
/* Only print private key parameters when an unencrypted
* format is used */
- if (cinfo->outtext)
- privkey_info_int(outfile, cinfo, key);
-
switch_to_pkcs8_when_needed(cinfo, key, gnutls_x509_privkey_get_pk_algorithm(key));
if (!cinfo->pkcs8) {
+ if (cinfo->outtext)
+ privkey_info_int(outfile, cinfo, key);
+
size = lbuffer_size;
ret = gnutls_x509_privkey_export(key, cinfo->outcert_format,
lbuffer, &size);
pass = get_password(cinfo, &flags, 0);
flags |= cipher_to_flags(cinfo->pkcs_cipher);
+ if (cinfo->outtext && (flags & GNUTLS_PKCS_PLAIN))
+ privkey_info_int(outfile, cinfo, key);
+
size = lbuffer_size;
ret =
gnutls_x509_privkey_export_pkcs8(key, cinfo->outcert_format,
exit 1
fi
+ grep 'modulus:' ${TMPFILE1}
+ if test $? = 0;then
+ cat ${TMPFILE1}
+ echo "PKCS#8 file contains text modulus"
+ exit 1
+ fi
+
#check whether password is being honoured
#some CI runners need GNUTLS_PIN (GNUTLS_PIN=${PASS})
${SETSID} "${CERTTOOL}" --generate-self-signed --load-privkey ${TMPFILE1} --template ${srcdir}/templates/template-test.tmpl --ask-pass >${TMPFILE2} 2>&1 <<EOF
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
+# Create an RSA-PSS private key, restricted to the use with RSA-PSS
+${VALGRIND} "${CERTTOOL}" --generate-privkey \
+ --key-type rsa-pss --outfile "$OUTFILE"
+rc=$?
+
+if test "${rc}" != "0"; then
+ echo "Could not generate an RSA-PSS key"
+ exit 1
+fi
+
+# check whether description is present
+grep 'modulus:' ${OUTFILE}
+if test $? != 0;then
+ cat ${OUTFILE}
+ echo "PKCS#8 file does not contain modulus text"
+ exit 1
+fi
+
for i in sha256 sha384 sha512;do
if test "${GNUTLS_FORCE_FIPS_MODE}" = 1 && test "$i" != sha384;then
continue