Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): add ocb modes to crypto, fix ccm and gcm iv #59761

Merged
merged 1 commit into from Apr 24, 2022
Merged

Conversation

panva
Copy link
Contributor

@panva panva commented Apr 8, 2022

AES OCB modes were added in v10.10.0. This adds the respective type definitions for OCB ciphers in crypto.createCipheriv and crypto.createDecipheriv.

Also fixes the iv being mandatory (not null) for the GCM and CCM overloads.

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

IV required for the CCM and GCM overloads

> 'ivLength' in crypto.getCipherInfo('aes-128-ccm')
true
> 'ivLength' in crypto.getCipherInfo('aes-128-gcm')
true
> 'ivLength' in crypto.getCipherInfo('aes-128-ocb')
true

@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 8, 2022

@panva Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by a DT maintainer

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 59761,
  "author": "panva",
  "headCommitOid": "29d8c4a1cf82b9058f82560ca0831b08ae32075f",
  "mergeBaseOid": "2dd25a142c4464f1cf5f0659e2779203cde454ad",
  "lastPushDate": "2022-04-24T15:15:41.000Z",
  "lastActivityDate": "2022-04-24T20:40:27.000Z",
  "mergeOfferDate": "2022-04-24T20:15:06.000Z",
  "mergeRequestDate": "2022-04-24T20:40:27.000Z",
  "mergeRequestUser": "panva",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/test/crypto.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v12/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/test/crypto.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v14/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v14/test/crypto.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v16/crypto.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v16/test/crypto.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "Microsoft",
        "DefinitelyTyped",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "hoo29",
        "kjin",
        "ajafff",
        "islishude",
        "mwiktorczyk",
        "mohsen1",
        "n-e",
        "galkin",
        "parambirs",
        "eps1lon",
        "SimonSchick",
        "ThomasdenH",
        "WilcoBakker",
        "wwwy3y3",
        "samuela",
        "kuehlein",
        "bhongy",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "ZYSzys",
        "NodeJS",
        "LinusU",
        "wafuwafu13"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2022-04-24T20:14:27.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "SimonSchick",
      "date": "2022-04-14T13:52:20.000Z",
      "abbrOid": "e133784"
    }
  ],
  "mainBotCommentID": 1092619585,
  "ciResult": "pass"
}

@panva panva marked this pull request as draft April 8, 2022 08:57
@panva panva marked this pull request as ready for review April 8, 2022 09:07
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Apr 8, 2022
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Apr 8, 2022
@typescript-bot
Copy link
Contributor

@panva The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@panva panva changed the title fix(node): add ocb modes to crypto fix(node): add ocb modes to crypto, fix ccm and gcm iv Apr 8, 2022
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Apr 8, 2022
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Apr 8, 2022
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Apr 8, 2022
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Apr 8, 2022
@typescript-bot
Copy link
Contributor

@panva The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@panva
Copy link
Contributor Author

panva commented Apr 8, 2022

CI failures are unrelated.

@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Apr 14, 2022
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Apr 14, 2022
@panva
Copy link
Contributor Author

panva commented Apr 14, 2022

When unrelated CI failures grind the very core module type definitions progress to a halt...

#59653
#59828
#59786
#59587

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Apr 14, 2022
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Apr 14, 2022
@typescript-bot
Copy link
Contributor

@panva The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

Copy link
Contributor

@SimonSchick SimonSchick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, we can probably skip with CI failures after maintainer review.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Apr 14, 2022
@panva
Copy link
Contributor Author

panva commented Apr 15, 2022

Merge? Maintainer Approved Owner Approved A listed owner of this package signed off on the pull request.

Let's get this in before work on v18 starts.

@peterblazejewicz
Copy link
Member

FYI: I've updated from master giving it fixes to types to pass CI

@typescript-bot typescript-bot removed Owner Approved A listed owner of this package signed off on the pull request. Maintainer Approved The CI failed When GH Actions fails labels Apr 24, 2022
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Apr 24, 2022
@typescript-bot
Copy link
Contributor

@peterblazejewicz, @SimonSchick Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Apr 24, 2022
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Apr 24, 2022
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Apr 24, 2022
@typescript-bot
Copy link
Contributor

@panva: Everything looks good here. I am ready to merge this PR (at 29d8c4a) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@microsoft, @DefinitelyTyped, @jkomyno, @alvis, @r3nya, @btoueg, @smac89, @Touffy, @DeividasBakanas, @eyqs, @Hannes-Magnusson-CK, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @n-e, @galkin, @parambirs, @eps1lon, @SimonSchick, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @bhongy, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @ZYSzys, @nodejs, @LinusU, @wafuwafu13: you can do this too.)

@typescript-bot
Copy link
Contributor

@SimonSchick Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@panva
Copy link
Contributor Author

panva commented Apr 24, 2022

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Apr 24, 2022
@typescript-bot typescript-bot merged commit c3bd79e into DefinitelyTyped:master Apr 24, 2022
@panva panva deleted the ocb branch April 24, 2022 21:12
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants