Coder Social home page Coder Social logo

microsoft / cosesigntool Goto Github PK

View Code? Open in Web Editor NEW
30.0 4.0 9.0 1.42 MB

CoseSignTool is a platform-agnostic command line application to COSE sign files and validate COSE signatures. CoseHandler is a library of functions for COSE signing and validation for use by .NET applications.

License: MIT License

C# 100.00%
cbor cose cose-parser

cosesigntool's Issues

Running the CoseSignTool without any arguments hits an exception rather than printing the helptext

I downloaded the 1.1.0 version of the CoseSignTool and the required .NET dependencies. When I ran the CoseSignTool.exe without any arguments it hit an exception:

%> CoseSignTool.exe
Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at CoseSignTool.CoseSignTool.Main(String[] args) in D:\a\CoseSignTool\CoseSignTool\CoseSignTool\CoseSignTool.cs:line 27

This is unexpected, I expected the tool to print out it's help text.

Note that when I passed in --help it worked as expected:

%> CoseSignTool.exe --help

*** CoseSignTool ***
A tool for signing, validating, and getting payload from Cose signatures.

Usage:
    ...

CoseSignTool.exe `validate` incorrectly passes validation

CoseSignTool.exe validate appears to falsely report successful validation when the certificate chain does not lead to a known root.

This appears to be isolated to just the CoseSignTool.exe validate command line tool and not the CoseHandler API.

Repro steps:

1.) Produce a detached COSE signature (See: Sign command)
1.) Make sure that the root CA of the signing certificate is not installed in trusted root store
2.) Attempt to call CoseSignTool.exe validate on the payload and previously produced .cose file with no /Roots specified
3.) Observe "Validation succeeded message"

Action required: self-attest your goal for this repository

It's time to review and renew the intent of this repository

An owner or administrator of this repository has previously indicated that this repository can not be migrate to GitHub inside Microsoft because it is going public, open source, or it is used to collaborate with external parties (customers, partners, suppliers, etc.).

Action

πŸ‘€ ✍️ In order to keep Microsoft secure, we require repository owners and administrators to review this repository and regularly renew the intent whether to opt-in or opt-out of migration to GitHub inside Microsoft which is specifically intended for private or internal projects.

❗Only users with admin permission in the repository are allowed to respond. Failure to provide a response will result to your repository getting automatically archived. πŸ”’

Instructions

❌ Opt-out of migration

If this repository can not be migrated to GitHub inside Microsoft, you can opt-out of migration by replying with a comment on this issue containing one of the following optout command options below.

@gimsvc optout --reason <staging|collaboration|delete|other>

Example: @gimsvc optout --reason staging

Options:

  • staging : My project will ship as Open Source
  • collaboration : Used for external or 3rd party collaboration with customers, partners, suppliers, etc.
  • delete : This repository will be deleted because it is no longer needed.
  • other : Other reasons not specified

βœ… Opt-in to migrate

If the circumstances of this repository has changed and you decide that you need to migrate, then you can specify the optin command below. For example, the repository is no longer going public, open source or require external collaboration.

@gimsvc optin --date <target_migration_date in mm-dd-yyyy format>

Example: @gimsvc optin --date 03-15-2023

Click here for more information about optin and optout command options and examples

Opt-in

@gimsvc optin --date <target_migration_date>

When opting-in to migrate your repository, the --date option is required followed by your specified migration date using the format: mm-dd-yyyy

@gimsvc optin --date 03-15-2023

Opt-out

@gimsvc optout --reason <staging|collaboration|delete|other>

When opting-out of migration, you need to specify the --reason.

  • staging
    • My project will ship as Open Source
  • collaboration
    • Used for external or 3rd party collaboration with customers, partners, suppliers, etc.
  • delete
    • This repository will be deleted because it is no longer needed.
  • other
    • Other reasons not specified

Examples:

@gimsvc optout --reason staging

@gimsvc optout --reason collaboration

@gimsvc optout --reason delete

@gimsvc optout --reason other

Need more help? πŸ–οΈ

Question: How to use certificate with password?

I tried to use this tool to sign SBOM for our driver package with PFX certificate with password and got error.

>"H:\Program Files\Windows Kits\10\Tools\10.0.26063.0\x64\CoseSignTool.exe" sign /PayloadFile NetKVM.sbom.json /PfxCertificate VirtIOTestCertPass.pfx
COSE Sign failed.
The specified network password is not correct.

If I try to use a certificate without a password, everything works.
How should I specify the password for the certificate? How can I use this tool to sign SBOM with an EV Code Signing token certificate?

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.