├── .github └── workflows │ └── gradle-wrapper-validation.yml ├── .gitignore ├── .settings ├── .gitignore ├── org.eclipse.jdt.core.prefs └── org.eclipse.jdt.ui.prefs ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── RELEASE-v1.1.4.md ├── build.gradle ├── codecov.yml ├── docs ├── _config.yml ├── certmgr1.png ├── howtoApache │ ├── index.md │ ├── screen_export_client_chain.png │ ├── screen_export_client_crl.png │ ├── screen_export_client_crt.png │ ├── screen_export_server_chain.png │ ├── screen_export_server_crt.png │ └── screen_export_server_key.png ├── howtoExternalCA │ ├── index.md │ ├── screen_export_csr.png │ └── screen_generate_csr.png ├── howtoImport │ ├── index.md │ ├── screen_import_sources.png │ └── screen_read_result.png ├── howtoLocalCA │ ├── index.md │ ├── screen_crl.png │ ├── screen_export.png │ ├── screen_intermediate_cas.png │ ├── screen_new_store.png │ ├── screen_root_ca.png │ ├── screen_server_certificate.png │ └── screen_user_certificate.png ├── index.md └── install4j_small.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src ├── main ├── dist │ ├── README.txt │ └── license │ │ └── COPYING ├── install4j │ ├── certmgr.install4j │ ├── launcherIcon.icns │ ├── launcherIcon.ico │ ├── launcherIcon128.png │ ├── launcherIcon16.png │ ├── launcherIcon32.png │ └── launcherIcon48.png ├── java │ └── de │ │ └── carne │ │ └── certmgr │ │ ├── CertMgrMain.java │ │ ├── certs │ │ ├── CertObjectHolder.java │ │ ├── CertObjectStore.java │ │ ├── CertObjectType.java │ │ ├── CertProviderException.java │ │ ├── NoPassword.java │ │ ├── PasswordCallback.java │ │ ├── PasswordRequiredException.java │ │ ├── PersistentEntry.java │ │ ├── PersistentUserCertStoreHandler.java │ │ ├── SecureCertObjectHolder.java │ │ ├── StaticPassword.java │ │ ├── TransientUserCertStoreHandler.java │ │ ├── UserCertStore.java │ │ ├── UserCertStoreEntry.java │ │ ├── UserCertStoreEntryId.java │ │ ├── UserCertStoreHandler.java │ │ ├── UserCertStorePreferences.java │ │ ├── asn1 │ │ │ ├── ASN1Data.java │ │ │ ├── OIDs.java │ │ │ └── package-info.java │ │ ├── io │ │ │ ├── CertReaders.java │ │ │ ├── CertWriters.java │ │ │ ├── DERCertReaderWriter.java │ │ │ ├── IOResource.java │ │ │ ├── JCAConversion.java │ │ │ ├── JKSCertReaderWriter.java │ │ │ ├── PEMCertReaderWriter.java │ │ │ ├── PKCS12CertReaderWriter.java │ │ │ └── package-info.java │ │ ├── net │ │ │ ├── PlainSSLHelper.java │ │ │ ├── SSLPeer.java │ │ │ ├── SSLProtocalHelper.java │ │ │ ├── StartTLSIMAPHelper.java │ │ │ ├── StartTLSSMTPHelper.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── security │ │ │ ├── AbstractAlgorithm.java │ │ │ ├── AbstractPeriod.java │ │ │ ├── CRLUpdatePeriod.java │ │ │ ├── CRTValidityPeriod.java │ │ │ ├── KeyPairAlgorithm.java │ │ │ ├── PlatformKeyStore.java │ │ │ ├── SecurityDefaults.java │ │ │ ├── SignatureAlgorithm.java │ │ │ └── package-info.java │ │ ├── spi │ │ │ ├── CertGenerator.java │ │ │ ├── CertReader.java │ │ │ ├── CertWriter.java │ │ │ ├── FileAccessProvider.java │ │ │ ├── NamedProvider.java │ │ │ └── package-info.java │ │ ├── x500 │ │ │ ├── X500Names.java │ │ │ └── package-info.java │ │ └── x509 │ │ │ ├── Attributes.java │ │ │ ├── AttributesContent.java │ │ │ ├── AttributesProvider.java │ │ │ ├── AuthorityKeyIdentifierExtensionData.java │ │ │ ├── BasicConstraintsExtensionData.java │ │ │ ├── CRLDistributionPointsExtensionData.java │ │ │ ├── CRLNumberExtensionData.java │ │ │ ├── CertParams.java │ │ │ ├── CustomExtensionData.java │ │ │ ├── DirectoryName.java │ │ │ ├── DistributionPoint.java │ │ │ ├── DistributionPointName.java │ │ │ ├── Enumeration.java │ │ │ ├── ExtendedKeyUsage.java │ │ │ ├── ExtendedKeyUsageExtensionData.java │ │ │ ├── GeneralName.java │ │ │ ├── GeneralNameType.java │ │ │ ├── GeneralNames.java │ │ │ ├── GenerateCertRequest.java │ │ │ ├── GenericName.java │ │ │ ├── IPAddressName.java │ │ │ ├── KeyHelper.java │ │ │ ├── KeyUsage.java │ │ │ ├── KeyUsageExtensionData.java │ │ │ ├── OtherName.java │ │ │ ├── PKCS10CertificateRequest.java │ │ │ ├── ReasonFlag.java │ │ │ ├── ReasonFlags.java │ │ │ ├── RegisteredIDName.java │ │ │ ├── StringName.java │ │ │ ├── SubjectAlternativeNameExtensionData.java │ │ │ ├── SubjectKeyIdentifierExtensionData.java │ │ │ ├── UpdateCRLRequest.java │ │ │ ├── X509CRLHelper.java │ │ │ ├── X509CertificateHelper.java │ │ │ ├── X509ExtensionData.java │ │ │ ├── X509ExtensionHelper.java │ │ │ ├── generator │ │ │ ├── AbstractCertGenerator.java │ │ │ ├── CertGenerators.java │ │ │ ├── Issuer.java │ │ │ ├── LocalCertGenerator.java │ │ │ ├── RemoteCertGenerator.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── jfx │ │ ├── CertMgrApplication.java │ │ ├── certexport │ │ │ ├── CertExportController.java │ │ │ └── package-info.java │ │ ├── certimport │ │ │ ├── CertImportController.java │ │ │ ├── ImportEntryModel.java │ │ │ ├── ServerParams.java │ │ │ └── package-info.java │ │ ├── certoptions │ │ │ ├── BasicConstraintsController.java │ │ │ ├── BasicConstraintsDialog.java │ │ │ ├── BasicConstraintsPathLen.java │ │ │ ├── CRLDistributionPointsController.java │ │ │ ├── CRLDistributionPointsDialog.java │ │ │ ├── CertOptionsController.java │ │ │ ├── CertOptionsPreset.java │ │ │ ├── CertOptionsTemplates.java │ │ │ ├── ExtendedKeyUsageController.java │ │ │ ├── ExtendedKeyUsageDialog.java │ │ │ ├── ExtensionDataModel.java │ │ │ ├── GeneralNameFactory.java │ │ │ ├── KeyUsageController.java │ │ │ ├── KeyUsageDialog.java │ │ │ ├── ManageTemplatesController.java │ │ │ ├── ManageTemplatesDialog.java │ │ │ ├── SubjectAlternativeNameController.java │ │ │ ├── SubjectAlternativeNameDialog.java │ │ │ └── package-info.java │ │ ├── crloptions │ │ │ ├── CRLEntryModel.java │ │ │ ├── CRLOptionsController.java │ │ │ └── package-info.java │ │ ├── dneditor │ │ │ ├── DNEditorController.java │ │ │ ├── DNEditorDialog.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── password │ │ │ ├── EnterNewPasswordController.java │ │ │ ├── EnterPasswordController.java │ │ │ ├── PasswordController.java │ │ │ ├── PasswordDialog.java │ │ │ ├── PasswordResult.java │ │ │ └── package-info.java │ │ ├── preferences │ │ │ ├── PreferencesController.java │ │ │ ├── PreferencesDialog.java │ │ │ └── package-info.java │ │ ├── resources │ │ │ ├── Images.java │ │ │ └── package-info.java │ │ ├── store │ │ │ ├── AttributeModel.java │ │ │ ├── StoreController.java │ │ │ ├── StoreEntryModel.java │ │ │ ├── UserPreferences.java │ │ │ └── package-info.java │ │ ├── storepreferences │ │ │ ├── StorePreferencesController.java │ │ │ ├── StorePreferencesDialog.java │ │ │ └── package-info.java │ │ └── util │ │ │ ├── UserCertStoreEntryModel.java │ │ │ ├── UserCertStoreTreeTableViewHelper.java │ │ │ ├── converter │ │ │ ├── AbstractPeriodStringConverter.java │ │ │ ├── CRLUpdatePeriodStringConverter.java │ │ │ ├── CRTValidityPeriodStringConverter.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ └── util │ │ ├── BooleanPreference.java │ │ ├── Bytes.java │ │ ├── Days.java │ │ ├── IntPreference.java │ │ ├── PathPreference.java │ │ ├── Preference.java │ │ ├── PropertiesHelper.java │ │ ├── ProviderMap.java │ │ ├── StringPreference.java │ │ └── package-info.java └── resources │ ├── META-INF │ ├── de.carne.boot.Application │ └── services │ │ ├── de.carne.certmgr.certs.spi.CertGenerator │ │ ├── de.carne.certmgr.certs.spi.CertReader │ │ └── de.carne.certmgr.certs.spi.CertWriter │ ├── de │ └── carne │ │ └── certmgr │ │ ├── certs │ │ ├── UserCertStoreI18N.properties │ │ ├── UserCertStoreI18N_DE.properties │ │ ├── asn1 │ │ │ └── OIDs.properties │ │ ├── io │ │ │ ├── CertIOI18N.properties │ │ │ └── CertIOI18N_DE.properties │ │ ├── security │ │ │ └── SecurityDefaults.properties │ │ ├── x500 │ │ │ └── X500Names.properties │ │ └── x509 │ │ │ ├── AttributesI18N.properties │ │ │ ├── AttributesI18N_DE.properties │ │ │ └── generator │ │ │ ├── CertGeneratorI18N.properties │ │ │ └── CertGeneratorI18N_DE.properties │ │ ├── jfx │ │ ├── certexport │ │ │ ├── CertExport.fxml │ │ │ ├── CertExportI18N.properties │ │ │ └── CertExportI18N_DE.properties │ │ ├── certimport │ │ │ ├── CertImport.fxml │ │ │ ├── CertImportI18N.properties │ │ │ └── CertImportI18N_DE.properties │ │ ├── certoptions │ │ │ ├── BasicConstraints.fxml │ │ │ ├── BasicConstraintsI18N.properties │ │ │ ├── BasicConstraintsI18N_DE.properties │ │ │ ├── CRLDistributionPoints.fxml │ │ │ ├── CRLDistributionPointsI18N.properties │ │ │ ├── CRLDistributionPointsI18N_DE.properties │ │ │ ├── CertOptions.fxml │ │ │ ├── CertOptionsI18N.properties │ │ │ ├── CertOptionsI18N_DE.properties │ │ │ ├── CertOptionsTemplates.properties │ │ │ ├── CertOptionsTemplatesI18N.properties │ │ │ ├── ExtendedKeyUsage.fxml │ │ │ ├── ExtendedKeyUsageI18N.properties │ │ │ ├── ExtendedKeyUsageI18N_DE.properties │ │ │ ├── GeneralNameFactoryI18N.properties │ │ │ ├── GeneralNameFactoryI18N_DE.properties │ │ │ ├── KeyUsage.fxml │ │ │ ├── KeyUsageI18N.properties │ │ │ ├── KeyUsageI18N_DE.properties │ │ │ ├── ManageTemplates.fxml │ │ │ ├── ManageTemplatesI18N.properties │ │ │ ├── ManageTemplatesI18N_DE.properties │ │ │ ├── SubjectAlternativeName.fxml │ │ │ ├── SubjectAlternativeNameI18N.properties │ │ │ └── SubjectAlternativeNameI18N_DE.properties │ │ ├── crloptions │ │ │ ├── CRLOptions.fxml │ │ │ ├── CRLOptionsI18N.properties │ │ │ └── CRLOptionsI18N_DE.properties │ │ ├── dneditor │ │ │ ├── DNEditor.fxml │ │ │ ├── DNEditorI18N.properties │ │ │ └── DNEditorI18N_DE.properties │ │ ├── password │ │ │ ├── EnterNewPassword.fxml │ │ │ ├── EnterNewPasswordI18N.properties │ │ │ ├── EnterNewPasswordI18N_DE.properties │ │ │ ├── EnterPassword.fxml │ │ │ └── EnterPasswordI18N.properties │ │ ├── preferences │ │ │ ├── Preferences.fxml │ │ │ ├── PreferencesI18N.properties │ │ │ └── PreferencesI18N_DE.properties │ │ ├── resources │ │ │ ├── imageAdd16.png │ │ │ ├── imageAddEntry16.png │ │ │ ├── imageApply16.png │ │ │ ├── imageCRL16.png │ │ │ ├── imageCSR16.png │ │ │ ├── imageChooseFile16.png │ │ │ ├── imageCopyEntry16.png │ │ │ ├── imageDebug16.png │ │ │ ├── imageDelete16.png │ │ │ ├── imageDeleteEntry16.png │ │ │ ├── imageDown16.png │ │ │ ├── imageEdit16.png │ │ │ ├── imageError16.png │ │ │ ├── imageExport16.png │ │ │ ├── imageExport32.png │ │ │ ├── imageExportCerts16.png │ │ │ ├── imageExternalCRT16.png │ │ │ ├── imageImport16.png │ │ │ ├── imageImport32.png │ │ │ ├── imageImportCerts16.png │ │ │ ├── imageInfo16.png │ │ │ ├── imageInvalidOverlay16.png │ │ │ ├── imageKey16.png │ │ │ ├── imageManageCRL16.png │ │ │ ├── imageManageCRL32.png │ │ │ ├── imageNewCert16.png │ │ │ ├── imageNewCert32.png │ │ │ ├── imageNewStore16.png │ │ │ ├── imageNotice16.png │ │ │ ├── imageOK16.png │ │ │ ├── imageOpenStore16.png │ │ │ ├── imagePassword16.png │ │ │ ├── imagePassword32.png │ │ │ ├── imagePrivateCRT16.png │ │ │ ├── imagePublicCRT16.png │ │ │ ├── imageRefresh16.png │ │ │ ├── imageRevokeCert16.png │ │ │ ├── imageRevokedOverlay16.png │ │ │ ├── imageStore16.png │ │ │ ├── imageStore32.png │ │ │ ├── imageStorePreferences16.png │ │ │ ├── imageTrace16.png │ │ │ ├── imageUp16.png │ │ │ └── imageWarning16.png │ │ ├── store │ │ │ ├── AboutInfo1.txt │ │ │ ├── AboutInfo2.txt │ │ │ ├── AboutInfo3.txt │ │ │ ├── Store.fxml │ │ │ ├── StoreI18N.properties │ │ │ └── StoreI18N_DE.properties │ │ └── storepreferences │ │ │ ├── StorePreferences.fxml │ │ │ ├── StorePreferencesI18N.properties │ │ │ └── StorePreferencesI18N_DE.properties │ │ └── util │ │ ├── DaysI18N.properties │ │ └── DaysI18N_DE.properties │ ├── logging-debug.properties │ ├── logging-default.properties │ └── logging-verbose.properties └── test ├── java └── de │ └── carne │ └── certmgr │ └── test │ ├── Tests.java │ ├── certs │ ├── TestCerts.java │ ├── UserCertStoreTest.java │ ├── io │ │ ├── CertReadersWritersTest.java │ │ └── package-info.java │ ├── package-info.java │ ├── security │ │ ├── CRLUpdatePeriodTest.java │ │ ├── CRRValidityPeriodTest.java │ │ ├── KeyPairAlgorithmTest.java │ │ ├── PlatformKeyStoreTest.java │ │ ├── SignatureAlgorithmTest.java │ │ └── package-info.java │ ├── x500 │ │ ├── X500NamesTest.java │ │ └── package-info.java │ └── x509 │ │ ├── ASN1DataTest.java │ │ └── package-info.java │ ├── package-info.java │ └── util │ ├── DaysTest.java │ ├── ProviderMapTest.java │ └── package-info.java └── resources └── de └── carne └── certmgr └── test └── certs ├── Intermediate1.pem ├── client1.p12 ├── io ├── DER.1.dat ├── DER.2.dat ├── JKS.1.dat ├── PEM.1.dat ├── PEM.2.dat ├── PKCS12.1.dat ├── PKCS12.2.dat ├── test.crl ├── test.crt ├── test.csr ├── test.key └── test.pem ├── keytool.txt ├── server1.pem ├── simple.jks ├── simple.p12 ├── simple.pem └── test.domain.zip /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | validation: 6 | name: "Validation" 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: gradle/wrapper-validation-action@v1 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.gradle/ 2 | /build/ 3 | /bin/ 4 | /.project 5 | /.classpath 6 | -------------------------------------------------------------------------------- /.settings/.gitignore: -------------------------------------------------------------------------------- 1 | /org.eclipse.buildship.core.prefs 2 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 3 | org.eclipse.jdt.core.compiler.compliance=1.8 4 | org.eclipse.jdt.core.compiler.source=1.8 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | env: 4 | JAVA_OPTS="-Xmx2g -Dfile.encoding=UTF-8" 5 | 6 | jdk: 7 | - oraclejdk8 8 | 9 | os: 10 | - linux 11 | 12 | dist: trusty 13 | 14 | git: 15 | depth: false 16 | 17 | install: ./gradlew --refresh-dependencies --stacktrace clean assemble testClasses 18 | 19 | script: ./gradlew --stacktrace build jacocoTestReport 20 | 21 | after_success: bash <(curl -s https://codecov.io/bash) 22 | 23 | notifications: 24 | email: false 25 | webhooks: $TEAMS_WEBHOOK 26 | on_success: change 27 | on_failure: change 28 | 29 | before_cache: 30 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ 31 | - rm -f $HOME/.gradle/caches/*/fileContent/fileContent.lock 32 | - rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.lock 33 | - rm -f $HOME/.gradle/caches/*/javaCompile/javaCompile.lock 34 | - rm -f $HOME/.gradle/caches/journal-1/file-access.bin 35 | - rm -f $HOME/.gradle/caches/journal-1/journal-1.lock 36 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 37 | - rm -f $HOME/.gradle/caches/modules-2/metadata-2.96/module-artifact.bin 38 | - rm -f $HOME/.gradle/caches/modules-2/metadata-2.96/module-artifacts.bin 39 | - rm -f $HOME/.gradle/caches/modules-2/metadata-2.96/module-metadata.bin 40 | - rm -f $HOME/.gradle/caches/modules-2/metadata-2.96/module-versions.bin 41 | - rm -f $HOME/.gradle/caches/modules-2/metadata-2.96/resource-at-url.bin 42 | cache: 43 | directories: 44 | - $HOME/.gradle/caches/ 45 | - $HOME/.gradle/wrapper/ 46 | - $HOME/.jabba/jdk 47 | - $HOME/.tests/ 48 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Changelog: 2 | This is a maintenance release of the CertMgr application. 3 | 4 | Main changes are: 5 | * Removal of ExtendedKeyUsage attribute from RootCA template to create RFC 5280 compliant certificates chains (Preventing: openssl-1.1.0+ validation error "error (26): unsupported certificate purpose") 6 | * BouncyCastle version bump 1.61 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | ![Install4j](http://certmgr.carne.de/install4j_small.png) The provided installer/launcher packages have been created using the multi-platform installer builder [Install4J](https://www.ej-technologies.com/products/install4j/overview.html). 14 | 15 | ### v1.1.3 (2020-03-07) 16 | * Handle password protected key stores properly 17 | * BouncyCastle version bump 1.64 18 | 19 | ### v1.1.2 (2019-02-23) 20 | * Removal of ExtendedKeyUsage attribute from RootCA template to create RFC 5280 compliant certificates chains by default (Preventing: openssl-1.1.0+ validation error "error (26): unsupported certificate purpose") 21 | * BouncyCastle version bump 1.61 22 | 23 | ### v1.1.1 (2018-09-30) 24 | * Support for EKU "IP Security IKE Intermediate" (OID 1.3.6.1.5.5.8.2.2) 25 | * BouncyCastle version bump 1.60 26 | * Minor technical updates (new update URL, ...) 27 | 28 | ### v1.1.0 (2018-04-06) 29 | * Make DER file reader more robust in case of non-DER-input. 30 | * Perform uninstall during I4J based update to discard no longer used files. 31 | * Fix logging and preferences handling when launched via I4J. 32 | * Update dependencies (and make application Java 9 compatible). 33 | 34 | ### v1.0.1 (2018-04-01) 35 | * Fix export order if exporting multiple objects to a single file. 36 | 37 | ### v1.0.0 (2017-12-27) 38 | * Fix automatic CN update in certificate options dialog in case of an empty name. 39 | 40 | ### v1.0.0-beta3 (2017-11-14) 41 | * Add tooltip support to main window 42 | 43 | ### v1.0.0-beta1 (2017-09-14) 44 | * Initial beta release of new completely re-build version. 45 | 46 | ### v0.2.58 (2016-05-29) 47 | * Various bug fixes and code cleanups. 48 | * Last release of 0.2.x branch 49 | -------------------------------------------------------------------------------- /RELEASE-v1.1.4.md: -------------------------------------------------------------------------------- 1 | ## Changelog: 2 | This is a maintenance release of the CertMgr application. 3 | 4 | Main changes are: 5 | * Fix layout issue in Store Properties dialog. 6 | * BouncyCastle version bump 1.70 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | ![Install4j](http://certmgr.carne.de/install4j_small.png) The provided installer/launcher packages have been created using the multi-platform installer builder [Install4J](https://www.ej-technologies.com/products/install4j/overview.html). 14 | 15 | See full [changelog](https://github.com/hdecarne/certmgr/blob/master/CHANGELOG.md). 16 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | notify: 3 | require_ci_to_pass: true 4 | comment: 5 | behavior: default 6 | layout: header, diff 7 | require_changes: false 8 | coverage: 9 | precision: 2 10 | range: 11 | - 50.0 12 | - 80.0 13 | round: down 14 | status: 15 | changes: false 16 | patch: true 17 | project: true 18 | parsers: 19 | gcov: 20 | branch_detection: 21 | conditional: true 22 | loop: true 23 | macro: false 24 | method: false 25 | javascript: 26 | enable_partials: false 27 | ignore: 28 | - "src/main/java/de/carne/certmgr/jfx" 29 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | title: CertMgr 2 | description: Create and manage X.509 certificates 3 | show_downloads: false 4 | theme: minima 5 | 6 | plugins: 7 | - jekyll-sitemap -------------------------------------------------------------------------------- /docs/certmgr1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/certmgr1.png -------------------------------------------------------------------------------- /docs/howtoApache/screen_export_client_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoApache/screen_export_client_chain.png -------------------------------------------------------------------------------- /docs/howtoApache/screen_export_client_crl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoApache/screen_export_client_crl.png -------------------------------------------------------------------------------- /docs/howtoApache/screen_export_client_crt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoApache/screen_export_client_crt.png -------------------------------------------------------------------------------- /docs/howtoApache/screen_export_server_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoApache/screen_export_server_chain.png -------------------------------------------------------------------------------- /docs/howtoApache/screen_export_server_crt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoApache/screen_export_server_crt.png -------------------------------------------------------------------------------- /docs/howtoApache/screen_export_server_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoApache/screen_export_server_key.png -------------------------------------------------------------------------------- /docs/howtoExternalCA/screen_export_csr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoExternalCA/screen_export_csr.png -------------------------------------------------------------------------------- /docs/howtoExternalCA/screen_generate_csr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoExternalCA/screen_generate_csr.png -------------------------------------------------------------------------------- /docs/howtoImport/index.md: -------------------------------------------------------------------------------- 1 | ### How to import existing certificate objects 2 | The CertMgr application can import certificate objects from the following formats: 3 | 4 | * DER - Binary encoded certificate objects 5 | * PEM - ASCII encoded certificate objects 6 | * PKCS#12 - Binary exchange format for certificate objects 7 | * JKS - Java Key Store format 8 | 9 | The actual format is detected automatically. 10 | The data can be imported from various sources: 11 | 12 | ![import sources](screen_import_sources.png) 13 | 14 | * Local file - Read data from a single file 15 | * Local directory - Read data from multiple files 16 | * Remote file - Read data from an URL 17 | * Server Certificate(s) - Read data from server connection 18 | * System Certificate(s) - Read data from system certificate store (not available on all platforms) 19 | * Clipboard - Read data from Clipboard 20 | 21 | #### Read available certificate objects 22 | After entering or selecting the actual source input and parameters the import dialog automatically or by pressing the refresh button will read all available certificate objects. 23 | 24 | If an encrypted object is encountered you will be asked to enter the required password. By pressing cancel or cancel all the current or all encrypted objects can be ignored. 25 | 26 | After the read operation has been finished the found certificate objects will be displayed in the dialog: 27 | 28 | ![read result](screen_read_result.png) 29 | 30 | #### Select and import 31 | Now you can select the certificate objects you want to import and by pressing the Import button they will be imported into the current certificate store. 32 | 33 | In case a private key is imported the import dialog will automatically ask for a password to encrypt the private key in the certificate store. Cancelling this password dialog will cancel the import. 34 | 35 | [<< Index](..) 36 | -------------------------------------------------------------------------------- /docs/howtoImport/screen_import_sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoImport/screen_import_sources.png -------------------------------------------------------------------------------- /docs/howtoImport/screen_read_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoImport/screen_read_result.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_crl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_crl.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_export.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_intermediate_cas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_intermediate_cas.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_new_store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_new_store.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_root_ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_root_ca.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_server_certificate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_server_certificate.png -------------------------------------------------------------------------------- /docs/howtoLocalCA/screen_user_certificate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/howtoLocalCA/screen_user_certificate.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | ### About CertMgr 2 | The Certificate Manager application (CertMgr) supports the creation and management of X.509 certificates and their corresponding objects. 3 | ![store view](certmgr1.png) 4 | Certificates are organized in so called Certificate store. Such a store is actually a simple directory structure containing the individual certificate files. 5 | 6 | The application supports the following certificate operations: 7 | * Creation and management of **private certificates** (signed by your own Certificate Authority) 8 | * Creation and management of **public certificates** (signed by an external Certificate Authority) 9 | * Creation and management of **Certificate Revocation Lists** (CRL) 10 | * **Import and export** of certificates (in PEM, DER, PKCS#12 as well as JKS format) 11 | 12 | #### Installation & usage: 13 | A Java SE 8 Runtime Environment (JRE 8u60 or higher) is required to run CertMgr. 14 | 15 | Download the latest version from the project's [releases page](https://github.com/hdecarne/certmgr/releases/latest). 16 | 17 | ![Install4j](install4j_small.png) 18 | The provided installer/launcher packages have been created using the multi-platform installer builder 19 | [Install4J](https://www.ej-technologies.com/products/install4j/overview.html). Simply run the installer suitable for your platform to install the application and keep it up-to-date. 20 | 21 | If you downloaded one of the generic archives, simply extract it to a folder of your choice. 22 | The archive contains a single executable Jar as well as a folder with the license information. Invoke the application by either double clicking the jar or invoke the command 23 | 24 | ``` 25 | java -jar certmgr-boot-.jar [command line arguments] 26 | ``` 27 | 28 | in a terminal. The application command line supports the following options: 29 | 30 | ``` 31 | certmgr-boot- [--verbose|--debug] [store home] 32 | 33 | --verbose 34 | Enable verbose logging. 35 | --debug 36 | Enable debug logging. 37 | 38 | store home 39 | The store home path to open. 40 | ``` 41 | 42 | #### HowTos 43 | * [Create your own private CA](howtoLocalCA/) 44 | * [Create and manage certificates of an external CA](howtoExternalCA/) 45 | * [Import existing certificate objects](howtoImport/) 46 | * [Configure Apache to use your certificates](howtoApache/) 47 | 48 | #### Changelog: 49 | See [CHANGELOG.md](https://github.com/hdecarne/certmgr/blob/master/CHANGELOG.md). 50 | -------------------------------------------------------------------------------- /docs/install4j_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/docs/install4j_small.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | version = 1.1.4 2 | automaticModuleName = de.carne.certmgr 3 | 4 | projectDescription = CertMgr 5 | projectUrl = https://github.com/hdecarne/certmgr 6 | projectScm = scm:git:https://github.com/hdecarne/certmgr.git 7 | projectScmUrl = https://github.com/hdecarne/certmgr.git 8 | projectLicense = GNU General Public License, Version 3 9 | projectLicenseUrl = http://www.gnu.org/licenses/gpl-3.0.html 10 | 11 | # Dependency versions 12 | annotationVersion = 2.2.600 13 | javaJfxVersion = 8.5.0 14 | bouncycastleVersion = 1.70 15 | junitVersion = 4.13.2 16 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'certmgr' 2 | -------------------------------------------------------------------------------- /src/main/dist/README.txt: -------------------------------------------------------------------------------- 1 | Installation & usage: 2 | ===================== 3 | A Java SE 8 Runtime Environment (JRE) is required to run CertMgr. 4 | 5 | Simply extract the downloaded archive to a folder of your choice. 6 | The archive contains a single executable Jar, a folder with the license information as well as this README. 7 | Invoke the application by typing java -jar < command line> in a terminal or 8 | use the corresponding menu of your desktop environment. 9 | 10 | The application command line is quite simple: 11 | 12 | certmgr.jar [--verbose|--debug] [store home] 13 | 14 | --verbose 15 | Enable verbose logging. 16 | --debug 17 | Enable debug logging. 18 | 19 | store home 20 | The store home path to open. 21 | -------------------------------------------------------------------------------- /src/main/install4j/launcherIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/install4j/launcherIcon.icns -------------------------------------------------------------------------------- /src/main/install4j/launcherIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/install4j/launcherIcon.ico -------------------------------------------------------------------------------- /src/main/install4j/launcherIcon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/install4j/launcherIcon128.png -------------------------------------------------------------------------------- /src/main/install4j/launcherIcon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/install4j/launcherIcon16.png -------------------------------------------------------------------------------- /src/main/install4j/launcherIcon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/install4j/launcherIcon32.png -------------------------------------------------------------------------------- /src/main/install4j/launcherIcon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/install4j/launcherIcon48.png -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/CertMgrMain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr; 18 | 19 | import java.io.IOException; 20 | import java.security.Security; 21 | 22 | import org.bouncycastle.jce.provider.BouncyCastleProvider; 23 | 24 | import de.carne.boot.ApplicationMain; 25 | import de.carne.boot.Exceptions; 26 | import de.carne.boot.logging.Log; 27 | import de.carne.boot.logging.Logs; 28 | import de.carne.certmgr.jfx.CertMgrApplication; 29 | 30 | /** 31 | * {@link ApplicationMain} class. 32 | */ 33 | public class CertMgrMain implements ApplicationMain { 34 | 35 | private static final Log LOG = new Log(); 36 | 37 | static { 38 | try { 39 | Logs.readConfig(Logs.CONFIG_DEFAULT); 40 | } catch (IOException e) { 41 | Exceptions.ignore(e); 42 | } 43 | LOG.info("Adding BouncyCastle security provider..."); 44 | Security.addProvider(new BouncyCastleProvider()); 45 | } 46 | 47 | @Override 48 | public String name() { 49 | return "CertMgr"; 50 | } 51 | 52 | @Override 53 | public int run(String[] args) { 54 | CertMgrApplication.launch(args); 55 | return 0; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/CertObjectHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import java.io.IOException; 20 | import java.nio.file.Path; 21 | 22 | import org.eclipse.jdt.annotation.Nullable; 23 | 24 | interface CertObjectHolder { 25 | 26 | @Nullable 27 | Path path(); 28 | 29 | T get() throws IOException; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/CertObjectType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import java.security.KeyPair; 20 | import java.security.cert.X509CRL; 21 | import java.security.cert.X509Certificate; 22 | 23 | import de.carne.certmgr.certs.x509.PKCS10CertificateRequest; 24 | 25 | /** 26 | * The certificate object types. 27 | */ 28 | public enum CertObjectType { 29 | 30 | /** 31 | * Certificate object of type CRT ({@link X509Certificate}). 32 | */ 33 | CRT, 34 | 35 | /** 36 | * Certificate object of type Key ({@link KeyPair}). 37 | */ 38 | KEY, 39 | 40 | /** 41 | * Certificate object of type CSR ({@link PKCS10CertificateRequest}). 42 | */ 43 | CSR, 44 | 45 | /** 46 | * Certificate object of type CRL ({@link X509CRL}). 47 | */ 48 | CRL 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/CertProviderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import java.io.IOException; 20 | 21 | /** 22 | * Exception indicating provider specific errors. 23 | */ 24 | public class CertProviderException extends IOException { 25 | 26 | /* 27 | * Serialization support. 28 | */ 29 | private static final long serialVersionUID = -4354520022953096597L; 30 | 31 | /** 32 | * Construct {@code CertProviderException} by wrapping another exception. 33 | * 34 | * @param cause The causing exception. 35 | */ 36 | public CertProviderException(Throwable cause) { 37 | super(cause.getMessage(), cause); 38 | } 39 | 40 | @Override 41 | public String getLocalizedMessage() { 42 | return getCause().getLocalizedMessage(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/NoPassword.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | /** 22 | * {@link PasswordCallback} implementation providing no passwords. 23 | */ 24 | public class NoPassword implements PasswordCallback { 25 | 26 | private NoPassword() { 27 | // Make sure this class is not instantiated from outside 28 | } 29 | 30 | private static final NoPassword INSTANCE = new NoPassword(); 31 | 32 | /** 33 | * Get {@code NoPassword} instance. 34 | * 35 | * @return {@code NoPassword} instance. 36 | */ 37 | public static NoPassword getInstance() { 38 | return INSTANCE; 39 | } 40 | 41 | @Override 42 | public char @Nullable [] queryPassword(String resource) { 43 | return null; 44 | } 45 | 46 | @Override 47 | public char @Nullable [] requeryPassword(String resource, Throwable cause) { 48 | return null; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/PasswordCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | /** 22 | * Callback interface used to query passwords on demand. 23 | */ 24 | public interface PasswordCallback { 25 | 26 | /** 27 | * This function is called whenever a password is requested for the first time. 28 | * 29 | * @param resource The resource requiring the password. 30 | * @return The provided password, or {@code null} if the password query was cancelled. 31 | */ 32 | char @Nullable [] queryPassword(String resource); 33 | 34 | /** 35 | * This function is called whenever a password is requested again after a previously provided password was rejected. 36 | * 37 | * @param resource The resource requiring the password. 38 | * @param cause The optional cause why the previous password was rejected. 39 | * @return The provided password or {@code null} if the password query was cancelled. 40 | */ 41 | char @Nullable [] requeryPassword(String resource, Throwable cause); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/PasswordRequiredException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import java.io.IOException; 20 | 21 | import org.eclipse.jdt.annotation.Nullable; 22 | 23 | /** 24 | * Exception indicating that no valid password was given while accessing an encrypted resource. 25 | */ 26 | public class PasswordRequiredException extends IOException { 27 | 28 | /* 29 | * Serialization support. 30 | */ 31 | private static final long serialVersionUID = 8506291648565012681L; 32 | 33 | /** 34 | * Construct {@code PasswordRequiredException}. 35 | * 36 | * @param resource To resource requiring the password. 37 | */ 38 | public PasswordRequiredException(String resource) { 39 | super(formatMessage(resource)); 40 | } 41 | 42 | /** 43 | * Construct {@code PasswordRequiredException}. 44 | * 45 | * @param resource To resource requiring the password. 46 | * @param cause The cause while the password was rejected (may be {@code null}). 47 | */ 48 | public PasswordRequiredException(String resource, @Nullable Throwable cause) { 49 | super(formatMessage(resource), cause); 50 | } 51 | 52 | private static String formatMessage(String resource) { 53 | return UserCertStoreI18N.strMessagePasswordRequired(resource); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/SecureCertObjectHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import java.io.IOException; 20 | 21 | interface SecureCertObjectHolder extends CertObjectHolder { 22 | 23 | boolean isSecured(); 24 | 25 | T get(PasswordCallback password) throws IOException; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/StaticPassword.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | /** 22 | * {@link PasswordCallback} implementation providing a static passwords. 23 | */ 24 | public class StaticPassword implements PasswordCallback { 25 | 26 | private final char @Nullable [] password; 27 | 28 | private StaticPassword(char @Nullable [] password) { 29 | this.password = password; 30 | } 31 | 32 | /** 33 | * Get {@code StaticPassword} instance. 34 | * 35 | * @param password The password to return. 36 | * @return {@code StaticPassword} instance. 37 | */ 38 | public static StaticPassword getInstance(char @Nullable [] password) { 39 | return new StaticPassword(password); 40 | } 41 | 42 | @Override 43 | public char @Nullable [] queryPassword(String resource) { 44 | return this.password; 45 | } 46 | 47 | @Override 48 | public char @Nullable [] requeryPassword(String resource, Throwable cause) { 49 | return null; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/UserCertStoreHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs; 18 | 19 | import java.io.IOException; 20 | import java.nio.file.Path; 21 | import java.security.KeyPair; 22 | import java.security.cert.X509CRL; 23 | import java.security.cert.X509Certificate; 24 | 25 | import org.eclipse.jdt.annotation.Nullable; 26 | 27 | import de.carne.certmgr.certs.x509.PKCS10CertificateRequest; 28 | 29 | /** 30 | * {@code UserCertStoreHandler} derived classes provide the actual certificate storage functions used by a certificate 31 | * store. 32 | *

33 | * Different handler implementations allow different kind of stores to be provided via a single store interface 34 | * ({@link UserCertStore}). 35 | */ 36 | abstract class UserCertStoreHandler { 37 | 38 | @Nullable 39 | public Path storeHome() { 40 | return null; 41 | } 42 | 43 | public abstract UserCertStoreEntryId nextEntryId(@Nullable String aliasHint); 44 | 45 | public abstract CertObjectHolder createCRT(UserCertStoreEntryId id, X509Certificate crt) 46 | throws IOException; 47 | 48 | public abstract SecureCertObjectHolder createKey(UserCertStoreEntryId id, KeyPair key, 49 | PasswordCallback newPassword) throws IOException; 50 | 51 | public abstract CertObjectHolder createCSR(UserCertStoreEntryId id, 52 | PKCS10CertificateRequest csr) throws IOException; 53 | 54 | public abstract CertObjectHolder createCRL(UserCertStoreEntryId id, X509CRL crl) throws IOException; 55 | 56 | public abstract void deleteEntry(UserCertStoreEntryId id) throws IOException; 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/asn1/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.asn1; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/io/CertWriters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.io; 18 | 19 | import java.util.Objects; 20 | 21 | import de.carne.certmgr.certs.spi.CertWriter; 22 | import de.carne.certmgr.util.ProviderMap; 23 | 24 | /** 25 | * Utility class providing {@link CertWriter} related functions. 26 | */ 27 | public final class CertWriters { 28 | 29 | private CertWriters() { 30 | // Make sure this class is not instantiated from outside 31 | } 32 | 33 | /** 34 | * The registered {@link CertWriter}s. 35 | */ 36 | public static final ProviderMap REGISTERED = new ProviderMap<>(CertWriter.class); 37 | 38 | /** 39 | * The default {@link CertWriter}. 40 | */ 41 | public static final CertWriter DEFAULT = Objects.requireNonNull(REGISTERED.get(PEMCertReaderWriter.PROVIDER_NAME)); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/io/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.io; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/net/PlainSSLHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.net; 18 | 19 | import java.io.IOException; 20 | 21 | class PlainSSLHelper extends SSLProtocalHelper { 22 | 23 | protected PlainSSLHelper() { 24 | super(null); 25 | } 26 | 27 | @Override 28 | public void start() throws IOException { 29 | // Nothing to do here 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/net/StartTLSIMAPHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.net; 18 | 19 | import java.io.IOException; 20 | import java.net.Socket; 21 | 22 | class StartTLSIMAPHelper extends SSLProtocalHelper { 23 | 24 | public StartTLSIMAPHelper(Socket plainSocket) { 25 | super(plainSocket); 26 | } 27 | 28 | @Override 29 | public void start() throws IOException { 30 | while (true) { 31 | String reply = receiveAll("\r\n"); 32 | 33 | if (reply.startsWith("* OK")) { 34 | break; 35 | } 36 | } 37 | send(". CAPABILITY\r\n"); 38 | while (true) { 39 | String reply = receiveAll("\r\n"); 40 | 41 | if (reply.startsWith(". OK")) { 42 | break; 43 | } 44 | } 45 | send(". STARTTLS\r\n"); 46 | while (true) { 47 | String reply = receiveAll("\r\n"); 48 | 49 | if (reply.startsWith(". OK")) { 50 | break; 51 | } else if (reply.startsWith(". BAD")) { 52 | throw new IOException("StartTLS not supported by peer"); 53 | } 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/net/StartTLSSMTPHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.net; 18 | 19 | import java.io.IOException; 20 | import java.net.Socket; 21 | 22 | class StartTLSSMTPHelper extends SSLProtocalHelper { 23 | 24 | public StartTLSSMTPHelper(Socket plainSocket) { 25 | super(plainSocket); 26 | } 27 | 28 | @Override 29 | public void start() throws IOException { 30 | while (true) { 31 | String reply = receiveAll("\r\n"); 32 | 33 | if (reply.startsWith("220")) { 34 | break; 35 | } 36 | } 37 | 38 | String hostname = getHostname(); 39 | 40 | send("EHLO " + hostname + "\r\n"); 41 | while (true) { 42 | String reply = receiveAll("\r\n"); 43 | 44 | if (reply.startsWith("250")) { 45 | break; 46 | } 47 | } 48 | send("STARTTLS\r\n"); 49 | while (true) { 50 | String reply = receiveAll("\r\n"); 51 | 52 | if (reply.startsWith("220")) { 53 | break; 54 | } else if (reply.startsWith("501") || reply.startsWith("454")) { 55 | throw new IOException("StartTLS not supported by peer"); 56 | } 57 | } 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/net/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.net; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/security/AbstractAlgorithm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.security; 18 | 19 | import java.security.Provider.Service; 20 | 21 | /** 22 | * Abstract base class for {@link Service} based objects. 23 | */ 24 | public abstract class AbstractAlgorithm { 25 | 26 | private final Service service; 27 | 28 | /** 29 | * Construct {@code AbstractAlgorithm}. 30 | * 31 | * @param service The service value to use for initialization. 32 | */ 33 | protected AbstractAlgorithm(Service service) { 34 | this.service = service; 35 | } 36 | 37 | /** 38 | * Get this algorithm's {@link Service} object. 39 | * 40 | * @return This algorithm's {@link Service} object. 41 | */ 42 | protected Service service() { 43 | return this.service; 44 | } 45 | 46 | /** 47 | * Get this algorithm's name. 48 | * 49 | * @return This algorithm's name. 50 | */ 51 | public String algorithm() { 52 | return this.service.getAlgorithm(); 53 | } 54 | 55 | @Override 56 | public String toString() { 57 | return this.service.getAlgorithm() + "/" + this.service.getProvider().getName(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/security/AbstractPeriod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.security; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | import de.carne.certmgr.util.Days; 22 | 23 | /** 24 | * Abstract base class for {@link Days} based objects. 25 | */ 26 | public abstract class AbstractPeriod { 27 | 28 | private final Days period; 29 | 30 | /** 31 | * Construct {@code AbstractPeriod}. 32 | * 33 | * @param period The period value to use for initialization. 34 | */ 35 | protected AbstractPeriod(Days period) { 36 | this.period = period; 37 | } 38 | 39 | /** 40 | * Get this instance's period. 41 | * 42 | * @return This instance's period. 43 | */ 44 | public Days days() { 45 | return this.period; 46 | } 47 | 48 | @Override 49 | public int hashCode() { 50 | return this.period.hashCode(); 51 | } 52 | 53 | @Override 54 | public boolean equals(@Nullable Object obj) { 55 | return this == obj || (obj instanceof AbstractPeriod && (this.period.equals(((AbstractPeriod) obj).period))); 56 | } 57 | 58 | @Override 59 | public String toString() { 60 | return this.period.toString(); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/security/CRLUpdatePeriod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.security; 18 | 19 | import java.util.Objects; 20 | 21 | import org.eclipse.jdt.annotation.Nullable; 22 | 23 | import de.carne.certmgr.util.Days; 24 | import de.carne.jfx.util.DefaultSet; 25 | 26 | /** 27 | * CRL Update Period provisioning. 28 | */ 29 | public class CRLUpdatePeriod extends AbstractPeriod { 30 | 31 | /** 32 | * Construct {@code CRLUpdatePeriod}. 33 | * 34 | * @param period The period value. 35 | */ 36 | public CRLUpdatePeriod(Days period) { 37 | super(period); 38 | } 39 | 40 | /** 41 | * Get the standard CRL Update Periods. 42 | * 43 | * @param defaultHint The default to return (may be {@code null}). If this period is contained in the default set, 44 | * it is also set as the default. 45 | * @return The standard CRL Update Periods. 46 | */ 47 | public static DefaultSet getDefaultSet(@Nullable Days defaultHint) { 48 | DefaultSet defaultPeriods = SecurityDefaults.getCRLUpdatedPeriods(); 49 | DefaultSet crlUpdatePeriods = new DefaultSet<>(); 50 | 51 | if (defaultHint != null) { 52 | crlUpdatePeriods.addDefault(new CRLUpdatePeriod(defaultHint)); 53 | } else { 54 | crlUpdatePeriods.addDefault(new CRLUpdatePeriod(Objects.requireNonNull(defaultPeriods.getDefault()))); 55 | } 56 | for (Days period : defaultPeriods) { 57 | crlUpdatePeriods.add(new CRLUpdatePeriod(period)); 58 | } 59 | return crlUpdatePeriods; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/security/CRTValidityPeriod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.security; 18 | 19 | import java.util.Objects; 20 | 21 | import org.eclipse.jdt.annotation.Nullable; 22 | 23 | import de.carne.certmgr.util.Days; 24 | import de.carne.jfx.util.DefaultSet; 25 | 26 | /** 27 | * CRT Validity Period provisioning. 28 | */ 29 | public class CRTValidityPeriod extends AbstractPeriod { 30 | 31 | /** 32 | * Construct {@code CRTValidityPeriod}. 33 | * 34 | * @param period The period value. 35 | */ 36 | public CRTValidityPeriod(Days period) { 37 | super(period); 38 | } 39 | 40 | /** 41 | * Get the standard CRT Validity Periods. 42 | * 43 | * @param defaultHint The default to return (may be {@code null}). If this period is contained in the default set, 44 | * it is also set as the default. 45 | * @return The standard CRT Validity Periods. 46 | */ 47 | public static DefaultSet getDefaultSet(@Nullable Days defaultHint) { 48 | DefaultSet defaultPeriods = SecurityDefaults.getCRTValidityPeriods(); 49 | DefaultSet crlUpdatePeriods = new DefaultSet<>(); 50 | 51 | if (defaultHint != null) { 52 | crlUpdatePeriods.addDefault(new CRTValidityPeriod(defaultHint)); 53 | } else { 54 | crlUpdatePeriods.addDefault(new CRTValidityPeriod(Objects.requireNonNull(defaultPeriods.getDefault()))); 55 | } 56 | for (Days period : defaultPeriods) { 57 | crlUpdatePeriods.add(new CRTValidityPeriod(period)); 58 | } 59 | return crlUpdatePeriods; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/security/PlatformKeyStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.security; 18 | 19 | import java.security.Provider; 20 | import java.security.Provider.Service; 21 | import java.security.Security; 22 | 23 | import de.carne.jfx.util.DefaultSet; 24 | 25 | /** 26 | * Platform key store provisioning. 27 | */ 28 | public class PlatformKeyStore extends AbstractAlgorithm { 29 | 30 | private static final String SERVICE_TYPE_KEY_STORE = "KeyStore"; 31 | 32 | private PlatformKeyStore(Service service) { 33 | super(service); 34 | } 35 | 36 | /** 37 | * Get the available platform key stores. 38 | * 39 | * @return The available platform key stores. 40 | */ 41 | public static DefaultSet getDefaultSet() { 42 | DefaultSet platformKeyStores = new DefaultSet<>(); 43 | DefaultSet defaultNames = SecurityDefaults.getPlatformKeyStoreNames(); 44 | String defaultName = defaultNames.getDefault(); 45 | 46 | for (Provider provider : Security.getProviders()) { 47 | for (Provider.Service service : provider.getServices()) { 48 | if (!SERVICE_TYPE_KEY_STORE.equals(service.getType())) { 49 | continue; 50 | } 51 | 52 | String algorithm = service.getAlgorithm(); 53 | 54 | if (!defaultNames.contains(algorithm)) { 55 | continue; 56 | } 57 | 58 | PlatformKeyStore platformKeyStore = new PlatformKeyStore(service); 59 | 60 | if (algorithm.equals(defaultName)) { 61 | platformKeyStores.addDefault(platformKeyStore); 62 | } else { 63 | platformKeyStores.add(platformKeyStore); 64 | } 65 | } 66 | } 67 | return platformKeyStores; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/security/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.security; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/spi/FileAccessProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.spi; 18 | 19 | /** 20 | * Basic interface for all SPIs which provide file access. 21 | */ 22 | public interface FileAccessProvider { 23 | 24 | /** 25 | * Get this provider's file type. 26 | * 27 | * @return This provider's file type. 28 | */ 29 | String fileType(); 30 | 31 | /** 32 | * Get the usual file name extensions used by this provider. 33 | *

34 | * Each extension is a glob pattern and suitable for file name matching. 35 | * 36 | * @return The usual file name extensions used by this provider. 37 | */ 38 | String[] fileExtensionPatterns(); 39 | 40 | /** 41 | * Get the file extension for a specific certificate object type. 42 | * 43 | * @param cls The certificate object type to get the extension for. 44 | * @return The extension suitable for the submitted certificate object type 45 | * or a default extension. 46 | */ 47 | String fileExtension(Class cls); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/spi/NamedProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.spi; 18 | 19 | /** 20 | * Basic interface for all SPIs which can identified by a unique name. 21 | */ 22 | public interface NamedProvider { 23 | 24 | /** 25 | * Get the provider's unique name. 26 | * 27 | * @return The provider's unique name. 28 | */ 29 | String providerName(); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/spi/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.spi; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x500/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.x500; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x509/AttributesContent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.x509; 18 | 19 | /** 20 | * Interface for all objects who's content can be added to an {@link Attributes} 21 | * object. 22 | */ 23 | public interface AttributesContent { 24 | 25 | /** 26 | * Add the object's content to an {@link Attributes} objects. 27 | * 28 | * @param attributes The {@link Attributes} object to add the objects 29 | * content to. 30 | */ 31 | void addToAttributes(Attributes attributes); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x509/AttributesProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.x509; 18 | 19 | /** 20 | * Interface for all objects that provide {@link Attributes} representation of 21 | * their content. 22 | */ 23 | public interface AttributesProvider { 24 | 25 | /** 26 | * Get the object's {@link Attributes}. 27 | * 28 | * @return The object's {@link Attributes}. 29 | */ 30 | Attributes toAttributes(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x509/Enumeration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.x509; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | abstract class Enumeration { 22 | 23 | private final String name; 24 | 25 | private final T value; 26 | 27 | protected Enumeration(String name, T value) { 28 | this.name = name; 29 | this.value = value; 30 | } 31 | 32 | /** 33 | * Get this instance's name. 34 | * 35 | * @return This instance's name. 36 | */ 37 | public String name() { 38 | return this.name; 39 | } 40 | 41 | /** 42 | * Get this instance's value. 43 | * 44 | * @return This instance's value. 45 | */ 46 | public T value() { 47 | return this.value; 48 | } 49 | 50 | @Override 51 | public int hashCode() { 52 | return this.name.hashCode(); 53 | } 54 | 55 | @Override 56 | public boolean equals(@Nullable Object obj) { 57 | return this == obj || (obj instanceof KeyUsage && this.value.equals(((Enumeration) obj).value)); 58 | } 59 | 60 | @Override 61 | public String toString() { 62 | return this.name; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x509/generator/CertGenerators.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.certs.x509.generator; 18 | 19 | import java.util.Objects; 20 | 21 | import de.carne.certmgr.certs.spi.CertGenerator; 22 | import de.carne.certmgr.util.ProviderMap; 23 | 24 | /** 25 | * Utility class providing {@link CertGenerator} related functions. 26 | */ 27 | public final class CertGenerators { 28 | 29 | /** 30 | * The registered {@link CertGenerator}s. 31 | */ 32 | public static final ProviderMap REGISTERED = new ProviderMap<>(CertGenerator.class); 33 | 34 | /** 35 | * The default {@link CertGenerator}. 36 | */ 37 | public static final CertGenerator DEFAULT = Objects 38 | .requireNonNull(REGISTERED.get(LocalCertGenerator.PROVIDER_NAME)); 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x509/generator/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.x509.generator; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/certs/x509/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.certs.x509; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certexport/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.certexport; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certimport/ImportEntryModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certimport; 18 | 19 | import de.carne.certmgr.certs.UserCertStoreEntry; 20 | import de.carne.certmgr.jfx.util.UserCertStoreEntryModel; 21 | import javafx.beans.property.BooleanProperty; 22 | import javafx.beans.property.SimpleBooleanProperty; 23 | 24 | /** 25 | * Model class used for importing {@link UserCertStoreEntry}. 26 | */ 27 | public class ImportEntryModel extends UserCertStoreEntryModel { 28 | 29 | private final BooleanProperty selectedProperty; 30 | 31 | /** 32 | * Construct {@code ImportUserCertStoreEntryModel}. 33 | * 34 | * @param entry The represented certificate store entry. 35 | * @param selected Whether the entry is initially selected or not. 36 | */ 37 | public ImportEntryModel(UserCertStoreEntry entry, boolean selected) { 38 | super(entry); 39 | this.selectedProperty = new SimpleBooleanProperty(selected); 40 | } 41 | 42 | /** 43 | * Get the Selected property value. 44 | * 45 | * @return The Selected property value. 46 | */ 47 | public final Boolean getSelected() { 48 | return this.selectedProperty.getValue(); 49 | } 50 | 51 | /** 52 | * Set the Selected property value. 53 | * 54 | * @param selected The value to set. 55 | */ 56 | public final void setSelected(Boolean selected) { 57 | this.selectedProperty.setValue(selected); 58 | } 59 | 60 | /** 61 | * Get the Selected property. 62 | * 63 | * @return The Selected property. 64 | */ 65 | public final BooleanProperty selectedProperty() { 66 | return this.selectedProperty; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certimport/ServerParams.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certimport; 18 | 19 | import de.carne.certmgr.certs.net.SSLPeer; 20 | 21 | final class ServerParams { 22 | 23 | private final SSLPeer.Protocol protocol; 24 | 25 | private final String host; 26 | 27 | private final int port; 28 | 29 | ServerParams(SSLPeer.Protocol protocol, String host, int port) { 30 | this.protocol = protocol; 31 | this.host = host; 32 | this.port = port; 33 | } 34 | 35 | public SSLPeer.Protocol protocol() { 36 | return this.protocol; 37 | } 38 | 39 | public String host() { 40 | return this.host; 41 | } 42 | 43 | public int port() { 44 | return this.port; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certimport/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.certimport; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/BasicConstraintsDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certoptions; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.certs.x509.BasicConstraintsExtensionData; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * Basic Constraints dialog. 27 | */ 28 | public class BasicConstraintsDialog extends Dialog { 29 | 30 | private BasicConstraintsDialog(BasicConstraintsController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the Basic Constraints dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static BasicConstraintsController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new BasicConstraintsDialog(c), BasicConstraintsController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/CRLDistributionPointsDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certoptions; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.certs.x509.CRLDistributionPointsExtensionData; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * CRL Distribution Points dialog. 27 | */ 28 | public class CRLDistributionPointsDialog extends Dialog { 29 | 30 | private CRLDistributionPointsDialog(CRLDistributionPointsController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the CRL Distribution Points dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static CRLDistributionPointsController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new CRLDistributionPointsDialog(c), CRLDistributionPointsController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/ExtendedKeyUsageDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certoptions; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.certs.x509.ExtendedKeyUsageExtensionData; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * Extended key Usage dialog. 27 | */ 28 | public class ExtendedKeyUsageDialog extends Dialog { 29 | 30 | private ExtendedKeyUsageDialog(ExtendedKeyUsageController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the Key Usage dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static ExtendedKeyUsageController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new ExtendedKeyUsageDialog(c), ExtendedKeyUsageController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/KeyUsageDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certoptions; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.certs.x509.KeyUsageExtensionData; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * Key Usage dialog. 27 | */ 28 | public class KeyUsageDialog extends Dialog { 29 | 30 | private KeyUsageDialog(KeyUsageController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the Key Usage dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static KeyUsageController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new KeyUsageDialog(c), KeyUsageController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/ManageTemplatesDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certoptions; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.jfx.stage.StageController; 22 | import javafx.scene.control.Dialog; 23 | 24 | /** 25 | * Manage Presets dialog. 26 | */ 27 | public class ManageTemplatesDialog extends Dialog { 28 | 29 | private ManageTemplatesDialog(ManageTemplatesController controller) { 30 | setResultConverter(controller); 31 | } 32 | 33 | /** 34 | * Load the Manage Presets dialog. 35 | * 36 | * @param owner The stage controller owning this dialog. 37 | * @return The constructed controller which is bound to the newly created dialog. 38 | * @throws IOException if an I/O error occurs during dialog loading. 39 | */ 40 | public static ManageTemplatesController load(StageController owner) throws IOException { 41 | return owner.loadDialog((c) -> new ManageTemplatesDialog(c), ManageTemplatesController.class); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/SubjectAlternativeNameDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.certoptions; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.certs.x509.SubjectAlternativeNameExtensionData; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * Subject Alternative Name dialog. 27 | */ 28 | public class SubjectAlternativeNameDialog extends Dialog { 29 | 30 | private SubjectAlternativeNameDialog(SubjectAlternativeNameController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the Subject Alternative Name dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static SubjectAlternativeNameController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new SubjectAlternativeNameDialog(c), SubjectAlternativeNameController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/certoptions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.certoptions; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/crloptions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.crloptions; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/dneditor/DNEditorDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.dneditor; 18 | 19 | import java.io.IOException; 20 | 21 | import javax.security.auth.x500.X500Principal; 22 | 23 | import de.carne.jfx.stage.StageController; 24 | import javafx.scene.control.Dialog; 25 | 26 | /** 27 | * DN editor dialog. 28 | */ 29 | public class DNEditorDialog extends Dialog { 30 | 31 | private DNEditorDialog(DNEditorController controller) { 32 | setResultConverter(controller); 33 | } 34 | 35 | /** 36 | * Load the preferences dialog. 37 | * 38 | * @param owner The stage controller owning this dialog. 39 | * @return The constructed controller which is bound to the newly created dialog. 40 | * @throws IOException if an I/O error occurs during dialog loading. 41 | */ 42 | public static DNEditorController load(StageController owner) throws IOException { 43 | return owner.loadDialog((c) -> new DNEditorDialog(c), DNEditorController.class); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/dneditor/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.dneditor; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/password/PasswordController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.password; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | import de.carne.jfx.scene.control.DialogController; 22 | import de.carne.jfx.scene.control.DialogHelper; 23 | 24 | /** 25 | * Base class for all password controllers. 26 | */ 27 | abstract class PasswordController extends DialogController { 28 | 29 | /** 30 | * Initialize {@code PasswordController}. 31 | * 32 | * @param resource The resource to get the password for. 33 | * @param rememberPassword Whether the remember password option has been selected by the user. 34 | * @param passwordException The possible exception of a previous enter password attempt (may be {@code null}). 35 | * @return The initialized password controller. 36 | */ 37 | public PasswordController init(String resource, boolean rememberPassword, @Nullable Throwable passwordException) { 38 | getUI().setHeaderText(getHeaderText(resource)); 39 | DialogHelper.setExceptionContent(getUI(), passwordException); 40 | return this; 41 | } 42 | 43 | protected abstract String getHeaderText(String resource); 44 | 45 | protected abstract String getPasswordInput(); 46 | 47 | protected abstract boolean getRememberPasswordOption(); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/password/PasswordResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.password; 18 | 19 | import org.eclipse.jdt.annotation.Nullable; 20 | 21 | import javafx.scene.control.ButtonType; 22 | 23 | final class PasswordResult { 24 | 25 | public static final PasswordResult CANCEL = new PasswordResult(ButtonType.CANCEL, null, false); 26 | 27 | private final ButtonType dialogResult; 28 | 29 | private final char @Nullable [] password; 30 | 31 | private final boolean rememberPassword; 32 | 33 | PasswordResult(ButtonType dialogResult, char @Nullable [] password, boolean rememberPassword) { 34 | this.dialogResult = dialogResult; 35 | this.password = password; 36 | this.rememberPassword = rememberPassword; 37 | } 38 | 39 | public ButtonType dialogResult() { 40 | return this.dialogResult; 41 | } 42 | 43 | public char @Nullable [] password() { 44 | return this.password; 45 | } 46 | 47 | public boolean rememberPassword() { 48 | return this.rememberPassword; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/password/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.password; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/preferences/PreferencesDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.preferences; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.jfx.store.UserPreferences; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * Preferences dialog. 27 | */ 28 | public class PreferencesDialog extends Dialog { 29 | 30 | private PreferencesDialog(PreferencesController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the preferences dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static PreferencesController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new PreferencesDialog(c), PreferencesController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/preferences/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.preferences; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/resources/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.resources; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/store/UserPreferences.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.store; 18 | 19 | import java.util.prefs.BackingStoreException; 20 | import java.util.prefs.Preferences; 21 | 22 | import de.carne.certmgr.util.BooleanPreference; 23 | 24 | /** 25 | * Utility class providing access to store UI preferences. 26 | */ 27 | public final class UserPreferences { 28 | 29 | private final Preferences preferences = Preferences.userNodeForPackage(UserPreferences.class); 30 | 31 | /** 32 | * Expert mode flag. 33 | */ 34 | public final BooleanPreference expertMode = new BooleanPreference(this.preferences, "expertMode"); 35 | 36 | UserPreferences() { 37 | // Make sure this class is not instantiated from outside this package 38 | } 39 | 40 | /** 41 | * Sync the preferences to the backing store. 42 | * 43 | * @throws BackingStoreException if an error occurs during syncing. 44 | */ 45 | public void sync() throws BackingStoreException { 46 | this.preferences.sync(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/store/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.store; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/storepreferences/StorePreferencesDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.storepreferences; 18 | 19 | import java.io.IOException; 20 | 21 | import de.carne.certmgr.certs.UserCertStore; 22 | import de.carne.jfx.stage.StageController; 23 | import javafx.scene.control.Dialog; 24 | 25 | /** 26 | * Store options dialog. 27 | */ 28 | public class StorePreferencesDialog extends Dialog { 29 | 30 | private StorePreferencesDialog(StorePreferencesController controller) { 31 | setResultConverter(controller); 32 | } 33 | 34 | /** 35 | * Load the store options dialog. 36 | * 37 | * @param owner The stage controller owning this dialog. 38 | * @return The constructed controller which is bound to the newly created dialog. 39 | * @throws IOException if an I/O error occurs during dialog loading. 40 | */ 41 | public static StorePreferencesController load(StageController owner) throws IOException { 42 | return owner.loadDialog((c) -> new StorePreferencesDialog(c), StorePreferencesController.class); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/storepreferences/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.storepreferences; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/util/converter/CRLUpdatePeriodStringConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.util.converter; 18 | 19 | import de.carne.certmgr.certs.security.CRLUpdatePeriod; 20 | import de.carne.certmgr.util.Days; 21 | import javafx.util.StringConverter; 22 | 23 | /** 24 | * {@link StringConverter} implementation for the {@code CRLUpdatePeriod} type. 25 | */ 26 | public class CRLUpdatePeriodStringConverter extends AbstractPeriodStringConverter { 27 | 28 | @Override 29 | protected CRLUpdatePeriod fromDays(Days period) { 30 | return new CRLUpdatePeriod(period); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/util/converter/CRTValidityPeriodStringConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.jfx.util.converter; 18 | 19 | import de.carne.certmgr.certs.security.CRTValidityPeriod; 20 | import de.carne.certmgr.util.Days; 21 | import javafx.util.StringConverter; 22 | 23 | /** 24 | * {@link StringConverter} implementation for the {@code CRTValidityPeriod} 25 | * type. 26 | */ 27 | public class CRTValidityPeriodStringConverter extends AbstractPeriodStringConverter { 28 | 29 | @Override 30 | protected CRTValidityPeriod fromDays(Days period) { 31 | return new CRTValidityPeriod(period); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/util/converter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.util.converter; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/jfx/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.jfx.util; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/util/BooleanPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.util; 18 | 19 | import java.util.prefs.Preferences; 20 | 21 | /** 22 | * Utility class providing access to a {@link Boolean} preference. 23 | */ 24 | public class BooleanPreference extends Preference { 25 | 26 | /** 27 | * Construct {@code BooleanPreference}. 28 | * 29 | * @param preferences The {@link Preferences} object storing this preference. 30 | * @param key The preference key. 31 | */ 32 | public BooleanPreference(Preferences preferences, String key) { 33 | super(preferences, key); 34 | } 35 | 36 | /** 37 | * Get the preference value. 38 | * 39 | * @param defaultValue The default preference value to return in case the preference is undefined. 40 | * @return The preference value. 41 | */ 42 | public boolean getBoolean(boolean defaultValue) { 43 | return preferences().getBoolean(key(), defaultValue); 44 | } 45 | 46 | /** 47 | * Set the preference value. 48 | * 49 | * @param value The value to set. 50 | */ 51 | public void putBoolean(boolean value) { 52 | preferences().putBoolean(key(), value); 53 | } 54 | 55 | @Override 56 | protected Boolean toValue(String valueString) { 57 | return Boolean.valueOf(valueString); 58 | } 59 | 60 | @Override 61 | protected String fromValue(Boolean value) { 62 | return value.toString(); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/util/Bytes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.util; 18 | 19 | /** 20 | * Utility class providing byte data related functions. 21 | */ 22 | public final class Bytes { 23 | 24 | private Bytes() { 25 | // Make sure this class is not instantiated from outside 26 | } 27 | 28 | /** 29 | * Convert byte data to a string. 30 | * 31 | * @param bytes The byte data to convert. 32 | * @return The byte data's string representation. 33 | */ 34 | public static String toString(byte[] bytes) { 35 | return toString(bytes, bytes.length); 36 | } 37 | 38 | /** 39 | * Convert byte data to a string. 40 | * 41 | * @param bytes The byte data to convert. 42 | * @param len The maximum number of bytes to display. 43 | * @return The byte data's string representation. 44 | */ 45 | public static String toString(byte[] bytes, int len) { 46 | StringBuilder buffer = new StringBuilder(); 47 | int byteIndex = 0; 48 | 49 | for (byte b : bytes) { 50 | if (byteIndex > 0) { 51 | buffer.append(' '); 52 | } 53 | if (byteIndex >= len) { 54 | buffer.append('\u2026'); 55 | break; 56 | } 57 | buffer.append(String.format("%02X", b & 0xff)); 58 | byteIndex++; 59 | } 60 | return buffer.toString(); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/util/IntPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.util; 18 | 19 | import java.util.prefs.Preferences; 20 | 21 | import org.eclipse.jdt.annotation.Nullable; 22 | 23 | import de.carne.boot.Exceptions; 24 | 25 | /** 26 | * Utility class providing access to a {@link Integer} preference. 27 | */ 28 | public class IntPreference extends Preference { 29 | 30 | /** 31 | * Construct {@code IntPreference}. 32 | * 33 | * @param preferences The {@link Preferences} object storing this preference. 34 | * @param key The preference key. 35 | */ 36 | public IntPreference(Preferences preferences, String key) { 37 | super(preferences, key); 38 | } 39 | 40 | /** 41 | * Get the preference value. 42 | * 43 | * @param defaultValue The default preference value to return in case the preference is undefined. 44 | * @return The preference value. 45 | */ 46 | public int getInt(int defaultValue) { 47 | return preferences().getInt(key(), defaultValue); 48 | } 49 | 50 | /** 51 | * Set the preference value. 52 | * 53 | * @param value The value to set. 54 | */ 55 | public void putInt(int value) { 56 | preferences().putInt(key(), value); 57 | } 58 | 59 | @Override 60 | @Nullable 61 | protected Integer toValue(String valueString) { 62 | Integer value = null; 63 | 64 | try { 65 | value = Integer.valueOf(valueString); 66 | } catch (NumberFormatException e) { 67 | Exceptions.ignore(e); 68 | } 69 | return value; 70 | } 71 | 72 | @Override 73 | protected String fromValue(Integer value) { 74 | return value.toString(); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/util/StringPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.util; 18 | 19 | import java.util.prefs.Preferences; 20 | 21 | /** 22 | * Utility class providing access to a {@link String} preference. 23 | */ 24 | public class StringPreference extends Preference { 25 | 26 | /** 27 | * Construct {@code StringPreference}. 28 | * 29 | * @param preferences The {@link Preferences} object storing this preference. 30 | * @param key The preference key. 31 | */ 32 | public StringPreference(Preferences preferences, String key) { 33 | super(preferences, key); 34 | } 35 | 36 | @Override 37 | protected String toValue(String valueString) { 38 | return valueString; 39 | } 40 | 41 | @Override 42 | protected String fromValue(String value) { 43 | return value; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/de/carne/certmgr/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.util; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/de.carne.boot.Application: -------------------------------------------------------------------------------- 1 | de.carne.certmgr.CertMgrMain 2 | java.util.logging.config.class = de.carne.boot.logging.Config 3 | de.carne.boot.prefs.FilePreferences = .de.carne.certmgr 4 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/de.carne.certmgr.certs.spi.CertGenerator: -------------------------------------------------------------------------------- 1 | de.carne.certmgr.certs.x509.generator.LocalCertGenerator 2 | de.carne.certmgr.certs.x509.generator.RemoteCertGenerator 3 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/de.carne.certmgr.certs.spi.CertReader: -------------------------------------------------------------------------------- 1 | de.carne.certmgr.certs.io.DERCertReaderWriter 2 | de.carne.certmgr.certs.io.JKSCertReaderWriter 3 | de.carne.certmgr.certs.io.PEMCertReaderWriter 4 | de.carne.certmgr.certs.io.PKCS12CertReaderWriter 5 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/de.carne.certmgr.certs.spi.CertWriter: -------------------------------------------------------------------------------- 1 | de.carne.certmgr.certs.io.DERCertReaderWriter 2 | de.carne.certmgr.certs.io.JKSCertReaderWriter 3 | de.carne.certmgr.certs.io.PEMCertReaderWriter 4 | de.carne.certmgr.certs.io.PKCS12CertReaderWriter 5 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/UserCertStoreI18N.properties: -------------------------------------------------------------------------------- 1 | STR_MESSAGE_PASSWORD_REQUIRED = A password is required to access ''{0}''. 2 | 3 | STR_TEXT_EXTERNALENTRY = 4 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/UserCertStoreI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/certs/UserCertStoreI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/asn1/OIDs.properties: -------------------------------------------------------------------------------- 1 | 1.2.840.113549.1.9.14 = PKCS#9 ExtensionRequest 2 | 3 | # see https://support.microsoft.com/de-de/help/287547/object-ids-associated-with-microsoft-cryptography 4 | 1.3.6.1.4.1.311.20.2 = Microsoft szOID_ENROLL_CERTTYPE_EXTENSION 5 | 1.3.6.1.4.1.311.21.1 = Microsoft szOID_CERTSRV_CA_VERSION 6 | 1.3.6.1.4.1.311.21.2 = Microsoft szOID_CERTSRV_PREVIOUS_CERT_HASH 7 | 8 | 1.3.6.1.5.5.7.1.1 = id-pe-authorityInfoAccess 9 | 1.3.6.1.5.5.7.1.12 = id-pe-logotype 10 | 11 | 2.5.29.14 = Subject Key Identifier 12 | 2.5.29.15 = Key Usage 13 | 2.5.29.16 = Private Key Usage Period 14 | 2.5.29.17 = Subject Alternative Name 15 | 2.5.29.18 = Issuer Alternative Name 16 | 2.5.29.19 = Basic Constraints 17 | 2.5.29.20 = CRL Number 18 | 2.5.29.21 = Reason code 19 | 2.5.29.30 = Name Constraints 20 | 2.5.29.31 = CRL Distribution Points 21 | 2.5.29.32 = Certificate Policies 22 | 2.5.29.33 = Policy Mappings 23 | 2.5.29.35 = Authority Key Identifier 24 | 2.5.29.36 = Policy Constraints 25 | 2.5.29.37 = Extended key usage 26 | 27 | 2.16.840.1.113730.1.1 = Netscape certificate type 28 | 2.16.840.1.113730.1.13 = Netscape certificate comment 29 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/io/CertIOI18N.properties: -------------------------------------------------------------------------------- 1 | STR_DER_TYPE = DER file(s) 2 | STR_DER_EXTENSION_PATTERNS = *.der|*.crt|*.key|*.csr|*.crl 3 | STR_DER_UNKNOWN_OBJECT = Ignoring unknown DER object of type ''{0}''. 4 | 5 | STR_JKS_TYPE = Java KeyStore file(s) 6 | STR_JKS_EXTENSION_PATTERNS = *.jks 7 | STR_JKS_UNKNOWN_OBJECT = Ignoring unknown KeyStore object of type ''{0}''. 8 | 9 | STR_PEM_TYPE = PEM file(s) 10 | STR_PEM_EXTENSION_PATTERNS = *.pem|*.crt|*.key|*.csr|*.crl 11 | STR_PEM_UNKNOWN_OBJECT = Ignoring unknown PEM object of type ''{0}''. 12 | 13 | STR_PKCS12_TYPE = PKCS#12 file(s) 14 | STR_PKCS12_EXTENSION_PATTERNS = *.pkcs12|*.p12|*.pfx 15 | STR_PKCS12_UNKNOWN_OBJECT = Ignoring unknown PKCS#12 object of type ''{0}''. 16 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/io/CertIOI18N_DE.properties: -------------------------------------------------------------------------------- 1 | STR_DER_TYPE = DER Datei(en) 2 | STR_DER_EXTENSION_PATTERNS = *.der|*.crt|*.key|*.csr|*.crl 3 | STR_DER_UNKNOWN_OBJECT = Ignoriere unbekanntes DER Objekt vom Typ ''{0}''. 4 | 5 | STR_JKS_TYPE = Java KeyStore Datei(en) 6 | STR_JKS_EXTENSION_PATTERNS = *.jks 7 | STR_JKS_UNKNOWN_OBJECT = Ignoriere unbekanntes KeyStore Objekt vom Typ ''{0}''. 8 | 9 | STR_PEM_TYPE = PEM Datei(en) 10 | STR_PEM_EXTENSION_PATTERNS = *.pem|*.crt|*.key|*.csr|*.crl 11 | STR_PEM_UNKNOWN_OBJECT = Ignoriere unbekanntes PEM Objekt vom Typ ''{0}''. 12 | 13 | STR_PKCS12_TYPE = PKCS#12 Datei(en) 14 | STR_PKCS12_EXTENSION_PATTERNS = *.pkcs12|*.p12|*.pfx 15 | STR_PKCS12_UNKNOWN_OBJECT = Ignoriere unbekanntes PKCS#12 Objekt vom Typ ''{0}''. 16 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/security/SecurityDefaults.properties: -------------------------------------------------------------------------------- 1 | keyAlgorithm = RSA 2 | keyAlgorithm.1 = DSA 3 | keyAlgorithm.2 = EC 4 | keyAlgorithm.3 = RSA 5 | 6 | DSA.keySize = 2048 7 | DSA.keySize.1 = 1024 8 | DSA.keySize.2 = 2048 9 | 10 | DSA.signatureAlgorithm = SHA512WITHDSA 11 | DSA.signatureAlgorithm.1 = SHA512WITHDSA 12 | 13 | EC.keySize = 384 14 | EC.keySize.1 = 192 15 | EC.keySize.2 = 224 16 | EC.keySize.3 = 239 17 | EC.keySize.4 = 256 18 | EC.keySize.5 = 384 19 | EC.keySize.6 = 521 20 | 21 | EC.signatureAlgorithm = SHA256WITHECDSA 22 | EC.signatureAlgorithm.1 = SHA1WITHECDSA 23 | EC.signatureAlgorithm.2 = SHA224WITHECDSA 24 | EC.signatureAlgorithm.3 = SHA256WITHECDSA 25 | EC.signatureAlgorithm.4 = SHA384WITHECDSA 26 | EC.signatureAlgorithm.5 = SHA512WITHECDSA 27 | 28 | RSA.keySize = 4096 29 | RSA.keySize.1 = 1024 30 | RSA.keySize.2 = 2048 31 | RSA.keySize.3 = 4096 32 | RSA.keySize.4 = 8192 33 | 34 | RSA.signatureAlgorithm = SHA256WITHRSA 35 | RSA.signatureAlgorithm.1 = MD2WITHRSA 36 | RSA.signatureAlgorithm.2 = MD5WITHRSA 37 | RSA.signatureAlgorithm.3 = SHA1WITHRSA 38 | RSA.signatureAlgorithm.4 = SHA224WITHRSA 39 | RSA.signatureAlgorithm.5 = SHA256WITHRSA 40 | RSA.signatureAlgorithm.6 = SHA384WITHRSA 41 | RSA.signatureAlgorithm.7 = SHA512WITHRSA 42 | RSA.signatureAlgorithm.8 = RIPEMD128WITHRSA 43 | RSA.signatureAlgorithm.9 = RIPEMD160WITHRSA 44 | RSA.signatureAlgorithm.10 = RIPEMD256WITHRSA 45 | 46 | crtValidity = P1Y 47 | crtValidity.1 = P1M 48 | crtValidity.2 = P2M 49 | crtValidity.3 = P3M 50 | crtValidity.4 = P6M 51 | crtValidity.5 = P1Y 52 | crtValidity.6 = P2Y 53 | crtValidity.7 = P3Y 54 | crtValidity.8 = P4Y 55 | crtValidity.9 = P5Y 56 | crtValidity.10 = P10Y 57 | 58 | crlUpdate = P1M 59 | crlUpdate.1 = P1D 60 | crlUpdate.2 = P1W 61 | crlUpdate.3 = P1M 62 | crlUpdate.4 = P2M 63 | crlUpdate.5 = P3M 64 | 65 | platformKeyStore = 66 | platformKeyStore.1 = KeychainStore 67 | platformKeyStore.2 = Windows-ROOT 68 | platformKeyStore.3 = Windows-MY 69 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/x500/X500Names.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Basic set of commonly used names 3 | # 4 | 0.9.2342.19200300.100.1.1 = UID 5 | 0.9.2342.19200300.100.1.25 = DC 6 | 1.2.840.113549.1.9.1 = EMAILADDRESS, EMAIL 7 | 1.3.6.1.4.1.42.2.11.2.1 = IP 8 | 2.5.4.3 = CN 9 | 2.5.4.4 = SURNAME 10 | 2.5.4.5 = SERIALNUMBER 11 | 2.5.4.6 = C 12 | 2.5.4.7 = L 13 | 2.5.4.8 = ST, S 14 | 2.5.4.9 = STREET 15 | 2.5.4.10 = O 16 | 2.5.4.11 = OU 17 | 2.5.4.12 = T 18 | 2.5.4.13 = DESCRIPTION 19 | 2.5.4.42 = GIVENNAME 20 | 2.5.4.43 = INITIALS 21 | 2.5.4.44 = GENERATION 22 | 2.5.4.46 = DNQ, DNQUALIFIER 23 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/x509/AttributesI18N.properties: -------------------------------------------------------------------------------- 1 | STR_ENTRY = Certificate Entry 2 | STR_ENTRY_ID = Id 3 | STR_ENTRY_DN = DN 4 | 5 | STR_CRT = X.509 Certificate 6 | STR_CRT_VERSION = Version 7 | STR_CRT_SERIALNUMBER = Serial number 8 | STR_CRT_SIGALG = Signature algorithm 9 | STR_CRT_ISSUERDN = Issuer 10 | STR_CRT_NOTBEFORE = Valid from 11 | STR_CRT_NOTAFTER = Valid to 12 | STR_CRT_SUBJECTDN = Subject 13 | STR_CRT_PUBLICKEY = Public key 14 | 15 | STR_CSR = PKCS #10 Certificate Signing Request 16 | STR_CSR_SIGALG = Signature algorithm 17 | STR_CSR_SUBJECTDN = Subject 18 | STR_CSR_PUBLICKEY = Public key 19 | 20 | STR_CRL = X.509 Certificate Revocation List 21 | STR_CRL_VERSION = Version 22 | STR_CRL_THISUPDATE = This update 23 | STR_CRL_NEXTUPDATE = Next update 24 | STR_CRL_SIGALG = Signature algorithm 25 | STR_CRL_ISSUERDN = Issuer 26 | STR_CRL_ENTRY = Entry[{0}] 27 | STR_CRL_ENTRY_SERIAL = #{0} 28 | STR_CRL_ENTRY_SERIAL_INDIRECT = #{0} ({1}) 29 | STR_CRL_ENTRY_DATE = Revocation date 30 | STR_CRL_ENTRY_REASON = Revocation reason 31 | 32 | STR_EXTENSION = Extension {0} 33 | 34 | STR_EXTENSION_CRITICAL = critical 35 | STR_EXTENSION_NONCRITICAL = non-critical 36 | STR_EXTENSION_DATA = <{0} extension byte(s)> 37 | 38 | STR_GENERALNAME = General Name[{0}] 39 | 40 | STR_KEYIDENTIFIER = Key Identifier 41 | STR_AUTHORITY_CERT_ISSUER = Authority certificate issuer 42 | STR_AUTHORITY_CERT_SERIAL_NUMBER = Authority certificate serial number 43 | 44 | STR_BC_CA = CA 45 | STR_BC_PATHLENCONSTRAINT = PathLenConstraint 46 | STR_BC_VALUE = CA = {0} 47 | 48 | STR_CRLNUMBER = CRL number 49 | 50 | STR_DISTRIBUTIONPOINT = Distribution Point[{0}] 51 | STR_DISTRIBUTIONPOINT_REASONS = Reasons 52 | STR_DISTRIBUTIONPOINT_CRLISSUER = CRL Issuer 53 | 54 | STR_DISTRIBUTIONPOINTNAME_NAMERELATIVETOCRLISSUER = Name relative to CRL Issuer 55 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/x509/AttributesI18N_DE.properties: -------------------------------------------------------------------------------- 1 | STR_ENTRY = Zertifikatseintrag 2 | STR_ENTRY_ID = Id 3 | STR_ENTRY_DN = DN 4 | 5 | STR_CRT = X.509 Zertifikat 6 | STR_CRT_VERSION = Version 7 | STR_CRT_SERIALNUMBER = Serial number 8 | STR_CRT_SIGALG = Signature algorithm 9 | STR_CRT_ISSUERDN = Issuer 10 | STR_CRT_NOTBEFORE = Valid from 11 | STR_CRT_NOTAFTER = Valid to 12 | STR_CRT_SUBJECTDN = Subject 13 | STR_CRT_PUBLICKEY = Public key 14 | 15 | STR_CSR = PKCS #10 Zertifikatsantrag (CSR) 16 | STR_CSR_SIGALG = Signature algorithm 17 | STR_CSR_SUBJECTDN = Subject 18 | STR_CSR_PUBLICKEY = Public key 19 | 20 | STR_CRL = X.509 Zertifikatssperrliste (CRL) 21 | STR_CRL_VERSION = Version 22 | STR_CRL_THISUPDATE = This update 23 | STR_CRL_NEXTUPDATE = Next update 24 | STR_CRL_SIGALG = Signature algorithm 25 | STR_CRL_ISSUERDN = Issuer 26 | STR_CRL_ENTRY = Entry[{0}] 27 | STR_CRL_ENTRY_SERIAL = #{0} 28 | STR_CRL_ENTRY_SERIAL_INDIRECT = #{0} ({1}) 29 | STR_CRL_ENTRY_DATE = Revocation date 30 | STR_CRL_ENTRY_REASON = Revocation reason 31 | 32 | STR_EXTENSION = Erweiterung {0} 33 | 34 | STR_EXTENSION_CRITICAL = kritisch 35 | STR_EXTENSION_NONCRITICAL = nicht kritisch 36 | STR_EXTENSION_DATA = <{0} Erweiterungs-Byte(s)> 37 | 38 | STR_GENERALNAME = General Name[{0}] 39 | 40 | STR_KEYIDENTIFIER = Key Identifier 41 | STR_AUTHORITY_CERT_ISSUER = Authority certificate issuer 42 | STR_AUTHORITY_CERT_SERIAL_NUMBER = Authority certificate serial number 43 | 44 | STR_BC_CA = CA 45 | STR_BC_PATHLENCONSTRAINT = PathLenConstraint 46 | STR_BC_VALUE = CA = {0} 47 | 48 | STR_CRLNUMBER = CRL number 49 | 50 | STR_DISTRIBUTIONPOINT = Distribution Point[{0}] 51 | STR_DISTRIBUTIONPOINT_REASONS = Reasons 52 | STR_DISTRIBUTIONPOINT_CRLISSUER = CRL Issuer 53 | 54 | STR_DISTRIBUTIONPOINTNAME_NAMERELATIVETOCRLISSUER = Name relative to CRL Issuer 55 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/x509/generator/CertGeneratorI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STOREENTRY_NAME = {0} ({1}) 2 | STR_SELFSIGNED_NAME = 3 | 4 | STR_LOCAL_DESCRIPTION = Default generator (Local signing authority) 5 | STR_REMOTE_DESCRIPTION = Generate CSR (Remote signing authority) 6 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/certs/x509/generator/CertGeneratorI18N_DE.properties: -------------------------------------------------------------------------------- 1 | STR_STOREENTRY_NAME = {0} ({1}) 2 | STR_SELFSIGNED_NAME = 3 | 4 | STR_LOCAL_DESCRIPTION = Standard-Generator (Lokale CA) 5 | STR_REMOTE_DESCRIPTION = CSR erzeugen (Externe CA) 6 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certexport/CertExportI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Export Certificate(s) 2 | 3 | _STR_LABEL_CERT = Certificate 4 | _STR_LABEL_FORMAT = Format 5 | 6 | _STR_LABEL_FILE = File 7 | _STR_PROMPT_FILE = Select or enter the file to export to 8 | _STR_LABEL_DIRECTORY = Directory 9 | _STR_PROMPT_DIRECTORY = Select or enter the directory to export to 10 | _STR_LABEL_CLIPBOARD = Clipboard 11 | 12 | _STR_LABEL_ENCRYPT = Encrypt export 13 | _STR_LABEL_EXPORT_CERT = Export certificate 14 | _STR_LABEL_EXPORT_CHAIN = Export certificate chain 15 | _STR_LABEL_EXPORT_CHAINROOT = Export root certificate 16 | _STR_LABEL_EXPORT_KEY = Export key 17 | _STR_LABEL_EXPORT_CSR = Export CSR 18 | _STR_LABEL_EXPORT_CRL = Export CRL 19 | 20 | _STR_BUTTON_EXPORT = Export 21 | _STR_BUTTON_CANCEL = Cancel 22 | 23 | STR_TEXT_CLIPBOARD = Clipboard 24 | 25 | STR_FILTER_ALLFILES = All files|*.* 26 | 27 | STR_MESSAGE_NO_FORMAT = Please select an export format. 28 | STR_MESSAGE_ENCRYPTION_REQUIRED = {0} format requires encryption. Enable encryption to continue. 29 | STR_MESSAGE_NO_CHARACTER_FORMAT = {0} format cannot be copied to clipboard. Change format or export destination to continue. 30 | STR_MESSAGE_NO_EXPORT = Empty export. Please select one or more objects to export to continue. 31 | 32 | STR_MESSAGE_NO_FILE = Please enter/choose the file name to export to. 33 | STR_MESSAGE_INVALID_FILE = Cannot export to ''{0}'' as this file is invalid or not accessible. 34 | 35 | STR_MESSAGE_NO_DIRECTORY = Please enter/choose the directory to export to. 36 | STR_MESSAGE_INVALID_DIRECTORY = Cannot export to ''{0}'' as this directory is invalid or not accessible. 37 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certexport/CertExportI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certexport/CertExportI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certimport/CertImportI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certimport/CertImportI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/BasicConstraintsI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Basic Constraints 2 | 3 | _STR_LABEL_CRITICAL = Critical 4 | _STR_LABEL_CA = CA (Certificate Authority) 5 | _STR_LABEL_PATH_LEN_CONSTRAINT = Path length constraint 6 | 7 | STR_MESSAGE_NO_PATH_LEN_CONSTRAINT = Please set a path length constraint. 8 | STR_MESSAGE_INVALID_PATH_LEN_CONSTRAINT = Path length constraint must be 0 or greater. 9 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/BasicConstraintsI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certoptions/BasicConstraintsI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/CRLDistributionPointsI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = CRL Distribution Points 2 | 3 | _STR_LABEL_CRITICAL = Critical 4 | 5 | STR_MESSAGE_NO_NAMES = Please add at least one name to the extension. 6 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/CRLDistributionPointsI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certoptions/CRLDistributionPointsI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/CertOptionsI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Create Certificate 2 | 3 | _STR_MENU_PRESETS = Presets 4 | _STR_MENU_PRESETS_DEFAULT = Reset to defaults 5 | _STR_MENU_PRESETS_STORE = Set options from store entry 6 | _STR_MENU_PRESETS_TEMPLATE = Set options from template 7 | _STR_MENU_PRESETS_MANAGE_TEMPLATES = Manage templates\u2026 8 | STR_MENU_PRESETS_NONE = 9 | STR_MENU_STORE_PRESET = {0}{1} ({2}) 10 | 11 | _STR_LABEL_ALIAS = Name 12 | _STR_LABEL_DN = Distinguished Name (DN) 13 | _STR_LABEL_KEYALG = Key algorithm 14 | _STR_LABEL_KEYSIZE = Key size 15 | _STR_LABEL_GENERATOR = Generator 16 | _STR_LABEL_SIGALG = Signature algorithm 17 | _STR_LABEL_NOTBEFORE = Valid from 18 | _STR_LABEL_NOTAFTER = Valid to 19 | _STR_LABEL_ISSUER = Issuer 20 | _STR_LABEL_EXTENSIONS = Certificate Extensions 21 | 22 | _STR_MENU_ADD_BASICCONTSTRAINTS = Add Basic Constraints 23 | _STR_MENU_ADD_KEYUSSAGE = Add Key Usage 24 | _STR_MENU_ADD_EXTENDEDKEYUSSAGE = Add Extended Key Usage 25 | _STR_MENU_ADD_SUBJECTALTERNATIVENAME = Add Subject Alternative Name 26 | _STR_MENU_ADD_CRLDISTRIBUTIONPOINTS = Add CRL Distribution Points 27 | 28 | _STR_COL_CRITICAL = Critical 29 | _STR_COL_NAME = Name 30 | _STR_COL_VALUE = Value 31 | 32 | _STR_BUTTON_GENERATE = Generate 33 | _STR_BUTTON_CANCEL = Cancel 34 | 35 | STR_TEXT_ALIASHINT = Certificate1 36 | 37 | STR_MESSAGE_NO_ALIAS = Please enter a name for the Certificate. 38 | STR_MESSAGE_NO_DN = Please enter Distinguished Name for the Certificate. 39 | STR_MESSAGE_INVALID_DN = ''{0}'' is not a valid Distinguished Name. 40 | STR_MESSAGE_NO_KEYALG = Please set key pair algorithm. 41 | STR_MESSAGE_NO_KEYSIZE = Please set a key size. 42 | STR_MESSAGE_NO_GENERATOR = Please select a Generator for Certificate generation. 43 | STR_MESSAGE_NO_SIGALG = Please set a signature algorithm. 44 | STR_MESSAGE_NO_NOTBEFORE = Please enter/select a 'Valid from' date. 45 | STR_MESSAGE_INVALID_NOTBEFORE = Please enter/select a 'Valid from' date. 46 | STR_MESSAGE_NO_NOTAFTER = Please enter/select a 'Valid to' date. 47 | STR_MESSAGE_INVALID_NOTAFTER = Please enter/select a 'Valid to' date. 48 | STR_MESSAGE_INVALID_VALIDITY = The validity range must not be empty ({0} - {1}). 49 | STR_MESSAGE_NO_ISSUER = Please select an issuer. 50 | STR_MESSAGE_CANNOT_EDIT_EXTENSION = This extension is of an unsupported type and cannot be modified. It can be used as is or deleted. 51 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/CertOptionsI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certoptions/CertOptionsI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/CertOptionsTemplates.properties: -------------------------------------------------------------------------------- 1 | /template0/alias=RootCA 2 | /template0/dn=CN\=RootCA,OU\=template.domain,SERIALNUMBER\=201706191140 3 | /template0/extension0/critical=true 4 | /template0/extension0/data=BAUDAwD//w\=\= 5 | /template0/extension0/oid=2.5.29.15 6 | /template0/extension1/critical=true 7 | /template0/extension1/data=BAUwAwEB/w\=\= 8 | /template0/extension1/oid=2.5.29.19 9 | /template0/name=RootCA 10 | /template1/alias=IntermediateCA 11 | /template1/dn=CN\=IntermediateCA,OU\=template.domain,SERIALNUMBER\=201706200612 12 | /template1/extension0/critical=true 13 | /template1/extension0/data=BAQDAgEG 14 | /template1/extension0/oid=2.5.29.15 15 | /template1/extension1/critical=true 16 | /template1/extension1/data=BAgwBgEB/wIBAA\=\= 17 | /template1/extension1/oid=2.5.29.19 18 | /template1/extension2/critical=false 19 | /template1/extension2/data=BDQwMjAwoC6gLIYqaHR0cHM6Ly90ZW1wbGF0ZS5kb21haW4vSW50ZXJtZWRpYXRlQ0EuY3Js 20 | /template1/extension2/oid=2.5.29.31 21 | /template1/name=IntermediateCA 22 | /template2/alias=Server 23 | /template2/dn=CN\=Server,OU\=template.domain,SERIALNUMBER\=201706200612 24 | /template2/extension0/critical=true 25 | /template2/extension0/data=BAQDAgOo 26 | /template2/extension0/oid=2.5.29.15 27 | /template2/extension1/critical=false 28 | /template2/extension1/data=BBYwFIISc2VydmVyLnRlc3QuZG9tYWlu 29 | /template2/extension1/oid=2.5.29.17 30 | /template2/extension2/critical=true 31 | /template2/extension2/data=BAUwAwEBAA\=\= 32 | /template2/extension2/oid=2.5.29.19 33 | /template2/extension3/critical=true 34 | /template2/extension3/data=BAwwCgYIKwYBBQUHAwE\= 35 | /template2/extension3/oid=2.5.29.37 36 | /template2/name=Server 37 | /template3/alias=User 38 | /template3/dn=CN\=User,OU\=template.domain,SERIALNUMBER\=201706200620 39 | /template3/extension0/critical=true 40 | /template3/extension0/data=BAQDAgSw 41 | /template3/extension0/oid=2.5.29.15 42 | /template3/extension1/critical=false 43 | /template3/extension1/data=BBQwEoEQdXNlckB0ZXN0LmRvbWFpbg\=\= 44 | /template3/extension1/oid=2.5.29.17 45 | /template3/extension2/critical=true 46 | /template3/extension2/data=BAUwAwEBAA\=\= 47 | /template3/extension2/oid=2.5.29.19 48 | /template3/extension3/critical=true 49 | /template3/extension3/data=BAwwCgYIKwYBBQUHAwI\= 50 | /template3/extension3/oid=2.5.29.37 51 | /template3/name=User 52 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/CertOptionsTemplatesI18N.properties: -------------------------------------------------------------------------------- 1 | STR_DEFAULT_DN = CN={0},OU={1},SERIALNUMBER={2} 2 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/ExtendedKeyUsage.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/ExtendedKeyUsageI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Extended Key Usage 2 | 3 | _STR_LABEL_CRITICAL = Critical 4 | _STR_LABEL_ANY = ANY 5 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/ExtendedKeyUsageI18N_DE.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Extended Key Usage 2 | 3 | _STR_LABEL_CRITICAL = Kritisch 4 | _STR_LABEL_ANY = ANY 5 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/GeneralNameFactoryI18N.properties: -------------------------------------------------------------------------------- 1 | STR_MESSAGE_UNSUPPORTED_TYPE = General name type {0} is not supported. 2 | 3 | STR_MESSAGE_NO_RFC822_NAME = Please enter a mail address. 4 | STR_MESSAGE_INVALID_RFC822_NAME = ''{0}'' is not a valid mail address. 5 | STR_MESSAGE_NO_DNS_NAME = Please enter a DNS name. 6 | STR_MESSAGE_INVALID_DNS_NAME = ''{0}'' is not a valid DNS name. 7 | STR_MESSAGE_NO_DIRECTORY_NAME = Please enter a Directory name. 8 | STR_MESSAGE_INVALID_DIRECTORY_NAME = ''{0}'' is not a valid Directory name.\n({1}) 9 | STR_MESSAGE_NO_URI_NAME = Please enter an URI location. 10 | STR_MESSAGE_INVALID_URI_NAME = ''{0}'' is not a valid URI location.\n({1}) 11 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/GeneralNameFactoryI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certoptions/GeneralNameFactoryI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/KeyUsage.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/KeyUsageI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Key Usage 2 | 3 | _STR_LABEL_CRITICAL = Critical 4 | _STR_LABEL_ANY = ANY 5 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/KeyUsageI18N_DE.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Key Usage 2 | 3 | _STR_LABEL_CRITICAL = Kritisch 4 | _STR_LABEL_ANY = ANY 5 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/ManageTemplatesI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Manage templates 2 | 3 | _STR_LABEL_ADD_CURRENT = Enter a name and press add to create a template from the current certificate options. 4 | 5 | STR_MESSAGE_NO_NAME = Please enter a name for the template. 6 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/ManageTemplatesI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certoptions/ManageTemplatesI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/SubjectAlternativeNameI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Subject Alternative Name 2 | 3 | _STR_LABEL_CRITICAL = Critical 4 | 5 | STR_MESSAGE_NO_NAMES = Please add at least one name to the extension. 6 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/certoptions/SubjectAlternativeNameI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/certoptions/SubjectAlternativeNameI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/crloptions/CRLOptionsI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Generate/update Certificate Revocation List 2 | 3 | _STR_LABEL_ISSUER = CRL issuer 4 | _STR_LABEL_SIGALG = Signature algorithm 5 | _STR_LABEL_LAST_UPDATE = Last update 6 | _STR_LABEL_NEXT_UPDATE = Next update 7 | _STR_LABEL_ENTRIES = CRL entries 8 | 9 | _STR_COL_REVOKED = Revoked 10 | _STR_COL_NAME = Distinguished Name (DN) 11 | _STR_COL_SERIAL = Serial 12 | _STR_COL_REASON = Reason 13 | _STR_COL_DATE = Date 14 | 15 | _STR_BUTTON_UPDATE = Update 16 | _STR_BUTTON_CANCEL = Cancel 17 | 18 | STR_MESSAGE_NO_LASTUPDATE = Please enter/select a 'Last update' date. 19 | STR_MESSAGE_INVALID_UPDATEDATES = The last update date ({0}) must be before the next update date ({1}). 20 | STR_MESSAGE_NO_SIGALG = Please set a signature algorithm. 21 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/crloptions/CRLOptionsI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/crloptions/CRLOptionsI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/dneditor/DNEditorI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Distinguished Name (DN) 2 | 3 | _STR_COL_TYPE = Type 4 | _STR_COL_VALUE = Value 5 | 6 | STR_MESSAGE_NO_TYPE = Please enter/select a type. 7 | STR_MESSAGE_NO_VALUE = Please enter a value. 8 | STR_MESSAGE_INVALID_RDN = The entered RDN is invalid. Reason:\n{0}. 9 | STR_MESSAGE_INVALID_DN = The entered DN is invalid. Reason:\n{0}. 10 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/dneditor/DNEditorI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/dneditor/DNEditorI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/password/EnterNewPassword.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/password/EnterNewPasswordI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = New password required 2 | 3 | STR_LABEL_ENTER_NEWPASSWORD_HEADER = Enter a password for storing\n''{0}'' 4 | 5 | _STR_LABEL_NEWPASSWORD1 = Password 6 | _STR_PROMPT_NEWPASSWORD1 = Enter new password 7 | _STR_LABEL_NEWPASSWORD2 = Password (check) 8 | _STR_PROMPT_NEWPASSWORD2 = Re-enter the password 9 | 10 | STR_TEXT_OK = OK 11 | STR_TEXT_CANCEL = Cancel 12 | STR_TEXT_CANCELALL = Cancel all 13 | 14 | STR_MESSAGE_PASSWORD_MISMATCH = Passwords do not match.Please re-enter. 15 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/password/EnterNewPasswordI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/password/EnterNewPasswordI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/password/EnterPassword.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/password/EnterPasswordI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Password required 2 | 3 | STR_LABEL_ENTER_PASSWORD_HEADER = Enter a password to access\n''{0}'' 4 | 5 | _STR_LABEL_PASSWORD = Password 6 | _STR_PROMPT_PASSWORD = Enter password 7 | _STR_REMEMBER_PASSWORD = Remember password 8 | 9 | STR_TEXT_OK = OK 10 | STR_TEXT_CANCEL = Cancel 11 | STR_TEXT_CANCELALL = Cancel all 12 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/preferences/Preferences.fxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/preferences/PreferencesI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Preferences 2 | 3 | _STR_LABEL_EXPERTMODE = Enable expert mode (Show all available security options)\n\ 4 | Use this options at your own risk. Using incompatible options may cause program failures or security issues! 5 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/preferences/PreferencesI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/preferences/PreferencesI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageAdd16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageAdd16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageAddEntry16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageAddEntry16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageApply16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageApply16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageCRL16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageCRL16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageCSR16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageCSR16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageChooseFile16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageChooseFile16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageCopyEntry16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageCopyEntry16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageDebug16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageDebug16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageDelete16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageDelete16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageDeleteEntry16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageDeleteEntry16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageDown16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageDown16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageEdit16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageEdit16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageError16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageError16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageExport16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageExport16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageExport32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageExport32.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageExportCerts16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageExportCerts16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageExternalCRT16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageExternalCRT16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageImport16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageImport16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageImport32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageImport32.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageImportCerts16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageImportCerts16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageInfo16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageInfo16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageInvalidOverlay16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageInvalidOverlay16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageKey16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageKey16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageManageCRL16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageManageCRL16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageManageCRL32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageManageCRL32.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageNewCert16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageNewCert16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageNewCert32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageNewCert32.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageNewStore16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageNewStore16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageNotice16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageNotice16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageOK16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageOK16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageOpenStore16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageOpenStore16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imagePassword16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imagePassword16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imagePassword32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imagePassword32.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imagePrivateCRT16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imagePrivateCRT16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imagePublicCRT16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imagePublicCRT16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageRefresh16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageRefresh16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageRevokeCert16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageRevokeCert16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageRevokedOverlay16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageRevokedOverlay16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageStore16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageStore16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageStore32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageStore32.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageStorePreferences16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageStorePreferences16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageTrace16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageTrace16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageUp16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageUp16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/resources/imageWarning16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/resources/imageWarning16.png -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/store/AboutInfo1.txt: -------------------------------------------------------------------------------- 1 | Copyright CertMgr 2 | Copyright (c) 2015-2021 Holger de Carne and contributors, 3 | 4 | All Rights Reserved. 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see http://www.gnu.org/licenses. -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/store/AboutInfo2.txt: -------------------------------------------------------------------------------- 1 | Copyright Bouncy Castle Crypto API 2 | This program makes use of the Bouncy Castle Crypto API 3 | (http://bouncycastle.org/java.html). 4 | 5 | Copyright (c) 2000-2014 The Legion of the Bouncy Castle Inc. 6 | (http://www.bouncycastle.org) 7 | 8 | Permission is hereby granted, free of charge, to any person 9 | obtaining a copy of this software and associated documentation 10 | files (the \"Software\"), to deal in the Software without 11 | restriction, including without limitation the rights to use, 12 | copy, modify, merge, publish, distribute, sublicense, and/or 13 | sell copies of the Software, and to permit persons to whom the 14 | Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 22 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 24 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 25 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 27 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/store/AboutInfo3.txt: -------------------------------------------------------------------------------- 1 | Additional Copyrights 2 | 3 | This program makes use of the Farm-Fresh icon set 4 | (http://www.fatcow.com/free-icons). 5 | 6 | (c) Copyright 2009-2014 FatCow Web Hosting. All rights reserved. 7 | http://www.fatcow.com 8 | 9 | These icons are licensed under a Creative Commons Attribution 10 | 3.0 License (http://creativecommons.org/licenses/by/3.0/us/). 11 | 12 | The Application (Lock) icon is licensed under the LGPL 13 | (https://www.gnu.org/licenses/lgpl.html). -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/store/StoreI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Certificate Store Management 2 | 3 | _STR_MENU_FILE = File 4 | _STR_MENU_NEW_STORE = New store\u2026 5 | _STR_MENU_OPEN_STORE = Open store\u2026 6 | _STR_MENU_STORE_PREFERENCES = Store preferences\u2026 7 | _STR_MENU_CLOSE = Close 8 | 9 | _STR_MENU_EDIT = Edit 10 | _STR_MENU_COPY_ENTRY = Copy entry 11 | _STR_MENU_COPY_ENTRY_DN = Copy entry DN 12 | _STR_MENU_COPY_ENTRY_ATTRIBUTE = Copy attribute 13 | _STR_MENU_COPY_ENTRY_ATTRIBUTES = Copy all 14 | _STR_MENU_DELETE_ENTRY = Delete entry\u2026 15 | 16 | _STR_MENU_CERTS = Certificates 17 | _STR_MENU_NEW_CERT = Generate/Request new Certificate\u2026 18 | _STR_MENU_REVOKE_CERT = Revoke Certificate\u2026 19 | _STR_MENU_EDIT_CRL = Manage Certificate Revocation List (CRL)\u2026 20 | _STR_MENU_EXPORT_CERT = Export Certificate\u2026 21 | _STR_MENU_IMPORT_CERTS = Import Certificates\u2026 22 | 23 | _STR_MENU_HELP = Help 24 | _STR_MENU_PREFERENCES = Preferences\u2026 25 | _STR_MENU_SHOW_LOG = Show log\u2026 26 | _STR_MENU_ABOUT = About\u2026 27 | 28 | _STR_COL_ID = Name 29 | _STR_COL_NAME = Distinguished Name (DN) 30 | _STR_COL_SERIAL = Serial 31 | _STR_COL_EXPIRES = Expires 32 | 33 | _STR_COL_ATTRIBUTE = Attribute 34 | _STR_COL_VALUE = Value 35 | 36 | _STR_TTP_EXTERNAL_CRT = External certificate 37 | _STR_TTP_PUBLIC_CRT = Public certificate 38 | _STR_TTP_PRIVATE_CRT = Private certificate 39 | _STR_TTP_CSR = Certificate Signing Request (CSR) 40 | _STR_TTP_CRL = Certificate Revocation List (CRL) 41 | _STR_TTP_KEY = Key pair 42 | _STR_TTP_REVOKED_CRT = Revoked certificate 43 | _STR_TTP_INVALID_CRT = Expired certificate 44 | 45 | STR_TEXT_STORE_STATUS_NONE = 46 | STR_TEXT_STORE_STATUS = Store: ''{0}'' 47 | STR_TEXT_HEAP_STATUS = Memory usage: {0} ({1}) 48 | STR_TEXT_DETAILS_OMITTED = \u2026 ({0} additional entries omitted) 49 | 50 | STR_MESSAGE_CONFIRM_DELETE = Are you sure you want to delete the certificate entry\n''{0}''? 51 | 52 | STR_MESSAGE_CANNOT_REVOKE_CRT = Cannot revoke certificate\n''{0}''\nas it is either self-signed or it''s issuer has no key associated. 53 | STR_MESSAGE_CANNOT_MANAGE_CRL = Cannot manage the CRL for certificate\n''{0}''\nas it has no key associated. 54 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/store/StoreI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/store/StoreI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/storepreferences/StorePreferencesI18N.properties: -------------------------------------------------------------------------------- 1 | STR_STAGE_TITLE = Certificate Store preferences 2 | 3 | _STR_LABEL_NAME = Store name 4 | _STR_PROMPT_NAME = Enter store name 5 | _STR_LABEL_PATH = Store path 6 | _STR_PROMPT_PATH = Select where to create the store 7 | 8 | _STR_LABEL_DEFCRTVALIDITY = Default CRT validity period 9 | _STR_PROMPT_DEFCRTVALIDITY = Select the default period 10 | _STR_LABEL_DEFCRLUPDATE = Default CRL update period 11 | _STR_PROMPT_DEFCRLUPDATE = Select the default period 12 | _STR_LABEL_DEFKEYALG = Default key pair algorithm 13 | _STR_LABEL_DEFKEYSIZE = Default key size 14 | _STR_LABEL_DEFSIGALG = Default signature algorithm 15 | 16 | STR_TEXT_CREATE = Create 17 | 18 | STR_MESSAGE_NO_NAME = Please enter a store name 19 | STR_MESSAGE_INVALID_NAME = Cannot create store as ''{0}'' is not a valid store name. 20 | STR_MESSAGE_NO_PATH = Please enter/select a store path 21 | STR_MESSAGE_INVALID_PATH = Cannot create store as ''{0}'' is not a valid store path. 22 | STR_MESSAGE_STORE_HOME_EXISTS = Cannot create store as ''{0}'' is an existing directory. 23 | STR_MESSAGE_NO_DEFCRTVALIDITY = Please set a default CRT validity period. 24 | STR_MESSAGE_NO_DEFCRLUPDATE = Please set a default CRL updated period. 25 | STR_MESSAGE_NO_DEFKEYALG = Please set a default key pair algorithm. 26 | STR_MESSAGE_NO_DEFKEYSIZE = Please set a default key size. 27 | STR_MESSAGE_NO_DEFSIGALG = Please set a default signature algorithm. 28 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/jfx/storepreferences/StorePreferencesI18N_DE.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/main/resources/de/carne/certmgr/jfx/storepreferences/StorePreferencesI18N_DE.properties -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/util/DaysI18N.properties: -------------------------------------------------------------------------------- 1 | STR_YEARS = {0} year(s) 2 | STR_MONTHS = {0} month(s) 3 | STR_DAYS = {0} day(s) 4 | -------------------------------------------------------------------------------- /src/main/resources/de/carne/certmgr/util/DaysI18N_DE.properties: -------------------------------------------------------------------------------- 1 | STR_YEARS = {0} Jahr(e) 2 | STR_MONTHS = {0} Monat(e) 3 | STR_DAYS = {0} Tag(e) 4 | -------------------------------------------------------------------------------- /src/main/resources/logging-debug.properties: -------------------------------------------------------------------------------- 1 | handlers = de.carne.boot.logging.ConsoleHandler, de.carne.boot.logging.LogBuffer 2 | 3 | .level = LEVEL_INFO 4 | 5 | de.carne.boot.logging.ConsoleHandler.formatter = de.carne.boot.logging.ConsoleFormatter 6 | de.carne.boot.logging.ConsoleHandler.level = ALL 7 | de.carne.boot.logging.LogBuffer.level = ALL 8 | 9 | de.carne.level = LEVEL_DEBUG 10 | -------------------------------------------------------------------------------- /src/main/resources/logging-default.properties: -------------------------------------------------------------------------------- 1 | handlers = de.carne.boot.logging.LogBuffer 2 | 3 | .level = LEVEL_WARNING 4 | 5 | de.carne.boot.logging.ConsoleHandler.formatter = de.carne.boot.logging.ConsoleFormatter 6 | de.carne.boot.logging.ConsoleHandler.level = ALL 7 | de.carne.boot.logging.LogBuffer.level = ALL 8 | 9 | de.carne.level = LEVEL_WARNING 10 | -------------------------------------------------------------------------------- /src/main/resources/logging-verbose.properties: -------------------------------------------------------------------------------- 1 | handlers = de.carne.boot.logging.ConsoleHandler, de.carne.boot.logging.LogBuffer 2 | 3 | .level = LEVEL_INFO 4 | 5 | de.carne.boot.logging.ConsoleHandler.formatter = de.carne.boot.logging.ConsoleFormatter 6 | de.carne.boot.logging.ConsoleHandler.level = ALL 7 | de.carne.boot.logging.LogBuffer.level = ALL 8 | 9 | de.carne.level = LEVEL_INFO 10 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.test; 18 | 19 | import de.carne.certmgr.certs.PasswordCallback; 20 | import de.carne.certmgr.certs.StaticPassword; 21 | 22 | /** 23 | * Common test data and functions. 24 | */ 25 | public final class Tests { 26 | 27 | private static final char[] TEST_PASSWORD = "password".toCharArray(); 28 | 29 | /** 30 | * @return The password callback for test data access. 31 | */ 32 | public static PasswordCallback password() { 33 | return StaticPassword.getInstance(TEST_PASSWORD); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/io/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test.certs.io; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test.certs; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/security/CRLUpdatePeriodTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.test.certs.security; 18 | 19 | import java.security.Security; 20 | import java.util.Objects; 21 | 22 | import org.bouncycastle.jce.provider.BouncyCastleProvider; 23 | import org.junit.Assert; 24 | import org.junit.BeforeClass; 25 | import org.junit.Test; 26 | 27 | import de.carne.certmgr.certs.security.CRLUpdatePeriod; 28 | import de.carne.certmgr.util.Days; 29 | import de.carne.jfx.util.DefaultSet; 30 | 31 | /** 32 | * Test {@link CRLUpdatePeriod} class functionality. 33 | */ 34 | public class CRLUpdatePeriodTest { 35 | 36 | /** 37 | * Register BouncyCastle Provider. 38 | */ 39 | @BeforeClass 40 | public static void registerBouncyCastle() { 41 | Security.addProvider(new BouncyCastleProvider()); 42 | } 43 | 44 | /** 45 | * Test the CRL update period provisioning. 46 | */ 47 | @Test 48 | public void testGetDefaultSet() { 49 | Days days42 = new Days(42); 50 | DefaultSet crlUpdatePeriods = CRLUpdatePeriod.getDefaultSet(days42); 51 | 52 | System.out.println("CRL Update Periods:"); 53 | for (CRLUpdatePeriod crlUpdatePeriod : crlUpdatePeriods) { 54 | System.out.println(crlUpdatePeriod); 55 | } 56 | Assert.assertEquals(days42, Objects.requireNonNull(crlUpdatePeriods.getDefault()).days()); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/security/CRRValidityPeriodTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.test.certs.security; 18 | 19 | import java.security.Security; 20 | import java.util.Objects; 21 | 22 | import org.bouncycastle.jce.provider.BouncyCastleProvider; 23 | import org.junit.Assert; 24 | import org.junit.BeforeClass; 25 | import org.junit.Test; 26 | 27 | import de.carne.certmgr.certs.security.CRTValidityPeriod; 28 | import de.carne.certmgr.util.Days; 29 | import de.carne.jfx.util.DefaultSet; 30 | 31 | /** 32 | * Test {@link CRTValidityPeriod} class functionality. 33 | */ 34 | public class CRRValidityPeriodTest { 35 | 36 | /** 37 | * Register BouncyCastle Provider. 38 | */ 39 | @BeforeClass 40 | public static void registerBouncyCastle() { 41 | Security.addProvider(new BouncyCastleProvider()); 42 | } 43 | 44 | /** 45 | * Test the CRT validity period provisioning. 46 | */ 47 | @Test 48 | public void testGetDefaultSet() { 49 | Days days42 = new Days(42); 50 | DefaultSet crtValidityPeriods = CRTValidityPeriod.getDefaultSet(days42); 51 | 52 | System.out.println("CRR Validity Periods:"); 53 | for (CRTValidityPeriod crlValidityPeriod : crtValidityPeriods) { 54 | System.out.println(crlValidityPeriod); 55 | } 56 | Assert.assertEquals(days42, Objects.requireNonNull(crtValidityPeriods.getDefault()).days()); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/security/PlatformKeyStoreTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.test.certs.security; 18 | 19 | import java.security.Security; 20 | import java.util.Set; 21 | 22 | import org.bouncycastle.jce.provider.BouncyCastleProvider; 23 | import org.junit.BeforeClass; 24 | import org.junit.Test; 25 | 26 | import de.carne.certmgr.certs.security.PlatformKeyStore; 27 | 28 | /** 29 | * Test {@link PlatformKeyStore} class functionality. 30 | */ 31 | public class PlatformKeyStoreTest { 32 | 33 | /** 34 | * Register BouncyCastle Provider. 35 | */ 36 | @BeforeClass 37 | public static void registerBouncyCastle() { 38 | Security.addProvider(new BouncyCastleProvider()); 39 | } 40 | 41 | /** 42 | * Test the key store provisioning. 43 | */ 44 | @Test 45 | public void testGetDefaultSet() { 46 | Set platformKeyStores = PlatformKeyStore.getDefaultSet(); 47 | 48 | System.out.println("Platform key stores:"); 49 | for (PlatformKeyStore platformKeyStore : platformKeyStores) { 50 | System.out.println(platformKeyStore); 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/security/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test.certs.security; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/x500/X500NamesTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.test.certs.x500; 18 | 19 | import javax.security.auth.x500.X500Principal; 20 | 21 | import org.junit.Assert; 22 | import org.junit.Test; 23 | 24 | import de.carne.certmgr.certs.x500.X500Names; 25 | 26 | /** 27 | * Test {@link X500Names} class functionality. 28 | */ 29 | public class X500NamesTest { 30 | 31 | private static final String DN_TEST1 = "CN=Test,OU=Test.Org,EMAILADDRESS=info@test.org,SERIALNUMBER=42"; 32 | 33 | /** 34 | * Test {@link X500Names} class functionality. 35 | */ 36 | @Test 37 | public void testX500Names() { 38 | System.getProperties().put("de.carne.certmgr.certs.x500", "./nofile.properties"); 39 | 40 | X500Principal principal = new X500Principal(DN_TEST1); 41 | 42 | Assert.assertEquals(DN_TEST1, X500Names.toString(principal)); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/x500/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test.certs.x500; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/certs/x509/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test.certs.x509; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/util/ProviderMapTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | package de.carne.certmgr.test.util; 18 | 19 | import java.util.ArrayList; 20 | import java.util.Collection; 21 | 22 | import org.junit.Assert; 23 | import org.junit.Test; 24 | 25 | import de.carne.certmgr.certs.spi.CertReader; 26 | import de.carne.certmgr.certs.spi.CertGenerator; 27 | import de.carne.certmgr.certs.spi.CertWriter; 28 | import de.carne.certmgr.certs.spi.NamedProvider; 29 | import de.carne.certmgr.util.ProviderMap; 30 | 31 | /** 32 | * Test SPI class access via {@link ProviderMap} class. 33 | */ 34 | public class ProviderMapTest { 35 | 36 | /** 37 | * Test {@link CertReader} provider. 38 | */ 39 | @Test 40 | public void testCertReaderProviders() { 41 | testProvider(CertReader.class); 42 | } 43 | 44 | /** 45 | * Test {@link CertWriter} provider. 46 | */ 47 | @Test 48 | public void testCertWriterProviders() { 49 | testProvider(CertWriter.class); 50 | } 51 | 52 | /** 53 | * Test {@link CertGenerator} provider. 54 | */ 55 | @Test 56 | public void testCertSignerProviders() { 57 | testProvider(CertGenerator.class); 58 | } 59 | 60 | private void testProvider(Class cls) { 61 | ProviderMap providers = new ProviderMap<>(cls); 62 | Collection providerNames = new ArrayList<>(); 63 | 64 | for (T provider : providers.providers()) { 65 | String providerName = provider.providerName(); 66 | 67 | providerNames.add(providerName); 68 | Assert.assertEquals(provider, providers.get(providerName)); 69 | } 70 | Assert.assertArrayEquals(providers.names().toArray(), providerNames.toArray()); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /src/test/java/de/carne/certmgr/test/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2021 Holger de Carne and contributors, All Rights Reserved. 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | @NonNullByDefault 18 | package de.carne.certmgr.test.util; 19 | 20 | import org.eclipse.jdt.annotation.NonNullByDefault; 21 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/client1.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/client1.p12 -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/DER.1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/io/DER.1.dat -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/DER.2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/io/DER.2.dat -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/JKS.1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/io/JKS.1.dat -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/PEM.2.dat: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBrDCCATICAQAwTDEVMBMGA1UEBRMMMjAxNzA5MTEwNjM4MRQwEgYDVQQLEwt0 3 | ZXN0LmRvbWFpbjEdMBsGA1UEAxMURXh0ZXJuYWxDZXJ0aWZpY2F0ZTEwdjAQBgcq 4 | hkjOPQIBBgUrgQQAIgNiAAQkVdWn7g0P2PLv6G6arvDY51fVRU7ojNLw7gNr9V41 5 | T3rzsVtpLUcIEazCHEUKf5iNX75cXkynEeMJ516PbOTjX6+9FF4jkknoQU0QvzTW 6 | I9uz1to6Zn9eAEZooN5qi+6gZzBlBgkqhkiG9w0BCQ4xWDBWMA4GA1UdDwEB/wQE 7 | AwIEsDAbBgNVHREEFDASgRB1c2VyQHRlc3QuZG9tYWluMA8GA1UdEwEB/wQFMAMB 8 | AQAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwIwCgYIKoZIzj0EAwIDaAAwZQIxAP1Q 9 | oP+IwJSAubXkqo2unlzbMM9pU7B6WD2mD0OrRnhvSXTzcXcjXyCuPMLNHlmgfgIw 10 | YiP6XvnOOVRIuIKe0in0OvJDhEbXd4JOu5yZspClG+o4LwSKvEOlkLziB1TtbMxv 11 | -----END CERTIFICATE REQUEST----- 12 | -----BEGIN EC PRIVATE KEY----- 13 | Proc-Type: 4,ENCRYPTED 14 | DEK-Info: AES-128-CBC,962C8DCF220EB8B2092572653BB8B0B5 15 | 16 | 5oS4Jt+Sls/hVlRdyquLkXLpRvc58Jz8WBmm1TLXOaj6eH9kKGyFYz85RPgOL4Re 17 | IXIUBR1JksC8ItrthJ3RUONtXTpwwvRCuWj/tOq0M0dgvV4LeQxt+QeMftuPtLC+ 18 | ZSt+U8F+Ah/pUc+NySvOiF7ogbpqziQXJFwOn5Qu1c//VTkColsqT5bWDopdcnYN 19 | fS28eWbJKqrHjtjYbq2wiUE4F2BZS3xS8krx31rB/AM= 20 | -----END EC PRIVATE KEY----- 21 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/PKCS12.1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/io/PKCS12.1.dat -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/PKCS12.2.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/io/PKCS12.2.dat -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/test.crl: -------------------------------------------------------------------------------- 1 | -----BEGIN X509 CRL----- 2 | MIIBJjCBkAIBATANBgkqhkiG9w0BAQsFADAtMRQwEgYDVQQLEwt0ZXN0LmRvbWFp 3 | bjEVMBMGA1UEAxMMSW50ZXJtZWRpYXRlFw0xNjEyMTcyMzAwMDBaFw0xNzAxMTYy 4 | MzAwMDBaoC8wLTAfBgNVHSMEGDAWgBRthOGKScNRb8RhZWAyhdiy/rGZyDAKBgNV 5 | HRQEAwIBATANBgkqhkiG9w0BAQsFAAOBgQBUtSl9GtdsEd13E3cDw2gUycTw17mb 6 | n5ihobm84YnXtmI78jGokvHsjY2SCRUnVh0ziXuApghnZ6vbcqoQZvxoV4/1RaNk 7 | fA9U2xGVX6Q+5AW5J2StUiaT72y4BM0LKL3XKreCZPuiUcGE8bnXIFbfZhHaNvVy 8 | Xp0r3rL3dxgVUA== 9 | -----END X509 CRL----- 10 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/test.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAZegAwIBAgIBAjANBgkqhkiG9w0BAQsFADAlMRQwEgYDVQQLEwt0ZXN0 3 | LmRvbWFpbjENMAsGA1UEAxMEUm9vdDAeFw0xNjEyMTcyMzAwMDBaFw0xNzEyMTcy 4 | MzAwMDBaMC0xFDASBgNVBAsTC3Rlc3QuZG9tYWluMRUwEwYDVQQDEwxJbnRlcm1l 5 | ZGlhdGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJlenS2xByQNX2Wauaj7 6 | WyOwZYZZAqB4HIo/qw4xhF7D8DVKrG1AoTAeWvgEKbI+J+fPnphafEeFWsu28rkf 7 | ALWZXYx9q9codZpfJ9mU+UWS6OOqDhImd6MN68Q1dNn1yRnvG+QaUMzINbfC7R4E 8 | /8l6RJz6S0pCUJyybvLW4IgfAgMBAAGjZjBkMA4GA1UdDwEB/wQEAwIBBjASBgNV 9 | HRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBRthOGKScNRb8RhZWAyhdiy/rGZyDAf 10 | BgNVHSMEGDAWgBTUabLuAR3/H/aUBHRvJiQxbV1KOTANBgkqhkiG9w0BAQsFAAOB 11 | gQAoUFwdj/du/9LOMubGT27S/tPJTlxk3aRNWE5FXm6C79GZUAtTVmK1nttsgYQH 12 | 1vLHqOTnFUuXBQEHuYswhHng78P+10PXOr5OavA89oiAdmW/XZeNNQSgRE8RZ6m6 13 | rReXM7EJ5XdzF1ksqLDSbQYlfRcfRZB5Ges8PaRUrD2pEQ== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/test.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIB9DCCAV0CAQAwLTEUMBIGA1UECxMLdGVzdC5kb21haW4xFTATBgNVBAMTDENl 3 | cnRpZmljYXRlMzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAppj4/d/5A8hR 4 | ZB3HB7E6YwyUqMlEMuFsd16WP7PcQ0S/cBF+hmT1lHSBiwaK4Q9c4wrPXVNYS1AK 5 | wIdVvRmr7HFNlGDQ7U0WsiVYGYvO53zw+vxw1L/nPm2TE/UYb0rBlYJAWmJXVI8g 6 | zN67aGMBmqMFI8BEAhj4mJhvKL/WaV0CAwEAAaCBhjCBgwYJKoZIhvcNAQkOMXYw 7 | dDAOBgNVHQ8BAf8EBAMCA6gwGwYDVR0RBBQwEoEQdXNlckB0ZXN0LmRvbWFpbjAP 8 | BgNVHRMBAf8EBTADAQEAMDQGA1UdJQEB/wQqMCgGCCsGAQUFBwMEBggrBgEFBQcD 9 | AwYIKwYBBQUHAwcGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4GBAJUYPsyOTBxR 10 | ASihSaePY4M0V2XoxSc51eYiHFjBUtPJIZaINNrHcgGPjmhg2oVzchIUkYgsSzrM 11 | 3HmkGhcFHZMX3dxQpJPGisAmVJG69ux6HqJKxa4aC2bXfRKqns0YxmzCp5PCeo4Z 12 | jtw3ccSh+wixLKZoMNAE2u5YmbAFPncY 13 | -----END CERTIFICATE REQUEST----- 14 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/io/test.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: AES-128-CBC,3915466A78E3F1EEF445FA855A807118 4 | 5 | wodBf6wvMsRZi//vWwAN17GFE87p4Ranh+3uVEPXkug8JJtxc3+VXTNvpbYkbK1S 6 | qaaoGTYzC/ebIrolQR+1FmErPLGK3L4WXyBQmpwusA52Nll6pjyU1oUqERUrJd6k 7 | hLRGdqKfh1PZH553mKJ7ll9RgRX28yOVazhRbkhSlS88um/hTqrpJUjuyL8cLp4j 8 | IU/J71FEhpTpmBPydwHkZ9P9TeUTFf57MY47nZy1ZBJVmWsuF34cvUQFP/Sy9Drb 9 | i+sHjc3knTMhn2UYaiq+yYOzFqVoQcvYo2aHSARLu9UU3Wc8hIy02e9LP8pEDBwB 10 | TuK03wJ2Ke51BjshJRrCpOUqSU/CfIkROsdXYBL9Hw9voVKqdRHtGQoRZvewNlLb 11 | yheQ3MztD9LA5Fe3MKzN5O7v4GGEQGuDL927E7e/SC+dXTGIfXosXy9NERMVAxrF 12 | T6/0E7S3rpRTttqZmbxVyVoi4kB8NpvPpI4qQ3ost8DDfCtKwc+nmpc0JIr8FHea 13 | 8EGUpnvOPjvbNDyAsdnzQx4sOqXqfzaLUnq2U91tl2FHNRnOXblX6XH3FXXOSNi0 14 | ihLvxwqGuKGpNP/0irLmF3aE5+appSW/eMwvT0CPotMFitRaFYcBfExHx1nunJLg 15 | BkbfvnGYOIMAWsYHtCCIOOSaNo1Fb8Q6fB5c8Ucmbun0qIUw0ywYPAp5L3Oktz6b 16 | Xj8pSRvm8SogyKu0wIVfHowTZMugxsBtnWiEHa38pOiq8ntmDdiBHFP4kIhpF24n 17 | ppFXGa/pZxZAWFP2AuZGY40/IDIu9PHkywJ3Ursz02zyxis8+u8u4SX7vFlySnuH 18 | -----END RSA PRIVATE KEY----- 19 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/keytool.txt: -------------------------------------------------------------------------------- 1 | keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048 2 | -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/simple.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/simple.jks -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/simple.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/simple.p12 -------------------------------------------------------------------------------- /src/test/resources/de/carne/certmgr/test/certs/test.domain.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdecarne-github/certmgr/31dac741ad91ed7793dc680b5fd864ad3e1475af/src/test/resources/de/carne/certmgr/test/certs/test.domain.zip --------------------------------------------------------------------------------