Refreshing TLS files was done to an incorrect location that resulted in random memory being wiped out. Also fixed a typo that loaded the key bytes into the CA bytes in some cases.
This commit is contained in:
parent
cc10aef548
commit
6f4d6f1923
|
@ -287,7 +287,7 @@ ACTOR static Future<Void> readEntireFile( std::string filename, std::string* des
|
|||
throw file_too_large();
|
||||
}
|
||||
destination->resize(filesize);
|
||||
wait(success(file->read(&destination[0], filesize, 0)));
|
||||
wait(success(file->read(&((*destination)[0]), filesize, 0)));
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ ACTOR Future<LoadedTLSConfig> TLSConfig::loadAsync(const TLSConfig* self) {
|
|||
if (CAPath.size()) {
|
||||
reads.push_back( readEntireFile( CAPath, &loaded.tlsCABytes ) );
|
||||
} else {
|
||||
loaded.tlsCABytes = self->tlsKeyBytes;
|
||||
loaded.tlsCABytes = self->tlsCABytes;
|
||||
}
|
||||
|
||||
wait(waitForAll(reads));
|
||||
|
|
Loading…
Reference in New Issue