Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/heimdal/dist fix BN_to_integer to get ri...



details:   https://anonhg.NetBSD.org/src/rev/be9bc1193a34
branches:  trunk
changeset: 359439:be9bc1193a34
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 09 23:22:12 2018 +0000

description:
fix BN_to_integer to get rid of  __UNCONST. Trick question:
How many BN_to_integer implementations does Heimdal contain (I only fixed 2).

diffstat:

 crypto/external/bsd/heimdal/dist/kdc/pkinit.c      |   6 +++---
 crypto/external/bsd/heimdal/dist/lib/krb5/pkinit.c |  12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (78 lines):

diff -r fb741f473134 -r be9bc1193a34 crypto/external/bsd/heimdal/dist/kdc/pkinit.c
--- a/crypto/external/bsd/heimdal/dist/kdc/pkinit.c     Fri Feb 09 22:46:19 2018 +0000
+++ b/crypto/external/bsd/heimdal/dist/kdc/pkinit.c     Fri Feb 09 23:22:12 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pkinit.c,v 1.3 2018/02/05 16:00:52 christos Exp $      */
+/*     $NetBSD: pkinit.c,v 1.4 2018/02/09 23:22:12 christos Exp $      */
 
 /*
  * Copyright (c) 2003 - 2016 Kungliga Tekniska Högskolan
@@ -813,7 +813,7 @@
  */
 
 static krb5_error_code
-BN_to_integer(krb5_context context, BIGNUM *bn, heim_integer *integer)
+BN_to_integer(krb5_context context, const BIGNUM *bn, heim_integer *integer)
 {
     integer->length = BN_num_bytes(bn);
     integer->data = malloc(integer->length);
@@ -1038,7 +1038,7 @@
 #else
        DH_get0_key(kdc_dh, &pub_key, NULL);
 #endif
-       ret = BN_to_integer(context, __UNCONST(pub_key), &i);
+       ret = BN_to_integer(context, pub_key, &i);
        if (ret)
            return ret;
 
diff -r fb741f473134 -r be9bc1193a34 crypto/external/bsd/heimdal/dist/lib/krb5/pkinit.c
--- a/crypto/external/bsd/heimdal/dist/lib/krb5/pkinit.c        Fri Feb 09 22:46:19 2018 +0000
+++ b/crypto/external/bsd/heimdal/dist/lib/krb5/pkinit.c        Fri Feb 09 23:22:12 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pkinit.c,v 1.3 2018/02/05 16:00:53 christos Exp $      */
+/*     $NetBSD: pkinit.c,v 1.4 2018/02/09 23:22:13 christos Exp $      */
 
 /*
  * Copyright (c) 2003 - 2016 Kungliga Tekniska Högskolan
@@ -82,7 +82,7 @@
 }
 
 static krb5_error_code
-BN_to_integer(krb5_context context, BIGNUM *bn, heim_integer *integer)
+BN_to_integer(krb5_context context, const BIGNUM *bn, heim_integer *integer)
 {
     integer->length = BN_num_bytes(bn);
     integer->data = malloc(integer->length);
@@ -481,12 +481,12 @@
            DH_get0_pqg(dh, &p, &q, &g);
 #endif
 
-           ret = BN_to_integer(context, __UNCONST(p), &dp.p);
+           ret = BN_to_integer(context, p, &dp.p);
            if (ret) {
                free_DomainParameters(&dp);
                return ret;
            }
-           ret = BN_to_integer(context, __UNCONST(g), &dp.g);
+           ret = BN_to_integer(context, g, &dp.g);
            if (ret) {
                free_DomainParameters(&dp);
                return ret;
@@ -496,7 +496,7 @@
                free_DomainParameters(&dp);
                return ENOMEM;
            }
-           ret = BN_to_integer(context, __UNCONST(q), dp.q);
+           ret = BN_to_integer(context, q, dp.q);
            if (ret) {
                free_DomainParameters(&dp);
                return ret;
@@ -527,7 +527,7 @@
 #else
            DH_get0_key(dh, &pub_key, NULL);
 #endif
-           ret = BN_to_integer(context, __UNCONST(pub_key), &dh_pub_key);
+           ret = BN_to_integer(context, pub_key, &dh_pub_key);
            if (ret)
                return ret;
 



Home | Main Index | Thread Index | Old Index