summaryrefslogtreecommitdiffstats
path: root/src/libtdeldap.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-01 19:24:59 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-01 19:24:59 -0500
commit54d8d2580c72d1313182665d49d00b6fcadbe5a7 (patch)
treea0164673fd9416e1aed461612ed29ec2975fbb2b /src/libtdeldap.h
parent0a81ad9d6e6de1748d6fcfa531c060a3a731c230 (diff)
downloadlibtdeldap-54d8d2580c72d1313182665d49d00b6fcadbe5a7.tar.gz
libtdeldap-54d8d2580c72d1313182665d49d00b6fcadbe5a7.zip
Extend user key and certificate generation methods
Diffstat (limited to 'src/libtdeldap.h')
-rw-r--r--src/libtdeldap.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libtdeldap.h b/src/libtdeldap.h
index 9c356a5..f472c6c 100644
--- a/src/libtdeldap.h
+++ b/src/libtdeldap.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012-2013 by Timothy Pearson *
+ * Copyright (C) 2012-2015 by Timothy Pearson *
* kb9vqf@pearsoncomputing.net *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -29,6 +29,7 @@
#include <tqstring.h>
#include <tqdatetime.h>
#include <tqvaluelist.h>
+#include <tqfile.h>
#include <ksimpleconfig.h>
@@ -187,6 +188,10 @@ class LDAPRealmConfig
class LDAPCertConfig
{
public:
+ LDAPCertConfig();
+ ~LDAPCertConfig();
+
+ public:
bool generate_certs;
TQString provided_kerberos_pem;
TQString provided_kerberos_pemkey;
@@ -504,12 +509,14 @@ class LDAPManager : public TQObject {
LDAPMasterReplicationInfo getLDAPMasterReplicationSettings(TQString *errstr=0);
int setLDAPMasterReplicationSettings(LDAPMasterReplicationInfo replicationinfo, TQString *errstr=0);
int writeSudoersConfFile(TQString *errstr=0);
+ int getTDECertificate(TQString certificateName, TQFile *fileHandle, TQString *errstr=0);
int getTDECertificate(TQString certificateName, TQString fileName, TQString *errstr=0);
int setPasswordForUser(LDAPUserInfo user, TQString *errstr);
static int writePrimaryRealmCertificateUpdateCronFile(TQString *errstr=0);
static TQString getMachineFQDN();
static int writeTDERealmList(LDAPRealmConfigList realms, KSimpleConfig* config, TQString *errstr=0);
+ static LDAPRealmConfigList fetchAndReadTDERealmList(TQString *defaultRealm=0);
static LDAPRealmConfigList readTDERealmList(KSimpleConfig* config, bool disableAllBonds=false);
static TQDateTime getCertificateExpiration(TQString certfile);
@@ -517,6 +524,10 @@ class LDAPManager : public TQObject {
static int generatePublicKerberosCertificate(LDAPCertConfig certinfo, LDAPRealmConfig realmcfg);
static int generatePublicLDAPCertificate(LDAPCertConfig certinfo, LDAPRealmConfig realmcfg, uid_t ldap_uid, gid_t ldap_gid);
+ static int generateClientCertificatePair(LDAPCertConfig certinfo, LDAPUserInfo user, LDAPRealmConfig realmcfg, TQString signingPrivateKeyFile, TQString privateKeyFile, TQString publicCertFile, TQString *errstr=0);
+ static int generateClientCertificatePrivateKey(LDAPUserInfo user, LDAPRealmConfig realmcfg, TQString privateKeyFile, TQString *errstr=0);
+ static int generateClientCertificatePublicCertificate(LDAPCertConfig certinfo, LDAPUserInfo user, LDAPRealmConfig realmcfg, TQString signingPrivateKeyFile, TQString privateKeyFile, TQString publicCertFile, TQString *errstr=0);
+
static TQString ldapdnForRealm(TQString realm);
static TQString openssldcForRealm(TQString realm);
static TQString cnFromDn(TQString dn);
@@ -536,6 +547,7 @@ class LDAPManager : public TQObject {
static int writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole machineRole, TQString *errstr=0);
static int writeNSSwitchFile(TQString *errstr=0);
static int writeOpenSSLConfigurationFile(LDAPRealmConfig realmcfg, TQString *errstr=0);
+ static int writeOpenSSLConfigurationFile(LDAPRealmConfig realmcfg, LDAPUserInfo user, TQString opensslConfigFile, TQString *errstr=0);
static int writeClientCronFiles(TQString *errstr=0);
static int writePAMFiles(LDAPPamConfig pamConfig, TQString *errstr=0);