Skip to content

Commit

Permalink
Merge branch 'develop' into IS-495-catchup-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Dec 26, 2024
2 parents 420b267 + 58c1f2e commit 1eeea96
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion catchup/client/CatchupClientAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ void CatchupClientAgent::workerThreadItemSendLoop( CatchupClientAgent* _agent )

do {
uint64_t random;
getrandom( &random, sizeof( random ), 0 );
int res = getrandom( &random, sizeof( random ), 0 );
CHECK_STATE( res > 0 );
startIndex = random % nodeCount + 1;
} while ( startIndex == ( uint64_t ) selfIndex );

Expand Down
2 changes: 2 additions & 0 deletions crypto/ConsensusEdDSASignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#ifndef SKALED_CONSENSUSEDDSASIGNATURE_H
#define SKALED_CONSENSUSEDDSASIGNATURE_H

#pragma GCC diagnostic ignored "-Wreturn-type"

#include "ThresholdSignature.h"

class ConsensusEdDSASigShareSet;
Expand Down
3 changes: 2 additions & 1 deletion crypto/CryptoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1266,10 +1266,11 @@ void CryptoManager::generateSSLClientCertAndKey( string& _fullPathToDir ) {
std::string random_string;
std::generate_n( std::back_inserter( random_string ), 10,
[&]() { return VALID_CHARS[distribution( generator )]; } );
system(
int res = system(
( "/usr/bin/openssl req -new -sha256 -nodes -out " + _fullPathToDir +
"/csr -newkey rsa:2048 -keyout " + _fullPathToDir + "/key -subj /CN=" + random_string )
.data() );
CHECK_STATE(res == 0);
string str, csr;
ifstream file;
file.open( _fullPathToDir + "/csr" );
Expand Down

0 comments on commit 1eeea96

Please sign in to comment.