[29727] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Set alg param correctly for PKCS1

daemon@ATHENA.MIT.EDU (Tom Yu)
Wed Oct 5 17:54:40 2016

Date: Wed, 5 Oct 2016 17:54:35 -0400
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201610052154.u95LsZt7019932@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/fded9063c23daa3dbd9ffaf32f8145844293f472
commit fded9063c23daa3dbd9ffaf32f8145844293f472
Author: Tom Yu <tlyu@mit.edu>
Date:   Tue Oct 4 18:14:51 2016 -0400

    Set alg param correctly for PKCS1
    
    When using a smart card and constructing a DigestInfo to pass to the
    CKM_RSA_PKCS mechanism, make sure to set the AlgorithmIdentifier
    parameters correctly.  This is typically an ASN.1 NULL value.
    
    Reported to Ubuntu in Launchpad #1629370.
    
    ticket: 8506
    target_version: 1.14-next
    target_version: 1.13-next
    tags: pullup

 src/plugins/preauth/pkinit/pkinit_crypto_openssl.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
index 776d89f..7dcdf04 100644
--- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
+++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
@@ -1319,8 +1319,7 @@ cms_signeddata_create(krb5_context context,
             alg = X509_ALGOR_new();
             if (alg == NULL)
                 goto cleanup2;
-            alg->algorithm = OBJ_nid2obj(NID_sha1);
-            alg->parameter = NULL;
+            X509_ALGOR_set0(alg, OBJ_nid2obj(NID_sha1), V_ASN1_NULL, NULL);
             alg_len = i2d_X509_ALGOR(alg, NULL);
             alg_buf = malloc(alg_len);
             if (alg_buf == NULL)
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post