|
1 | 1 | /* |
2 | | - Copyright (c) 2024, VeriSign, Inc. |
| 2 | + Copyright (c) 2025, VeriSign, Inc. |
3 | 3 | All rights reserved. |
4 | 4 |
|
5 | 5 | Redistribution and use in source and binary forms, with or without |
|
39 | 39 | #include "mtlverify.h" |
40 | 40 | #include "mtl_example_util.h" |
41 | 41 |
|
42 | | - #include <openssl/evp.h> |
43 | | - |
44 | | - |
45 | | -/***************************************************************** |
46 | | -* Get Underlying Signature |
47 | | -****************************************************************** |
48 | | - * @param algo_str, C character string representing the algorithm |
49 | | - * @return ALGORITHM structure element with the properties for |
50 | | - * the specific algorithm, or NULL if not found |
51 | | - */ |
52 | | -ALGORITHM *get_underlying_signature(char *algo_str, ALGORITHM* algos) |
53 | | -{ |
54 | | - uint16_t algo_idx = 0; |
55 | | - |
56 | | - while (algos[algo_idx].name != NULL) { |
57 | | - if (strcmp(algos[algo_idx].name, (char *)algo_str) == 0) { |
58 | | - return &algos[algo_idx]; |
59 | | - } |
60 | | - algo_idx++; |
61 | | - } |
62 | | - |
63 | | - return NULL; |
64 | | -} |
65 | | - |
66 | | - |
| 42 | +#include <openssl/evp.h> |
67 | 43 |
|
68 | 44 | /***************************************************************** |
69 | 45 | * Convert a string to upper case in place |
@@ -326,15 +302,13 @@ void mtl_print_message(uint8_t* message, uint32_t message_len, FILE* stream) { |
326 | 302 | } |
327 | 303 |
|
328 | 304 |
|
329 | | -void mtl_print_signature_scheme(ALGORITHM* algo, FILE* stream) { |
| 305 | +void mtl_print_signature_scheme(MTL_ALGORITHM_PROPS* algo, FILE* stream) { |
330 | 306 | if(stream != NULL) { |
331 | 307 | verbose_print_block("MTL Signature Scheme", stream); |
332 | 308 | verbose_print_string("Scheme", algo->name, stream); |
333 | 309 | verbose_print_number("Security Param", algo->sec_param, stream); |
334 | | - verbose_print_number("NIST Level", algo->nist_level, stream); |
335 | 310 | verbose_print_hex("Randomizing", algo->randomize, stream); |
336 | | - verbose_print_hex("Robust", algo->robust, stream); |
337 | | - verbose_print_string("Underlying Sig", algo->oqs_str, stream); |
| 311 | + verbose_print_string("Underlying Sig", algo->scheme_str, stream); |
338 | 312 | verbose_print_number("OID Length", algo->oid_len, stream); |
339 | 313 | verbose_print_buffer("OID Value", algo->oid, algo->oid_len, stream); |
340 | 314 | verbose_print_block("", stream); |
|
0 commit comments