From: Love Hornquist Astrand Date: Mon, 29 Apr 2013 18:42:46 +0000 (-0700) Subject: HEIMDAL: don't bother seeing q if not sent X-Git-Tag: samba-4.6.13~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6dfb4e1cc5decc61589865ba5e8e1fa4378ee5f;p=thirdparty%2Fsamba.git HEIMDAL: don't bother seeing q if not sent BUG: https://bugzilla.samba.org/show_bug.cgi?id=12986 Reviewed-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from heimdal commit 19f9fdbcea11013cf13ac72c416f161ee55dee2b) Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Mon Aug 28 15:10:54 CEST 2017 on sn-devel-144 (cherry picked from commit dd3e06f14ec1788a59e4c6ba4ea165fd77b9135e) --- diff --git a/source4/heimdal/kdc/pkinit.c b/source4/heimdal/kdc/pkinit.c index 3a9e8f266ce..c874847cffd 100644 --- a/source4/heimdal/kdc/pkinit.c +++ b/source4/heimdal/kdc/pkinit.c @@ -381,9 +381,12 @@ get_dh_param(krb5_context context, dh->g = integer_to_BN(context, "DH base", &dhparam.g); if (dh->g == NULL) goto out; - dh->q = integer_to_BN(context, "DH p-1 factor", &dhparam.q); - if (dh->g == NULL) - goto out; + + if (dhparam.q) { + dh->q = integer_to_BN(context, "DH p-1 factor", dhparam.q); + if (dh->g == NULL) + goto out; + } { heim_integer glue;