Branch: master

fa4e7754 2015-09-18 23:00:25 Timothy Pearson
Add autoPIN method to cryptographic card module in tdehwlib
M tdecore/tdehw/tdecryptographiccarddevice.cpp
M tdecore/tdehw/tdecryptographiccarddevice.h
diff --git a/tdecore/tdehw/tdecryptographiccarddevice.cpp b/tdecore/tdehw/tdecryptographiccarddevice.cpp
index faa803f..c687643 100644
--- a/tdecore/tdehw/tdecryptographiccarddevice.cpp
+++ b/tdecore/tdehw/tdecryptographiccarddevice.cpp
@@ -570,6 +570,15 @@
 	}
 }
 
+TQString TDECryptographicCardDevice::autoPIN() {
+	// TODO
+	// Use subjAltName field in card certificate to provide the card's PIN,
+	// in order to support optional pin-less operation.
+	// FIXME
+	// Disable fully automatic card login support for now...
+	return TQString::null;
+}
+
 void TDECryptographicCardDevice::workerRequestedPin(TQString prompt) {
 	emit(pinRequested(prompt, this));
 }
diff --git a/tdecore/tdehw/tdecryptographiccarddevice.h b/tdecore/tdehw/tdecryptographiccarddevice.h
index 4e6cafa..29455ce 100644
--- a/tdecore/tdehw/tdecryptographiccarddevice.h
+++ b/tdecore/tdehw/tdecryptographiccarddevice.h
@@ -106,6 +106,16 @@
 		void setProvidedPin(TQString pin);
 
 		/**
+		 * If the inserted card and system configuration provides a PIN for automatic
+		 * pin-less operation, @returns the PIN to use when unlocking the card, otherwise
+		 * @returns TQString::null.
+		 *
+		 * @see pinRequested(TQString prompt)
+		 * @see setProvidedPin(TQString pin)
+		 */
+		TQString autoPIN();
+
+		/**
 		 * If monitoring of insert / remove events is enabled, and a card has been inserted,
 		 * decrypt data originally encrypted using a public key from one of the certificates
 		 * stored on the card.