On Mon, Jan 06, 2014 at 01:40:58PM -0600, Tristan Slominski wrote:
> I thought this was going to be easy to find out, but after hours
> researching this and trying different things, I still don't know how to
> answer the question.
> I posted it on stack overflow here:
> It boils down to this:
> Given ~/.subversion/auth/svn.simple/5671adf2865e267db74f09ba6f872c28 with
> the contents of:
> K 8
> V 3
> K 8
> V 4
> K 15
> V 45
> <https://svn.domain.com:443> Joe's repository
> What string to I hash to get 5671adf2865e267db74f09ba6f872c28?
The creds file's name is indeed the MD5 checksum of the realmstring.
This code generates the name (in subversion/libsvn_subr/config_auth.c):
/* 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,
hexname = svn_checksum_to_cstring(checksum, pool);
*path = svn_dirent_join(authdir_path, hexname, pool);
> https://svn.domain.com:443> Joe's repository"), and I can't find one that
> generates the correct hash.
I'm not sure why your example doesn't work, but with a data set
of mine I get the right hash:
$ cd ~/.subversion/auth/svn.simple
$ echo -n "<https://svn.apache.org:443> ASF Committers:443> ASF Committers" | md5
$ grep ASF ./d3c8a345b14f6a1b42251aef8027ab57
<https://svn.apache.org:443> ASF Committers
Received on 2014-01-06 21:05:50 CET