Commit 5892958
committed
pkey/dh: do not create legacy DH pkey
Avoid using DH_new() or d2i_DHparams_bio().
The path calling DH_new() creates an empty pkey. This is totally useless
on OpenSSL 3.0 because pkey instances are immutable.
Calling d2i_DHparams_bio() is not needed on OpenSSL 3.0. This format
should be handled by ossl_pkey_read_generic() already. Besides, it
creates a "legacy" pkey instance which prevents EVP_PKEY_todata() from
working properly.1 parent 8c5cd1d commit 5892958
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| 126 | + | |
118 | 127 | | |
119 | 128 | | |
120 | 129 | | |
| |||
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| 137 | + | |
128 | 138 | | |
129 | 139 | | |
130 | 140 | | |
| |||
0 commit comments