Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #20717

Closed (moved)
Open
Opened Nov 18, 2016 by Chelsea Komlo@chelsea

Hashing api should return negative values for errors

In crypto.c, the hashing API currently returns 1 for error, 0 on success. Specifically in: crypto_digest, crypto_digest256, and crypto_digest512.

This is often misinterpreted in calling functions. For example, crypto_pk_get_digest and crypto_pk_private_sign_digest both incorrectly assume negative error return values.

The fix for this should refactor to return -1 on error, and change calling functions that currently expect 1 on error, such as crypto_expand_key_material_TAP and crypto_pk_get_hashed_fingerprint.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.3.0.x-final
Milestone
Tor: 0.3.0.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#20717