Skip to content

Commit

Permalink
Merge pull request #22 from kaylanm/tktauthdigest_fix
Browse files Browse the repository at this point in the history
Fix TKTAuthDigest algorithm selection.
  • Loading branch information
manuelkasper authored Mar 1, 2017
2 parents 376feb3 + 694b9a5 commit 548af3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v0.11 (2017-02-28)
- Fixes selection of digest algorithm when using TKTAuthDigest.

v0.10 (2016-12-16)
------------------
- New option TKTAuthDigest allowing selection of the digest algorithm.
Expand Down
12 changes: 6 additions & 6 deletions src/mod_auth_pubtkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,17 @@ static const char *setup_pubkey(cmd_parms *cmd, void *cfg, const char *param) {
static const char *setup_digest(cmd_parms *cmd, void *cfg, const char *param) {
auth_pubtkt_dir_conf *conf = (auth_pubtkt_dir_conf*)cfg;

if (strcasecmp(param, "SHA1")) {
if (strcasecmp(param, "SHA1") == 0) {
conf->digest = EVP_sha1();
} else if (strcasecmp(param, "DSS1")) {
} else if (strcasecmp(param, "DSS1") == 0) {
conf->digest = EVP_dss1();
} else if (strcasecmp(param, "SHA224")) {
} else if (strcasecmp(param, "SHA224") == 0) {
conf->digest = EVP_sha224();
} else if (strcasecmp(param, "SHA256")) {
} else if (strcasecmp(param, "SHA256") == 0) {
conf->digest = EVP_sha256();
} else if (strcasecmp(param, "SHA384")) {
} else if (strcasecmp(param, "SHA384") == 0) {
conf->digest = EVP_sha384();
} else if (strcasecmp(param, "SHA512")) {
} else if (strcasecmp(param, "SHA512") == 0) {
conf->digest = EVP_sha512();
} else {
return apr_pstrcat(cmd->pool, cmd->cmd->name, ": Invalid digest algorithm ", param, NULL);
Expand Down

0 comments on commit 548af3d

Please sign in to comment.