diff options
author | Simo Sorce <simo@redhat.com> | 2015-06-13 16:46:40 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-06-13 17:27:25 -0400 |
commit | c4aa3d46e334461988acf17596fd34a6baa82aa3 (patch) | |
tree | 028c80264b4e3a4492234b63b50b58eb6d7e60c5 /src/crypto.c | |
parent | 0de0d0789d32b3517a75e77e5358303f73d84ad4 (diff) | |
download | mod_auth_gssapi-c4aa3d46e334461988acf17596fd34a6baa82aa3.tar.gz mod_auth_gssapi-c4aa3d46e334461988acf17596fd34a6baa82aa3.tar.xz mod_auth_gssapi-c4aa3d46e334461988acf17596fd34a6baa82aa3.zip |
Optimize BASIC AUTH checks with sessions.
If sessions are enbled store a MAC of the password and use it to check
if the password is the same on follow-up requests. If it is, avoid the
whole gssapi dance and use the session data instead.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/crypto.c')
-rw-r--r-- | src/crypto.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crypto.c b/src/crypto.c index 54cb0c7..07c078c 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -233,3 +233,12 @@ done: EVP_CIPHER_CTX_cleanup(&ctx); return err; } + +int get_mac_size(struct seal_key *skey) +{ + if (skey) { + return skey->md->md_size; + } else { + return 0; + } +} |