1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
-
+
+
+
-
+
+
|
/*
* Digest Command and Stacked Transform Channel
* Message Digests Module
*
* Provides commands to calculate a message digest using a specified hash algorithm.
*
* Copyright (C) 2023 Brian O'Hagan
*
*/
#include "tlsInt.h"
#include "tclOpts.h"
#include <tcl.h>
#include <stdio.h>
#include <string.h>
#include <openssl/evp.h>
/* Constants */
const char *hex = "0123456789ABCDEF";
#define REASON() ERR_reason_error_string(ERR_get_error())
/* Macros */
#define BUFFER_SIZE 65536
#define BIN_FORMAT 0
#define HEX_FORMAT 1
/*
* This structure describes the per-instance state of an SSL channel.
*
|