mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
vpnmain.cgi: Generate random UUIDs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
# #
|
# #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
use Data::UUID;
|
||||||
use MIME::Base64;
|
use MIME::Base64;
|
||||||
use Net::DNS;
|
use Net::DNS;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
@@ -1184,11 +1185,14 @@ END
|
|||||||
&General::readhasharray("${General::swroot}/vpn/config", \%confighash);
|
&General::readhasharray("${General::swroot}/vpn/config", \%confighash);
|
||||||
my $key = $cgiparams{'KEY'};
|
my $key = $cgiparams{'KEY'};
|
||||||
|
|
||||||
my $uuid1 = "AAAABBBB";
|
# Create a UUID generator
|
||||||
my $uuid2 = "CCCCDDDD";
|
my $uuid = Data::UUID->new();
|
||||||
|
|
||||||
|
my $uuid1 = $uuid->create_str();
|
||||||
|
my $uuid2 = $uuid->create_str();
|
||||||
|
|
||||||
my $cert = "";
|
my $cert = "";
|
||||||
my $cert_uuid = "123456789";
|
my $cert_uuid = $uuid->create_str();
|
||||||
|
|
||||||
# Read and encode certificate
|
# Read and encode certificate
|
||||||
if ($confighash{$key}[4] eq "cert") {
|
if ($confighash{$key}[4] eq "cert") {
|
||||||
|
|||||||
Reference in New Issue
Block a user