summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/nsKeygenThread.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /security/manager/ssl/nsKeygenThread.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'security/manager/ssl/nsKeygenThread.h')
-rw-r--r--security/manager/ssl/nsKeygenThread.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/security/manager/ssl/nsKeygenThread.h b/security/manager/ssl/nsKeygenThread.h
new file mode 100644
index 000000000..139bf89f8
--- /dev/null
+++ b/security/manager/ssl/nsKeygenThread.h
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef _NSKEYGENTHREAD_H_
+#define _NSKEYGENTHREAD_H_
+
+#include "keyhi.h"
+#include "nspr.h"
+
+#include "mozilla/Mutex.h"
+#include "nsIKeygenThread.h"
+#include "nsCOMPtr.h"
+
+class nsIRunnable;
+
+class nsKeygenThread : public nsIKeygenThread
+{
+private:
+ mozilla::Mutex mutex;
+
+ nsCOMPtr<nsIRunnable> mNotifyObserver;
+
+ bool iAmRunning;
+ bool keygenReady;
+ bool statusDialogClosed;
+ bool alreadyReceivedParams;
+
+ SECKEYPrivateKey *privateKey;
+ SECKEYPublicKey *publicKey;
+ PK11SlotInfo *slot;
+ PK11AttrFlags flags;
+ PK11SlotInfo *altSlot;
+ PK11AttrFlags altFlags;
+ PK11SlotInfo *usedSlot;
+ uint32_t keyGenMechanism;
+ void *params;
+ void *wincx;
+
+ PRThread *threadHandle;
+
+protected:
+ virtual ~nsKeygenThread();
+
+public:
+ nsKeygenThread();
+
+ NS_DECL_NSIKEYGENTHREAD
+ NS_DECL_THREADSAFE_ISUPPORTS
+
+ void SetParams(
+ PK11SlotInfo *a_slot,
+ PK11AttrFlags a_flags,
+ PK11SlotInfo *a_alternative_slot,
+ PK11AttrFlags a_alternative_flags,
+ uint32_t a_keyGenMechanism,
+ void *a_params,
+ void *a_wincx );
+
+ nsresult ConsumeResult(
+ PK11SlotInfo **a_used_slot,
+ SECKEYPrivateKey **a_privateKey,
+ SECKEYPublicKey **a_publicKey);
+
+ void Join(void);
+
+ void Run(void);
+};
+
+#endif //_NSKEYGENTHREAD_H_