Skip to content

Commit

Permalink
Add rule and test for ocb license detection #2670
Browse files Browse the repository at this point in the history
This is a basic correction for this license detection issue.

Reported-by: Mikko Murto <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne committed Aug 27, 2021
1 parent 5db9d05 commit e9286de
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/licensedcode/data/rules/ocb-open-source-2013_9.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
https://www.cs.ucdavis.edu/~rogaway/ocb/license1.pdf
License for
Open-Source Software Implementations of OCB (Jan 9, 2013) License 1
Under this license, you are authorized to make, use, and distribute open-source software
implementations of OCB. This license terminates for you if you sue someone over their open-source
software implementation of OCB claiming that you have a patent covering their implementation.

This is a non-binding summary of a legal document (the link above). The parameters of the license
are specified in the license document and that document is controlling.
3 changes: 3 additions & 0 deletions src/licensedcode/data/rules/ocb-open-source-2013_9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
license_expression: ocb-open-source-2013
is_license_notice: yes
relevance: 100
21 changes: 21 additions & 0 deletions tests/licensedcode/data/datadriven/lic4/ocb.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* An implementation of <a href="https://tools.ietf.org/html/rfc7253">RFC 7253 on The OCB
* Authenticated-Encryption Algorithm</a>, licensed per:
* <p>
* <blockquote> <a href="https://www.cs.ucdavis.edu/~rogaway/ocb/license1.pdf">License for
* Open-Source Software Implementations of OCB</a> (Jan 9, 2013) &mdash; &ldquo;License 1&rdquo; <br>
* Under this license, you are authorized to make, use, and distribute open-source software
* implementations of OCB. This license terminates for you if you sue someone over their open-source
* software implementation of OCB claiming that you have a patent covering their implementation.
* <p>
* This is a non-binding summary of a legal document (the link above). The parameters of the license
* are specified in the license document and that document is controlling. </blockquote>
*/
public class OCBBlockCipher
implements AEADBlockCipher
{
private static final int BLOCK_SIZE = 16;

private BlockCipher hashCipher;
private BlockCipher mainCipher;

3 changes: 3 additions & 0 deletions tests/licensedcode/data/datadriven/lic4/ocb.java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
license_expressions:
- ocb-open-source-2013

0 comments on commit e9286de

Please sign in to comment.