krb5 commit: Make reassembled PKCS11 names parseable
Greg Hudson
ghudson at MIT.EDU
Wed May 8 01:17:43 EDT 2013
https://github.com/krb5/krb5/commit/c45b83c1ce2b7300dea04ca81aabec5af948e98f
commit c45b83c1ce2b7300dea04ca81aabec5af948e98f
Author: Nalin Dahyabhai <nalin at dahyabhai.net>
Date: Tue Feb 26 17:59:01 2013 -0500
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(-)
diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c
index ec6db2d..2690198 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 ee94f08..a706911 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)
More information about the cvs-krb5
mailing list