From c45b83c1ce2b7300dea04ca81aabec5af948e98f Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 26 Feb 2013 17:59:01 -0500 Subject: Make reassembled PKCS11 names parseable The reassembled names used "," as a separator between attributes, when passed-in values use ":". This was due to the original submitter being confused - they weren't intended to be different. --- src/plugins/preauth/pkinit/pkinit_crypto_nss.c | 10 +++++----- src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c index ec6db2d136..26901986b6 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c @@ -2057,23 +2057,23 @@ reassemble_pkcs11_name(PLArenaPool *pool, pkinit_identity_opts *idopts) k5_buf_add(&buf, "PKCS11:"); n = 0; if (idopts->p11_module_name != NULL) { - k5_buf_add_fmt(&buf, "%smodule_name=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%smodule_name=%s", n++ ? ":" : "", idopts->p11_module_name); } if (idopts->token_label != NULL) { - k5_buf_add_fmt(&buf, "%stoken=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%stoken=%s", n++ ? ":" : "", idopts->token_label); } if (idopts->cert_label != NULL) { - k5_buf_add_fmt(&buf, "%scertlabel=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%scertlabel=%s", n++ ? ":" : "", idopts->cert_label); } if (idopts->cert_id_string != NULL) { - k5_buf_add_fmt(&buf, "%scertid=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%scertid=%s", n++ ? ":" : "", idopts->cert_id_string); } if (idopts->slotid != PK_NOSLOT) { - k5_buf_add_fmt(&buf, "%sslotid=%ld", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%sslotid=%ld", n++ ? ":" : "", (long)idopts->slotid); } if (k5_buf_len(&buf) >= 0) diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c index ee94f088cc..a706911973 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c @@ -4514,23 +4514,23 @@ reassemble_pkcs11_name(pkinit_identity_opts *idopts) k5_buf_add(&buf, "PKCS11:"); n = 0; if (idopts->p11_module_name != NULL) { - k5_buf_add_fmt(&buf, "%smodule_name=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%smodule_name=%s", n++ ? ":" : "", idopts->p11_module_name); } if (idopts->token_label != NULL) { - k5_buf_add_fmt(&buf, "%stoken=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%stoken=%s", n++ ? ":" : "", idopts->token_label); } if (idopts->cert_label != NULL) { - k5_buf_add_fmt(&buf, "%scertlabel=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%scertlabel=%s", n++ ? ":" : "", idopts->cert_label); } if (idopts->cert_id_string != NULL) { - k5_buf_add_fmt(&buf, "%scertid=%s", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%scertid=%s", n++ ? ":" : "", idopts->cert_id_string); } if (idopts->slotid != PK_NOSLOT) { - k5_buf_add_fmt(&buf, "%sslotid=%ld", n++ ? "," : "", + k5_buf_add_fmt(&buf, "%sslotid=%ld", n++ ? ":" : "", (long)idopts->slotid); } if (k5_buf_len(&buf) >= 0) -- cgit