[15878] in Kerberos_V5_Development

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

API proposal: krb5_enctype_to_name

daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Fri Jun 4 12:35:55 2010

Date: Fri, 4 Jun 2010 12:35:49 -0400 (EDT)
From: ghudson@mit.edu
Message-Id: <201006041635.o54GZnrM029345@outgoing.mit.edu>
To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

I think this is mostly a no-brainer, but I also think API additions
should be discussed in some form.

Currently we have krb5_enctype_to_string(), which provides an
enctype's "out_string", which is something like "DES cbc mode with
RSA-MD5".  Sometimes you want a shorter display, or you want to show
something that can be used as input.

I propose to add:

    krb5_error_code KRB5_CALLCONV
    krb5_enctype_to_name(krb5_enctype enctype, krb5_boolean short,
                         char *buffer, size_t buflen)

If short is FALSE, we return the enctype's canonical name (like
"aes128-cts-hmac-sha1-96").  If short is TRUE, we return the enctype's
shortest alias (like "rc4-hmac" or "aes128-cts").

For reference, krb5_enctype_to_string is:

    krb5_error_code KRB5_CALLCONV
    krb5_enctype_to_string(krb5_enctype enctype, char *buffer, size_t buflen)
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

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