Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #20717

Closed (moved)
(moved)
Open
Created 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
Time tracking