]> git.pld-linux.org Git - packages/openssh.git/blob - openssl3.0.patch
Rel 5; add upstream official fixes for stable release (https://lists.mindrot.org...
[packages/openssh.git] / openssl3.0.patch
1 --- openssh-8.9p1/regress/misc/sk-dummy/sk-dummy.c.orig 2022-02-23 12:31:11.000000000 +0100
2 +++ openssh-8.9p1/regress/misc/sk-dummy/sk-dummy.c      2022-03-16 08:49:30.708560186 +0100
3 @@ -326,7 +326,7 @@
4         BIO *bio = NULL;
5         EVP_PKEY *pk = NULL;
6         EC_KEY *ec = NULL;
7 -       SHA2_CTX ctx;
8 +       SHA256_CTX ctx;
9         uint8_t apphash[SHA256_DIGEST_LENGTH];
10         uint8_t sighash[SHA256_DIGEST_LENGTH];
11         uint8_t countbuf[4];
12 @@ -356,9 +356,9 @@
13         }
14         /* Prepare data to be signed */
15         dump("message", message, message_len);
16 -       SHA256Init(&ctx);
17 -       SHA256Update(&ctx, (const u_char *)application, strlen(application));
18 -       SHA256Final(apphash, &ctx);
19 +       SHA256_Init(&ctx);
20 +       SHA256_Update(&ctx, (const u_char *)application, strlen(application));
21 +       SHA256_Final(apphash, &ctx);
22         dump("apphash", apphash, sizeof(apphash));
23         countbuf[0] = (counter >> 24) & 0xff;
24         countbuf[1] = (counter >> 16) & 0xff;
25 @@ -366,12 +366,12 @@
26         countbuf[3] = counter & 0xff;
27         dump("countbuf", countbuf, sizeof(countbuf));
28         dump("flags", &flags, sizeof(flags));
29 -       SHA256Init(&ctx);
30 -       SHA256Update(&ctx, apphash, sizeof(apphash));
31 -       SHA256Update(&ctx, &flags, sizeof(flags));
32 -       SHA256Update(&ctx, countbuf, sizeof(countbuf));
33 -       SHA256Update(&ctx, message, message_len);
34 -       SHA256Final(sighash, &ctx);
35 +       SHA256_Init(&ctx);
36 +       SHA256_Update(&ctx, apphash, sizeof(apphash));
37 +       SHA256_Update(&ctx, &flags, sizeof(flags));
38 +       SHA256_Update(&ctx, countbuf, sizeof(countbuf));
39 +       SHA256_Update(&ctx, message, message_len);
40 +       SHA256_Final(sighash, &ctx);
41         dump("sighash", sighash, sizeof(sighash));
42         /* create and encode signature */
43         if ((sig = ECDSA_do_sign(sighash, sizeof(sighash), ec)) == NULL) {
44 @@ -417,7 +417,7 @@
45  {
46         size_t o;
47         int ret = -1;
48 -       SHA2_CTX ctx;
49 +       SHA256_CTX ctx;
50         uint8_t apphash[SHA256_DIGEST_LENGTH];
51         uint8_t signbuf[sizeof(apphash) + sizeof(flags) +
52             sizeof(counter) + SHA256_DIGEST_LENGTH];
53 @@ -435,9 +435,9 @@
54         }
55         /* Prepare data to be signed */
56         dump("message", message, message_len);
57 -       SHA256Init(&ctx);
58 -       SHA256Update(&ctx, (const u_char *)application, strlen(application));
59 -       SHA256Final(apphash, &ctx);
60 +       SHA256_Init(&ctx);
61 +       SHA256_Update(&ctx, (const u_char *)application, strlen(application));
62 +       SHA256_Final(apphash, &ctx);
63         dump("apphash", apphash, sizeof(apphash));
64  
65         memcpy(signbuf, apphash, sizeof(apphash));
66 @@ -495,7 +495,7 @@
67  {
68         struct sk_sign_response *response = NULL;
69         int ret = SSH_SK_ERR_GENERAL;
70 -       SHA2_CTX ctx;
71 +       SHA256_CTX ctx;
72         uint8_t message[32];
73  
74         if (sign_response == NULL) {
75 @@ -509,9 +509,9 @@
76                 skdebug(__func__, "calloc response failed");
77                 goto out;
78         }
79 -       SHA256Init(&ctx);
80 -       SHA256Update(&ctx, data, datalen);
81 -       SHA256Final(message, &ctx);
82 +       SHA256_Init(&ctx);
83 +       SHA256_Update(&ctx, data, datalen);
84 +       SHA256_Final(message, &ctx);
85         response->flags = flags;
86         response->counter = 0x12345678;
87         switch(alg) {
This page took 0.196013 seconds and 3 git commands to generate.