RE: what do I hash to get .subversion/auth/svn.simple file name?
From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 6 Jan 2014 21:06:41 +0100
First: Note this is an implementation detail. We don't promise that this
In the current implementation the hash string is constructed in
[[
svn_error_t *
svn_auth__file_path(const char **path,
const char *cred_kind,
const char *realmstring,
const char *config_dir,
apr_pool_t *pool)
{
const char *authdir_path, *hexname;
svn_checksum_t *checksum;
/* Construct the path to the directory containing the creds files,
e.g. "~/.subversion/auth/svn.simple". The last component is
simply the cred_kind. */
SVN_ERR(svn_config_get_user_config_path(&authdir_path, config_dir,
SVN_CONFIG__AUTH_SUBDIR, pool));
if (authdir_path)
{
authdir_path = svn_dirent_join(authdir_path, cred_kind, pool);
/* Construct the basename of the creds file. It's just the
realmstring converted into an md5 hex string. */
SVN_ERR(svn_checksum(&checksum, svn_checksum_md5, realmstring,
strlen(realmstring), pool));
hexname = svn_checksum_to_cstring(checksum, pool);
*path = svn_dirent_join(authdir_path, hexname, pool);
}
else
*path = NULL;
return SVN_NO_ERROR;
}
]]
So we calculate the md5 hash over the realm string in UTF-8 form (your first
But as noted: you should not rely on this. This format may change at any
Functions like svn_config_walk_auth_data() provide a stable api against
Bert
From: Tristan Slominski [mailto:tristan.slominski_at_gmail.com]
Hi,
I thought this was going to be easy to find out, but after hours researching
I posted it on stack overflow here:
It boils down to this:
Given ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28 with
K 8
What string to I hash to get 5671adf2865e267db74f09ba6f872c28?
I tried md5 hashing a lot of strings (first one being
Cheers,
Tristan
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.