Skip to content

Commit 977a264

Browse files
committed
WL#15135 patch #1: NodeCertificate classes
Part of WL#15135 Certificate Architecture This patch introduces a set of C++ classes to implement the creation of private keys, PKCS#10 signing requests, and X.509 certificates for NDB cluster. The TlsSearchPath class provides searching for files over a delimited list of directories. The PrivateKey and Certificate classes provide simple wrappers over the OpenSSL routines to create, free, save, and open keys and certificates. Classes PendingPrivateKey and PendingCertificate implement file naming conventions and life cycle for pending key pairs; ActivePrivateKey and ActiveCertificate implement them for active key pairs. Class SigningRequest provides the naming conventions and life cycle for PKCS#10 CSRs. Class NodeCertificate is the primary in-memory representation of a node's TLS credentials. A unit test, NodeCertificate-t, is intended to thoroughly test the whole suite of classes. It should be possible to run this test under valgrind with no reported leaks. Change-Id: I76bf719375ab2a9b6a97245e326158a49dde28c2
1 parent 321eb98 commit 977a264

File tree

4 files changed

+2195
-1
lines changed

4 files changed

+2195
-1
lines changed

storage/ndb/include/util/File.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
#include <ndb_global.h>
2929
#include <time.h>
3030

31+
#ifdef _WIN32
32+
#include <io.h>
33+
#define S_IRUSR _S_IREAD
34+
#define S_IRGRP _S_IREAD
35+
#define S_IROTH _S_IREAD
36+
#define S_IWUSR _S_IWRITE
37+
#define S_IWGRP _S_IWRITE
38+
#define S_IWOTH _S_IWRITE
39+
#endif
40+
3141
/**
3242
* This class provides a file abstraction . It has operations
3343
* to create, read, write and delete a file.

0 commit comments

Comments
 (0)