~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/common/secret.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-08-27 08:23:21 UTC
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20120827082321-2cfej6ddvk63vsqq
Tags: upstream-0.48.1
ImportĀ upstreamĀ versionĀ 0.48.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
  char payload[((secret_len * 3) / 4) + 4];
59
59
  char error_buf[80];
60
60
 
 
61
  if (!secret_len) {
 
62
    fprintf(stderr, "secret is empty.\n");
 
63
    return -EINVAL;
 
64
  }
 
65
 
61
66
  ret = ceph_unarmor(payload, payload+sizeof(payload), secret, secret+secret_len);
62
67
  if (ret < 0) {
63
68
    fprintf(stderr, "secret is not valid base64: %s.\n",