Commit Graph
21 Commits
Author SHA1 Message Date
Christopher Denny 01131ea73e Made CertWithAlias type nonexportable. 2016-06-07 13:12:15 -07:00
Christopher Denny 248a04a234 Cleaned up alias output.
No longer uses separate arrays for certs and their aliases. Now both are
contained in a single struct called CertWithAlias. An array of these
are passed around instead of two separate arrays, one for certs and one
for their aliases.
2016-06-07 12:59:21 -07:00
Christopher Denny 297aa9246a Added support to output alias info for jceks certs.
GetCerts now returns an array of alias strings along with certs,
the array contains empty strings if not jceks. DisplayCerts
now takes in an alias string along with the cert and only prints
it if non empty.
2016-06-06 16:13:27 -07:00
Christopher Denny 649a7e64b2 Changed alias password request for jceks to use printf made 'alias' lowercase. 2016-06-03 13:56:15 -07:00
Christopher Denny e68f592713 JCEKS support also finds certs tied to private keys.A
Uses the GetPrivateKeyAndCerts method from jceks package to find
these additional certs.
2016-06-03 13:35:44 -07:00
Christopher Denny aeb0a62d46 Changed case checking for user input of JKS to check for JCEKS 2016-06-03 13:15:59 -07:00
Christopher Denny 6aed39208c Added jceks support. Uses jceks package to parse files. 2016-06-03 13:14:01 -07:00
Cedric Staub ce009228ac Guess more formats, clean up guessing code 2016-06-03 12:14:46 -07:00
Christopher Denny 42f749ac1c Absent cert fields no longer print N/A, they just don't print at all.
-Switched from spaces to tabs
-Note, if either Subject or Issuer have ALL fields not present it'll still print "subject info:" or "issuer info:"
2016-06-02 16:22:50 -07:00
Christopher Denny d86830f197 Fixed empty fields in output, output of large arrays, and ip addresses and emails
-If a field in a cert is blank, prints N/A
-Large arrays are now newline separated in the output, instead of all on one line
-Displays cert alternate ip addresses and email addresses as well
2016-06-02 14:54:25 -07:00
Christopher Denny eb8cfd2730 Added formatting for when multiple certs are in a single file. Each
cert is now newline separated and they are numbered off.
2016-06-02 11:20:13 -07:00
Christopher Denny abdfdc9ed1 Updated document style to match go design doc. Changed color display
methods to return a string of the correct color, rather than printing
it and returning an empty string. Changed names of color display methods
to certStart and certEnd.
2016-06-01 16:25:01 -07:00
Christopher Denny 1e2cdd799b Added color output for start and expiry dates, documented methods.
displayCert now prints out the start or expiry date in different colors
depending on how close the deadline is. Also all methods have comments
explaining arguments/return value and basic overview.
2016-06-01 15:27:58 -07:00
Cedric Staub 0ef272def6 Add license headers 2016-06-01 14:03:26 -07:00
Christopher Denny 25c29ea78f Now supports multiple certs in a single pkcs12 file. 2016-06-01 13:16:03 -07:00
Christopher Denny 4efaaf765f Moved code to display certificates to separate file, (display.go). Still
uses println instead of templates.
2016-05-31 17:08:31 -07:00
Christopher Denny c8e6ba9f39 Changed pkcs12 support to first convert to pem. THIS DOES NOT WORK PROPERLY YET. Still need to look into why
using pkcs12.ToPem causes errors when parsing the resulting data when using x509.ParseCertificates().
2016-05-31 15:59:43 -07:00
Christopher Denny c13b09abe7 Added support for the command line interface kingpin, has basic error handling.
I still need to changed the p12 support to display all the certificates present. pkcs12.decode only
returns one cert even if more present. Going to use pkcs12.topem to convert to pem which I know
how to get all the certs from.
2016-05-31 14:19:03 -07:00
Christopher Denny 60c91d7204 main.go wasn't added to the previous commit? So here's that. 2016-05-27 16:36:32 -07:00
Christopher Denny 9b6c725a6b -Added support for reading .p12 certs.
-Separated out different functions a little better (parsing files/displaying).
-Added new certs/keys in certs folder to use when testing.
2016-05-27 16:32:54 -07:00
Christopher DennyandSarah Harvey dad3ab27b7 first few files, main.go can work with .pem files that have just certs in them. Sample .pem and .jceks included as well 2016-05-27 13:25:09 -07:00