File tree 4 files changed +9
-9
lines changed
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,11 @@ impl DHPrivateKey {
154
154
fn exchange < ' p > (
155
155
& self ,
156
156
py : pyo3:: Python < ' p > ,
157
- public_key : & DHPublicKey ,
157
+ peer_public_key : & DHPublicKey ,
158
158
) -> CryptographyResult < & ' p pyo3:: types:: PyBytes > {
159
159
let mut deriver = openssl:: derive:: Deriver :: new ( & self . pkey ) ?;
160
160
deriver
161
- . set_peer ( & public_key . pkey )
161
+ . set_peer ( & peer_public_key . pkey )
162
162
. map_err ( |_| pyo3:: exceptions:: PyValueError :: new_err ( "Error computing shared key." ) ) ?;
163
163
164
164
Ok ( pyo3:: types:: PyBytes :: new_with ( py, deriver. len ( ) ?, |b| {
Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ impl ECPrivateKey {
232
232
& self ,
233
233
py : pyo3:: Python < ' p > ,
234
234
algorithm : & pyo3:: PyAny ,
235
- public_key : & ECPublicKey ,
235
+ peer_public_key : & ECPublicKey ,
236
236
) -> CryptographyResult < & ' p pyo3:: types:: PyBytes > {
237
237
if !algorithm. is_instance ( types:: ECDH . get ( py) ?) ? {
238
238
return Err ( CryptographyError :: from (
@@ -249,12 +249,12 @@ impl ECPrivateKey {
249
249
// ECPublicKey object.
250
250
#[ cfg( CRYPTOGRAPHY_OPENSSL_300_OR_GREATER ) ]
251
251
deriver
252
- . set_peer_ex ( & public_key . pkey , false )
252
+ . set_peer_ex ( & peer_public_key . pkey , false )
253
253
. map_err ( |_| pyo3:: exceptions:: PyValueError :: new_err ( "Error computing shared key." ) ) ?;
254
254
255
255
#[ cfg( not( CRYPTOGRAPHY_OPENSSL_300_OR_GREATER ) ) ]
256
256
deriver
257
- . set_peer ( & public_key . pkey )
257
+ . set_peer ( & peer_public_key . pkey )
258
258
. map_err ( |_| pyo3:: exceptions:: PyValueError :: new_err ( "Error computing shared key." ) ) ?;
259
259
260
260
Ok ( pyo3:: types:: PyBytes :: new_with ( py, deriver. len ( ) ?, |b| {
Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ impl X25519PrivateKey {
65
65
fn exchange < ' p > (
66
66
& self ,
67
67
py : pyo3:: Python < ' p > ,
68
- public_key : & X25519PublicKey ,
68
+ peer_public_key : & X25519PublicKey ,
69
69
) -> CryptographyResult < & ' p pyo3:: types:: PyBytes > {
70
70
let mut deriver = openssl:: derive:: Deriver :: new ( & self . pkey ) ?;
71
- deriver. set_peer ( & public_key . pkey ) ?;
71
+ deriver. set_peer ( & peer_public_key . pkey ) ?;
72
72
73
73
Ok ( pyo3:: types:: PyBytes :: new_with ( py, deriver. len ( ) ?, |b| {
74
74
let n = deriver. derive ( b) . map_err ( |_| {
Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ impl X448PrivateKey {
64
64
fn exchange < ' p > (
65
65
& self ,
66
66
py : pyo3:: Python < ' p > ,
67
- public_key : & X448PublicKey ,
67
+ peer_public_key : & X448PublicKey ,
68
68
) -> CryptographyResult < & ' p pyo3:: types:: PyBytes > {
69
69
let mut deriver = openssl:: derive:: Deriver :: new ( & self . pkey ) ?;
70
- deriver. set_peer ( & public_key . pkey ) ?;
70
+ deriver. set_peer ( & peer_public_key . pkey ) ?;
71
71
72
72
Ok ( pyo3:: types:: PyBytes :: new_with ( py, deriver. len ( ) ?, |b| {
73
73
let n = deriver. derive ( b) . map_err ( |_| {
You can’t perform that action at this time.
0 commit comments