Bug #74826 [Opn->Csd]: libsodium does not appear to be present

From: Date: Tue, 11 Jul 2017 07:06:55 +0000
Subject: Bug #74826 [Opn->Csd]: libsodium does not appear to be present
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209977@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74826&edit=1 ID: 74826 Updated by: requinix@php.net Reported by: terrafrost@php.net Summary: libsodium does not appear to be present -Status: Open +Status: Closed Type: Bug Package: *Encryption and hash functions Operating System: Windows 10 PHP Version: 7.2.0alpha2 -Assigned To: +Assigned To: requinix Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. ~/php$ master/bin/php -v PHP 7.2.0-dev (cli) (built: Jul 10 2017 23:24:01) ( NTS DEBUG ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies ~/php$ master/bin/php -i | grep sodium sodium sodium support => enabled libsodium headers version => 1.0.8 libsodium library version => 1.0.8 But see bug #74896. Previous Comments: ------------------------------------------------------------------------ [2017-06-29 03:13:13] requinix@php.net PR is being worked on https://github.com/php/php-src/pull/2560 and feature freeze isn't until July 20th. I'll leave this open as a reminder but right now there is no problem. Note that it will use global functions and constants, not a namespace. $bob_seed = sodium_randombytes_buf(SODIUM_CRYPTO_SIGN_SEEDBYTES); $bob_sign_kp = sodium_crypto_sign_seed_keypair($bob_seed); ------------------------------------------------------------------------ [2017-06-29 02:18:54] terrafrost@php.net Description: ------------ I downloaded PHP 7.2.0alpha2 for Windows / VC15 x64 Non Thread Safe (2017-Jun-21 00:03:34) and I'm not seeing libsodium in it. According to https://wiki.php.net/rfc/libsodium it's supposed to be in PHP 7.2. I don't see any "sodium" or "libsodium" extension in the ext directory. The word "sodium" does not appear in the output of php -i: https://pastebin.com/N8wtGG8c I also tried the example at the end of https://paragonie.com/book/pecl-libsodium/read/05-publickey-crypto.md#crypto-sign-seed-keypair and it didn't work. Test script: --------------- <?php $bob_seed = \Sodium\randombytes_buf(\Sodium\CRYPTO_SIGN_SEEDBYTES); $bob_sign_kp = \Sodium\crypto_sign_seed_keypair($bob_seed); Expected result: ---------------- Not a Fatal error... Actual result: -------------- Fatal error: Uncaught Error: Call to undefined function Sodium\randombytes_buf() in C:\path\to\test.php:3 Stack trace: #0 {main} thrown in C:\path\to\test.php on line 3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74826&edit=1

« previous php.bugs (#209977) next »