Skip to content

Commit

Permalink
adding composite to oid_patching & updating format on encoding_patching
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Ventura <[email protected]>
  • Loading branch information
feventura committed Mar 26, 2024
1 parent bbb01c4 commit 80a5235
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 179 deletions.
8 changes: 4 additions & 4 deletions oqs-template/oqsprov/oqsprov.c/encoding_patching.fragment
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{%- endfor %}
{%- for composite_alg in variant['composite'] %}
{%- set cnt.val = cnt.val + 2 %}
if (getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}")) oqs_alg_encoding_list[{{ cnt.val }}] = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}");
if (getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}_ALGNAME")) oqs_alg_encoding_list[{{ cnt.val + 1 }}] = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}_ALGNAME");
if ((envval = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}"))) oqs_alg_encoding_list[{{ cnt.val }}] = envval;
if ((envval = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}_ALGNAME"))) oqs_alg_encoding_list[{{ cnt.val + 1 }}] = envval;
{%- endfor %}
{%- for composite_alg in variant['composite'] %}
{%- set cnt.val = cnt.val + 2 %}
if (getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}")) oqs_alg_encoding_list[{{ cnt.val }}] = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}");
if (getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}_ALGNAME")) oqs_alg_encoding_list[{{ cnt.val + 1 }}] = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}_ALGNAME");
if ((envval = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}"))) oqs_alg_encoding_list[{{ cnt.val }}] = envval;
if ((envval = getenv("OQS_ENCODING_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}_ALGNAME"))) oqs_alg_encoding_list[{{ cnt.val + 1 }}] = envval;
{%- endfor %}
{%- endfor %}
{%- endfor %}
Expand Down
4 changes: 4 additions & 0 deletions oqs-template/oqsprov/oqsprov.c/oid_patching.fragment
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
{%- set cnt.val = cnt.val + 2 %}
if ((envval = getenv("OQS_OID_{{ classical_alg['name']|upper }}_{{variant['name']|upper}}"))) oqs_oid_alg_list[{{ cnt.val }}+OQS_KEMOID_CNT] = envval;
{%- endfor %}
{%- for composite_alg in variant['composite'] %}
{%- set cnt.val = cnt.val + 2 %}
if ((envval = getenv("OQS_OID_{{variant['name']|upper}}_{{ composite_alg['name']|upper }}"))) oqs_oid_alg_list[{{ cnt.val }}+OQS_KEMOID_CNT] = envval;
{%- endfor %}
{%- endfor %}
{%- endfor %}
}
Loading

0 comments on commit 80a5235

Please sign in to comment.