|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.nikhef.slcshttps.PKCS12Https.StdioComm
static class PKCS12Https.StdioComm
This Implementation uses only stdio/stderr
for I/O.
PKCS12Https.PKCS12Communicator
Constructor Summary | |
---|---|
PKCS12Https.StdioComm()
|
Method Summary | |
---|---|
void |
error(String filename,
Exception e)
Called when an error occurs, printing an error string about the filename (if non-null) and the Throwable.getMessage() from
e (when non-null) on stderr . |
String |
getFile(String path)
Method to get the PKCS12 filename from the user, using stdout and ConsoleTools.readLine() . |
char[] |
getPassword(String prompt)
Method to get the PKCS12 password from the user, using ConsoleTools.getPassword(String) . |
void |
success(String filename,
String subject)
Called when the PKCS12 file is successfully imported and the certificate stored; when PKCS12Https.getShowSuccess() equals
true it will print a confirmation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
PKCS12Https.StdioComm()
Method Detail |
---|
public char[] getPassword(String prompt) throws IOException
ConsoleTools.getPassword(String)
.
getPassword
in interface PKCS12Https.PKCS12Communicator
prompt
- String
to print before input.
IOException
- upon I/O errorpublic String getFile(String path) throws IOException
stdout
and ConsoleTools.readLine()
.
getFile
in interface PKCS12Https.PKCS12Communicator
path
- String
path to start in, use as offset.
IOException
- upon I/O error (including unreadability).public void error(String filename, Exception e) throws IOException
Throwable.getMessage()
from
e
(when non-null) on stderr
.
error
in interface PKCS12Https.PKCS12Communicator
filename
- String
describing the PKCS12 filename
which was tried.e
- Exception
that caused the error (if any).
IOException
- with a (new) description of the problempublic void success(String filename, String subject)
PKCS12Https.getShowSuccess()
equals
true
it will print a confirmation.
success
in interface PKCS12Https.PKCS12Communicator
filename
- String
describing the PKCS12 filename
which was imported.subject
- String
describing the Subject DN of the
certificate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
nl.nikhef.slcshttps | Mischa Sallé - msalle(AT)nikhef.nl |