diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c | 10 | ||||
-rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c | 8 | ||||
-rw-r--r-- | src/plugins/preauth/pkinit/pkinit_crypto_nss.c | 35 | ||||
-rw-r--r-- | src/plugins/preauth/pkinit/pkinit_crypto_openssl.c | 35 |
4 files changed, 39 insertions, 49 deletions
diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c index 7ce50b30b..47ba5f022 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c @@ -412,14 +412,14 @@ krb5_ldap_parse_principal_name(char *i_princ_name, char **o_princ_name) if (!o_princ_name) return ENOMEM; } else { - krb5int_buf_init_dynamic(&buf); + k5_buf_init_dynamic(&buf); for (p = i_princ_name; p < at_rlm_name; p++) { if (*p == '@') - krb5int_buf_add(&buf, "\\"); - krb5int_buf_add_len(&buf, p, 1); + k5_buf_add(&buf, "\\"); + k5_buf_add_len(&buf, p, 1); } - krb5int_buf_add(&buf, at_rlm_name); - *o_princ_name = krb5int_buf_data(&buf); + k5_buf_add(&buf, at_rlm_name); + *o_princ_name = k5_buf_data(&buf); if (!*o_princ_name) return ENOMEM; } diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c index 1e3d5354b..ad6b7fe6e 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c @@ -78,16 +78,16 @@ ldap_filter_correct (char *in) const char special[] = "*()\\ #\"+,;<>"; struct k5buf buf; - krb5int_buf_init_dynamic(&buf); + k5_buf_init_dynamic(&buf); while (TRUE) { count = strcspn(in, special); - krb5int_buf_add_len(&buf, in, count); + k5_buf_add_len(&buf, in, count); in += count; if (*in == '\0') break; - krb5int_buf_add_fmt(&buf, "\\%2x", (unsigned char)*in++); + k5_buf_add_fmt(&buf, "\\%2x", (unsigned char)*in++); } - return krb5int_buf_data(&buf); + return k5_buf_data(&buf); } static int diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c index 7f73fbd25..b33ce749b 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_nss.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_nss.c @@ -2053,39 +2053,34 @@ reassemble_pkcs11_name(PLArenaPool *pool, pkinit_identity_opts *idopts) int n = 0; char *ret; - krb5int_buf_init_dynamic(&buf); - krb5int_buf_add(&buf, "PKCS11:"); + k5_buf_init_dynamic(&buf); + k5_buf_add(&buf, "PKCS11:"); n = 0; if (idopts->p11_module_name != NULL) { - krb5int_buf_add_fmt(&buf, "%smodule_name=%s", - n++ ? "," : "", - idopts->p11_module_name); + k5_buf_add_fmt(&buf, "%smodule_name=%s", n++ ? "," : "", + idopts->p11_module_name); } if (idopts->token_label != NULL) { - krb5int_buf_add_fmt(&buf, "%stoken=%s", - n++ ? "," : "", - idopts->token_label); + k5_buf_add_fmt(&buf, "%stoken=%s", n++ ? "," : "", + idopts->token_label); } if (idopts->cert_label != NULL) { - krb5int_buf_add_fmt(&buf, "%scertlabel=%s", - n++ ? "," : "", - idopts->cert_label); + k5_buf_add_fmt(&buf, "%scertlabel=%s", n++ ? "," : "", + idopts->cert_label); } if (idopts->cert_id_string != NULL) { - krb5int_buf_add_fmt(&buf, "%scertid=%s", - n++ ? "," : "", - idopts->cert_id_string); + k5_buf_add_fmt(&buf, "%scertid=%s", n++ ? "," : "", + idopts->cert_id_string); } if (idopts->slotid != PK_NOSLOT) { - krb5int_buf_add_fmt(&buf, "%sslotid=%ld", - n++ ? "," : "", - (long)idopts->slotid); + k5_buf_add_fmt(&buf, "%sslotid=%ld", n++ ? "," : "", + (long)idopts->slotid); } - if (krb5int_buf_len(&buf) >= 0) - ret = PORT_ArenaStrdup(pool, krb5int_buf_data(&buf)); + if (k5_buf_len(&buf) >= 0) + ret = PORT_ArenaStrdup(pool, k5_buf_data(&buf)); else ret = NULL; - krb5int_free_buf(&buf); + k5_free_buf(&buf); return ret; } diff --git a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c index 17c37c66b..0360736d9 100644 --- a/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c +++ b/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c @@ -4491,39 +4491,34 @@ reassemble_pkcs11_name(pkinit_identity_opts *idopts) int n = 0; char *ret; - krb5int_buf_init_dynamic(&buf); - krb5int_buf_add(&buf, "PKCS11:"); + k5_buf_init_dynamic(&buf); + k5_buf_add(&buf, "PKCS11:"); n = 0; if (idopts->p11_module_name != NULL) { - krb5int_buf_add_fmt(&buf, "%smodule_name=%s", - n++ ? "," : "", - idopts->p11_module_name); + k5_buf_add_fmt(&buf, "%smodule_name=%s", n++ ? "," : "", + idopts->p11_module_name); } if (idopts->token_label != NULL) { - krb5int_buf_add_fmt(&buf, "%stoken=%s", - n++ ? "," : "", - idopts->token_label); + k5_buf_add_fmt(&buf, "%stoken=%s", n++ ? "," : "", + idopts->token_label); } if (idopts->cert_label != NULL) { - krb5int_buf_add_fmt(&buf, "%scertlabel=%s", - n++ ? "," : "", - idopts->cert_label); + k5_buf_add_fmt(&buf, "%scertlabel=%s", n++ ? "," : "", + idopts->cert_label); } if (idopts->cert_id_string != NULL) { - krb5int_buf_add_fmt(&buf, "%scertid=%s", - n++ ? "," : "", - idopts->cert_id_string); + k5_buf_add_fmt(&buf, "%scertid=%s", n++ ? "," : "", + idopts->cert_id_string); } if (idopts->slotid != PK_NOSLOT) { - krb5int_buf_add_fmt(&buf, "%sslotid=%ld", - n++ ? "," : "", - (long)idopts->slotid); + k5_buf_add_fmt(&buf, "%sslotid=%ld", n++ ? "," : "", + (long)idopts->slotid); } - if (krb5int_buf_len(&buf) >= 0) - ret = strdup(krb5int_buf_data(&buf)); + if (k5_buf_len(&buf) >= 0) + ret = strdup(k5_buf_data(&buf)); else ret = NULL; - krb5int_free_buf(&buf); + k5_free_buf(&buf); return ret; } |