Skip to content

Commit 2a1c579

Browse files
committed
Use crypto_box_open_afternm() instead of crypto_box_afternm() when verifying vouch
1 parent 3939c78 commit 2a1c579

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcurvecpr/lib/server_recv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int _handle_initiate (struct curvecpr_server *server, struct curvecpr_ses
161161
curvecpr_bytes_zero(vouch, 16);
162162
curvecpr_bytes_copy(vouch + 16, p_box->vouch, 48);
163163

164-
if (crypto_box_afternm(vouch, vouch, 64, nonce, s_new.my_global_their_global_key))
164+
if (crypto_box_open_afternm(vouch, vouch, 64, nonce, s_new.my_global_their_global_key))
165165
return -EINVAL;
166166

167167
if (!curvecpr_bytes_equal(vouch + 32, s_new.their_session_pk, 32))

0 commit comments

Comments
 (0)