├── LICENSE ├── README.md ├── YetAnotherOpensslGui.pro ├── docs ├── 01-installation.md ├── 02-maindoc.md ├── 10-full-example-1.md ├── 80-compile.md ├── CONTRIBUTING.md └── img │ ├── 1-fullex.jpg │ ├── 11-fullex.jpg │ ├── 12-fullex.jpg │ ├── 20-fullex.jpg │ ├── 22-fullex.jpg │ ├── 24-fullex.jpg │ ├── 3-fullex.jpg │ ├── 30-fullex.jpg │ ├── 32-fullex.jpg │ ├── 34-fullex.jpg │ ├── 36-fullex.jpg │ ├── 40-fullex.jpg │ ├── 5-fullex.jpg │ ├── 7-fullex.jpg │ ├── 9-fullex.jpg │ └── generate.png ├── img └── main.jpg └── src ├── app ├── cdialogpkcs12.cpp ├── cdialogpkcs12.h ├── cdialogpkcs12.ui ├── cx509extensions.cpp ├── cx509extensions.h ├── dialogcertdate.cpp ├── dialogcertdate.h ├── dialogcertdate.ui ├── dialoggeneratekey.cpp ├── dialoggeneratekey.h ├── dialoggeneratekey.ui ├── dialogsslerrors.cpp ├── dialogsslerrors.h ├── dialogsslerrors.ui ├── dialogx509extensions.cpp ├── dialogx509extensions.h ├── dialogx509extensions.ui ├── dialogx509v3extention.cpp ├── dialogx509v3extention.h ├── dialogx509v3extention.ui ├── main.cpp ├── res │ └── lock.ico ├── ressources.qrc ├── sslcertificates.cpp ├── sslcertificates.h ├── sslmainwindow.cpp ├── sslmainwindow.h ├── sslmainwindow.ui ├── stackwindow.cpp ├── stackwindow.h └── stackwindow.ui └── openssl ├── include └── openssl │ ├── __DECC_INCLUDE_EPILOGUE.H │ ├── __DECC_INCLUDE_PROLOGUE.H │ ├── aes.h │ ├── applink.c │ ├── asn1.h │ ├── asn1_mac.h │ ├── asn1err.h │ ├── asn1t.h │ ├── async.h │ ├── asyncerr.h │ ├── bio.h │ ├── bioerr.h │ ├── blowfish.h │ ├── bn.h │ ├── bnerr.h │ ├── buffer.h │ ├── buffererr.h │ ├── camellia.h │ ├── cast.h │ ├── cmac.h │ ├── cms.h │ ├── cmserr.h │ ├── comp.h │ ├── comperr.h │ ├── conf.h │ ├── conf_api.h │ ├── conferr.h │ ├── crypto.h │ ├── cryptoerr.h │ ├── ct.h │ ├── cterr.h │ ├── des.h │ ├── dh.h │ ├── dherr.h │ ├── dsa.h │ ├── dsaerr.h │ ├── dtls1.h │ ├── e_os2.h │ ├── ebcdic.h │ ├── ec.h │ ├── ecdh.h │ ├── ecdsa.h │ ├── ecerr.h │ ├── engine.h │ ├── engineerr.h │ ├── err.h │ ├── evp.h │ ├── evperr.h │ ├── hmac.h │ ├── idea.h │ ├── kdf.h │ ├── kdferr.h │ ├── lhash.h │ ├── md2.h │ ├── md4.h │ ├── md5.h │ ├── mdc2.h │ ├── modes.h │ ├── obj_mac.h │ ├── objects.h │ ├── objectserr.h │ ├── ocsp.h │ ├── ocsperr.h │ ├── opensslconf.h │ ├── opensslconf.h.in │ ├── opensslv.h │ ├── ossl_typ.h │ ├── pem.h │ ├── pem2.h │ ├── pemerr.h │ ├── pkcs12.h │ ├── pkcs12err.h │ ├── pkcs7.h │ ├── pkcs7err.h │ ├── rand.h │ ├── rand_drbg.h │ ├── randerr.h │ ├── rc2.h │ ├── rc4.h │ ├── rc5.h │ ├── ripemd.h │ ├── rsa.h │ ├── rsaerr.h │ ├── safestack.h │ ├── seed.h │ ├── sha.h │ ├── srp.h │ ├── srtp.h │ ├── ssl.h │ ├── ssl2.h │ ├── ssl3.h │ ├── sslerr.h │ ├── stack.h │ ├── store.h │ ├── storeerr.h │ ├── symhacks.h │ ├── tls1.h │ ├── ts.h │ ├── tserr.h │ ├── txt_db.h │ ├── ui.h │ ├── uierr.h │ ├── whrlpool.h │ ├── x509.h │ ├── x509_vfy.h │ ├── x509err.h │ ├── x509v3.h │ └── x509v3err.h └── lib ├── libcrypto.def ├── libcrypto.exp ├── libcrypto.lib ├── libcrypto.rc ├── libcrypto.res ├── libssl.def ├── libssl.exp ├── libssl.lib ├── libssl.rc └── libssl.res /README.md: -------------------------------------------------------------------------------- 1 | # YAOG 2 | 3 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/05ad904b205c4b598d3378d30a286d7b)](https://www.codacy.com/manual/patrick_34/YAOG?utm_source=github.com&utm_medium=referral&utm_content=patrickpr/YAOG&utm_campaign=Badge_Grade) 4 | 5 | Yet Another Openssl GUI : Qt base openssl GUI to create CSR, certificates, keys (RSA / DSA / EC), P12 etc... 6 | 7 | Current version : 1.1.2 using openSSL 1.1.1g 8 | 9 | If you have a problem, open an [issue](https://github.com/patrickpr/YAOG/issues/new). If you have a question go to [discussion](https://github.com/patrickpr/YAOG/discussions) 10 | 11 | This project aims to allow creating certificates / keys in a quick and easy way. 12 | 13 | Features : 14 | - Single executable with no dependencies (openssl & Qt lib are included) 15 | - Create auto sign certificates or CSR with immediate PEM display to copy/paste 16 | - Certificate signing 17 | - Stack to handle multiple certificates 18 | - Conversion from certificate (private key) to csr 19 | - Allow RSA, DSA and elliptic curve keys 20 | - Encrypt/decrypt keys, check certificate / key match 21 | - Set X509v3 extensions 22 | - Import/export to PKCS#12 23 | - Should work on any platform supported by Qt 24 | 25 | Platforms for release binaries : 26 | - Windows release 27 | - Will compile on Linux someday 28 | - I don't have any Mac for OSX release. 29 | 30 | Binary includes openssl library version 1.1.1g compiled for 64 bits Windows platform. 31 | 32 | Source code for openssl can be found at : https://www.openssl.org/source/ 33 | 34 | Licence : GPL V3 35 | 36 | Installation / doc : ![here](docs/01-installation.md) 37 | 38 | Main (and only !) window : 39 | 40 | ![MAIN](img/main.jpg) 41 | 42 | -------------------------------------------------------------------------------- /YetAnotherOpensslGui.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # Project : Yet Another OpenSSL GUI 3 | # Author : Patrick Proy 4 | # Copyright (C) 2018-2020 5 | # 6 | # Licence : http://www.gnu.org/licenses/gpl.txt 7 | # 8 | #------------------------------------------------- 9 | 10 | QT += core gui network widgets 11 | 12 | TARGET = YetAnotherOpensslGui 13 | TEMPLATE = app 14 | 15 | SOURCES += src/app/main.cpp\ 16 | #src/app/cx509extensions.cpp \ 17 | src/app/dialogx509extensions.cpp \ 18 | src/app/sslmainwindow.cpp \ 19 | src/app/sslcertificates.cpp \ 20 | src/app/dialoggeneratekey.cpp \ 21 | src/app/dialogsslerrors.cpp \ 22 | src/app/dialogcertdate.cpp \ 23 | src/app/dialogx509v3extention.cpp \ 24 | src/app/cdialogpkcs12.cpp \ 25 | src/app/stackwindow.cpp 26 | 27 | HEADERS += src/app/sslmainwindow.h \ 28 | #src/app/cx509extensions.h \ 29 | src/app/dialogx509extensions.h \ 30 | src/app/sslcertificates.h \ 31 | src/app/dialoggeneratekey.h \ 32 | src/app/dialogsslerrors.h \ 33 | src/app/dialogcertdate.h \ 34 | src/app/dialogx509v3extention.h \ 35 | src/app/cdialogpkcs12.h \ 36 | src/app/stackwindow.h 37 | 38 | FORMS += src/app/sslmainwindow.ui \ 39 | src/app/dialoggeneratekey.ui \ 40 | src/app/dialogsslerrors.ui \ 41 | src/app/dialogcertdate.ui \ 42 | src/app/dialogx509extensions.ui \ 43 | src/app/dialogx509v3extention.ui \ 44 | src/app/cdialogpkcs12.ui \ 45 | src/app/stackwindow.ui 46 | 47 | LIBS += -L"src/openssl/lib" 48 | LIBS += $$PWD/src/openssl/lib/libssl.lib $$PWD/src/openssl/lib/libcrypto.lib 49 | 50 | INCLUDEPATH += "src/openssl/include" 51 | 52 | RESOURCES += \ 53 | src/app/ressources.qrc 54 | -------------------------------------------------------------------------------- /docs/01-installation.md: -------------------------------------------------------------------------------- 1 | Installation 2 | =============== 3 | 4 | Choose your version (latest is better) and download it [here](https://github.com/patrickpr/YAOG/releases) 5 | 6 | Just unzip and run the exe. 7 | All dependencies (SSL & Qt) are packaged inside the zip file. 8 | 9 | If you have any issues about missing DLL, first try to install Microsoft VisualC runtime (vc_redist x64). If it doesn't help, please open an Issue 10 | 11 | Have a look at the [doc](02-maindoc.md) now ! 12 | 13 | Build your own 14 | =============== 15 | 16 | Here are the guidelines to compile YAOG and OpenSSL on your own : [compile](80-compile.md) 17 | -------------------------------------------------------------------------------- /docs/02-maindoc.md: -------------------------------------------------------------------------------- 1 | Documentation 2 | =============== 3 | 4 | About 5 | ----- 6 | 7 | This software is all about creating certs/csr and keys quickly. 8 | 9 | It will let you generate certificates of any kind, even if they are not secure (RSA 512 + md5 for example), or with incompatible X509 extensions. 10 | 11 | Remember to save you certificates and keys if you need them, as the software won't warn you about unsaved changes ! 12 | 13 | Below is a quick documentation of main features, and a full step by step example is available ![here](10-full-example-1.md) 14 | 15 | Main Window 16 | ----------- 17 | 18 | The main window has all you need : 19 | 20 | * Subject : all elements that will be set in your certificate / CSR. Only the CN will be set in a new CSR 21 | * Key : type / length of key to generate. Check "password protected" to encrypt your key 22 | * X509 extensions 23 | * "Generate button" : see below 24 | 25 | ![MAIN](../img/main.jpg) 26 | 27 | Generate button 28 | --------------- 29 | 30 | ![Gen](img/generate.png) 31 | 32 | you can generate : 33 | 34 | * CSR + key : this will generate a CSR with the CN entered in "subject" and the key type/length/encryption in "key" group. 35 | 36 | * Autosign + key : this will generate a X509 certificate with all elements in "subject" group (if not empty), key and extensions. The certificate will use it's own private key to sign itself 37 | 38 | * CSR (existing key) : this will generate a CSR with the CN entered and the key in entered in PEM format at the lower right. 39 | 40 | Note : the "generate key" button will only generate a key. 41 | 42 | Certificate buttons 43 | ------------------- 44 | 45 | * Display : display in human readable format the current certificate. 46 | 47 | * Save/load : Save/load on disk 48 | 49 | * Test cert & key match : check the certificate/csr public key is related to the private key in the "Key" box. 50 | 51 | * Sign : sign a csr with the cert/key defined in the stack window 52 | 53 | Key buttons 54 | ----------- 55 | 56 | * Display : display in human readable format the current key 57 | 58 | * Save/load : Save/load on disk 59 | 60 | * Test : test if the key is correct (doesn't work for DSA) 61 | 62 | * Encrypt/Decrypt : encrypt or decrypt the key and output result in PEM format. Cipher used is the one in the top "Key" group. 63 | 64 | PKCS12 65 | ------ 66 | 67 | Save or load pkcs12 format. 68 | You can add certificate (previously saved on disk) with the current cert/key in a single P12 69 | On the load dialog box, you can load the main certificate/key ("Import cert & key") or the other certificates in the P12 container. 70 | 71 | Misc buttons 72 | ------------ 73 | 74 | Save Settings : save all the subject entries and all the X509 extensions in the default.ini file located in the installation directory 75 | 76 | Updates Check 77 | ------------- 78 | 79 | First time you launch the software, it will ask you if you want to check for updates. 80 | To change this, edit the default.ini file and change the "checkupdate" variable to: 81 | 82 | * 0 : no update checks 83 | * 1 : check updates 84 | * 3 : ask again next launch -------------------------------------------------------------------------------- /docs/10-full-example-1.md: -------------------------------------------------------------------------------- 1 | Full example 2 | =============== 3 | 4 | About 5 | ----- 6 | 7 | In this example is describe how to generate a self signed CA, generate and sign a web server certificate, save all to a pkcs12 structure and renew the certificate. 8 | 9 | 10 | Generate the CA 11 | --------------- 12 | 13 | We need a certificate authority, self signed, with x509 extensions of a CA. 14 | 15 | First, choose a rsa key of 2048 bits with a password protection : 16 | 17 | ![KEY](img/1-fullex.jpg) 18 | 19 | Next, set 20 | 21 | 1) the name of the CA. Only the CN is mandatory 22 | 2) the digest used to sign the key 23 | 3) validity in days : here set to 10 years. 24 | 25 | ![subject](img/7-fullex.jpg) 26 | 27 | Date selection : You can either set validity in days starting from now, or select a starting and ending date by clicking ![date](img/3-fullex.jpg) and choosing start/end date 28 | To revert to number of days, click : ![date](img/5-fullex.jpg) 29 | 30 | Next, add some X509 v3 extensions to make it look like a real CA, for example add "CA=true" as critical extension as this is needed to be seen as a CA. 31 | 32 | Note : a critical extension means that if the browser - or other soft -, doesn't understand the extension, it should not accept the certificate. 33 | 34 | Add an extension : 35 | 36 | ![ext](img/9-fullex.jpg) 37 | 38 | Then : 39 | 40 | 1) Select "basicConstraint" as extension type 41 | 2) Click "Select" 42 | 3) Select "CA:TRUE" 43 | 4) Select Critical extension 44 | 5) Click "Add" 45 | 6) Click "OK" to add extension 46 | 47 | ![ext](img/11-fullex.jpg) 48 | 49 | Note : 50 | 51 | * "Add and continue" will allow you to add the extension then reset the form for the next one 52 | * "Reset form" will allow you to select a new extension 53 | * You can edit the value if needed 54 | 55 | You should now see the extension you added : 56 | 57 | ![ext](img/12-fullex.jpg) 58 | 59 | Finaly select "Autosign+key" and click "generate". 60 | 61 | Enter a serial number (or leave the random one) and click OK : ![serial](img/20-fullex.jpg) 62 | 63 | The certificate and key (if no error is reported) are displayed - in pem format - in the lower edit box for you to cut & paste if needed. : 64 | 65 | ![serial](img/22-fullex.jpg) 66 | 67 | Now the CA is generated, save the certificate for later use : click "save" in the Certificate box. 68 | 69 | Next, push the certificate in the stack to select it as signing certificate : 70 | 71 | 1) Click "Push cert" (the system will ask you for the key password to decrypt it) 72 | 2) Select it in the stack 73 | 3) Click "Sel for signing" 74 | 4) The "MY CA" certificate is now the signing certificate 75 | 76 | ![serial](img/24-fullex.jpg) 77 | 78 | Generate a certificate to sign 79 | ------------------------------ 80 | 81 | Now, generate a certificate signing request (CSR) and sign it with the created CA. 82 | 83 | Change the Name to : www.mysite.com, and change town name, change key to elliptic curve and disable password protection for key : 84 | 85 | ![csr](img/30-fullex.jpg) 86 | 87 | Select "CSR+key" an click Generate. 88 | 89 | Note : when generating aa csr only the Name, country, etc... are set into the CSR. 90 | 91 | Push the csr into the stack for later use with "push cert". 92 | 93 | Before signing, you must set : 94 | 95 | * Validity : set to 365 days for example 96 | * X509 extensions : here set alternate names (delete CA=TRUE previous extension) : 97 | 98 | ![csr](img/32-fullex.jpg) 99 | 100 | Then click "Sign" and 101 | * enter password of the CA key 102 | * enter a serial number 103 | 104 | the csr is replaced by a certificate. 105 | 106 | Have a look at the certificate ("Display") to check all is OK : 107 | 108 | ![csr](img/34-fullex.jpg) 109 | 110 | Now save the certificate + key and the CA in a single PKC12 file : click "save PKCS12" 111 | 112 | 1) Enter a friendly name (optional) 113 | 2) Enter a password to protect the file 114 | 3) Click "Select from stack", select the CA certificate in the stack and click "Sel for P12" 115 | 4) The "MY CA" certificate (BUT NOT THE KEY) will be saved in the P12 116 | 5) Save to a file 117 | 118 | ![csr](img/36-fullex.jpg) 119 | 120 | Renew a certificate 121 | -------------------- 122 | 123 | To renew a certificate : 124 | 1) Load the CA (cert + key or only the key)in the stack and select it as signing certificate 125 | 2) Load the certificate to renew in main window 126 | 3) Set Name, Country, etc... 127 | 4) Select "CSR (existing key)" and click Generate 128 | 129 | Then setup validity, X509 extensions and sign it again as before. 130 | 131 | ![csr](img/40-fullex.jpg) -------------------------------------------------------------------------------- /docs/80-compile.md: -------------------------------------------------------------------------------- 1 | Compiling YAOG 2 | =============== 3 | 4 | This describes openSSL & Yaog compilation on Windows x64 architecture. 5 | 6 | Needed softwares 7 | ---------------- 8 | 9 | * Qt : Need version > 5.12.4 for openSSL 1.1.1 support 10 | * Perl : https://www.activestate.com/ActivePerl 11 | * Microsoft Visual C compiler : You can use MS VisualStudio 2017 12 | * NASM : https://www.nasm.us 13 | 14 | Paths 15 | ----- 16 | 17 | Following paths are used : 18 | * NASM path `` : main directory where you installed NASM 19 | * OpenSSL path `` : Where you decompressed OpenSSL source 20 | * Yaog source path `` : Where you put the YAOG source 21 | * Yaog binary path `` : Where Qt compiled Yaog 22 | 23 | Compile OpenSSL 24 | --------------- 25 | 26 | Get the source from openssl (https://www.openssl.org/source/) and untar in `` 27 | 28 | You can read 'NOTES.WIN' for compile targets / needed software / etc... 29 | 30 | Launch "x64 Native Tools Command Prompt for VS 2017" 31 | 32 | * set path for NASM : `set PATH=%PATH%;` 33 | * Configure for Windows 64 target : `perl Configure VC-WIN64A` 34 | * Compile : `nmake` 35 | * Check software is working : `nmake test` 36 | 37 | 38 | Get Yaog source 39 | --------------- 40 | 41 | With Git or download master (https://github.com/patrickpr/YAOG/archive/master.zip) 42 | 43 | Copy in `` directory. 44 | 45 | Remove current openSSL includes : 46 | ``` 47 | delete /src/openssl/lib/* 48 | delete /src/openssl/include/openssl/* 49 | ``` 50 | 51 | Copy your OpenSSL version : 52 | ``` 53 | copy /include/openssl/* /src/openssl/include/openssl/ 54 | 55 | copy /ms/applink.c /src/openssl/include/openssl/ 56 | ``` 57 | In applink.c, line 104 to 127, force conversion to (void*) or there will be an error at compile time : 58 | 59 | Notepad++ regexp replace : `(.*) = (.*) -> \1 = \(void*\) \2` 60 | ``` 61 | copy /libcrypto* /src/openssl/lib/ 62 | copy /libssl* /src/openssl/lib/ 63 | ``` 64 | 65 | Compile with Qt 66 | --------------- 67 | 68 | Open project file 'YetAnotherOpensslGui.pro' 69 | 70 | Create a target : Desktop Qt `` MinGW 64-bit 71 | 72 | Set target directory to `` 73 | 74 | Compile project ! 75 | 76 | Include DLLs 77 | ------------ 78 | 79 | * Qt DLLs 80 | 81 | In `` directory in CLI, run : 82 | 83 | `C:\Qt\\_<32_64>\bin\windeployqt.exe --release YetAnotherOpensslGui.exe` 84 | 85 | * Add mingw DLL 86 | 87 | From directory : `C:\Qt\Tools\mingw_64\bin` copy the following files to `` : 88 | ``` 89 | libgcc_s_seh-1.dll 90 | libstdc++-6.dll 91 | libwinpthread-1.dll 92 | ``` 93 | 94 | * Add compiled openssl DLL 95 | 96 | Copy to `` 97 | 98 | - `/libcrypto-1_1-x64.dll` 99 | - `/libssl-1_1-x64.dll` 100 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Hi, 2 | 3 | If you feel like contributing, please send me a message so I can update the devel branch with latest code. 4 | -------------------------------------------------------------------------------- /docs/img/1-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/1-fullex.jpg -------------------------------------------------------------------------------- /docs/img/11-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/11-fullex.jpg -------------------------------------------------------------------------------- /docs/img/12-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/12-fullex.jpg -------------------------------------------------------------------------------- /docs/img/20-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/20-fullex.jpg -------------------------------------------------------------------------------- /docs/img/22-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/22-fullex.jpg -------------------------------------------------------------------------------- /docs/img/24-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/24-fullex.jpg -------------------------------------------------------------------------------- /docs/img/3-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/3-fullex.jpg -------------------------------------------------------------------------------- /docs/img/30-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/30-fullex.jpg -------------------------------------------------------------------------------- /docs/img/32-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/32-fullex.jpg -------------------------------------------------------------------------------- /docs/img/34-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/34-fullex.jpg -------------------------------------------------------------------------------- /docs/img/36-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/36-fullex.jpg -------------------------------------------------------------------------------- /docs/img/40-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/40-fullex.jpg -------------------------------------------------------------------------------- /docs/img/5-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/5-fullex.jpg -------------------------------------------------------------------------------- /docs/img/7-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/7-fullex.jpg -------------------------------------------------------------------------------- /docs/img/9-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/9-fullex.jpg -------------------------------------------------------------------------------- /docs/img/generate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/docs/img/generate.png -------------------------------------------------------------------------------- /img/main.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/ee6fc1439fe1004364f58cb4df6424cc7a3348f7/img/main.jpg -------------------------------------------------------------------------------- /src/app/cdialogpkcs12.h: -------------------------------------------------------------------------------- 1 | #ifndef CDIALOGPKCS12_H 2 | #define CDIALOGPKCS12_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | //#include "sslmainwindow.h" 10 | #include "sslcertificates.h" 11 | #include "stackwindow.h" 12 | 13 | #define MAX_CERT_SIZE 30000 14 | 15 | namespace Ui { 16 | class CDialogPKCS12; 17 | } 18 | 19 | class CDialogPKCS12 : public QDialog 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | explicit CDialogPKCS12( SSLCertificates * Certificate, QString Filename, bool write, CStackWindow* cur_stack,QWidget *parent = nullptr); 25 | ~CDialogPKCS12(); 26 | 27 | private: 28 | Ui::CDialogPKCS12 *ui; 29 | SSLCertificates * cert; 30 | QString file; 31 | bool isWrite; 32 | CStackWindow* stack; 33 | 34 | signals: 35 | void DlgPKCS12_Finished(bool Cancel, bool MainCertImport, int caCertImport); 36 | 37 | public slots: 38 | void stack_cert_selected(CStackWindow::CertData certificate); 39 | 40 | private slots: 41 | void on_pushButtonLoadCert_clicked(); 42 | void on_pushButtonImportMain_clicked(); 43 | void on_pushButtonImportCert_clicked(); 44 | void on_pushButtonSaveAs_clicked(); 45 | void on_pushButtonCancel_clicked(); 46 | void on_pushButtonSelectFromStack_clicked(); 47 | void on_pushButtonPushAll_clicked(); 48 | }; 49 | 50 | #endif // CDIALOGPKCS12_H 51 | -------------------------------------------------------------------------------- /src/app/dialogcertdate.cpp: -------------------------------------------------------------------------------- 1 | #include "dialogcertdate.h" 2 | #include "ui_dialogcertdate.h" 3 | 4 | DialogCertDate::DialogCertDate(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::DialogCertDate) 7 | { 8 | ui->setupUi(this); 9 | QDateTime now = QDateTime::currentDateTimeUtc(); 10 | this->ui->dateTimeEditStartDate->setDateTime(now); 11 | now=now.addDays(365); 12 | this->ui->dateTimeEditEndValid->setDateTime(now); 13 | 14 | } 15 | 16 | DialogCertDate::~DialogCertDate() 17 | { 18 | delete ui; 19 | } 20 | 21 | void DialogCertDate::calcDays() 22 | { 23 | QDateTime start,end; 24 | start=this->ui->dateTimeEditStartDate->dateTime(); 25 | end=this->ui->dateTimeEditEndValid->dateTime(); 26 | QString duration = "Validity : " + QString::number(start.daysTo(end)) + " days."; 27 | this->ui->labelDuration->setText(duration); 28 | } 29 | 30 | void DialogCertDate::on_buttonBox_accepted() 31 | { 32 | emit DlgCertDateAccept(this->ui->dateTimeEditStartDate->dateTime() , 33 | this->ui->dateTimeEditEndValid->dateTime()); 34 | } 35 | 36 | void DialogCertDate::on_dateTimeEditStartDate_dateChanged(const QDate &date) 37 | { 38 | Q_UNUSED(date); 39 | this->calcDays(); 40 | } 41 | 42 | void DialogCertDate::on_dateTimeEditEndValid_dateChanged(const QDate &date) 43 | { 44 | Q_UNUSED(date); 45 | this->calcDays(); 46 | } 47 | -------------------------------------------------------------------------------- /src/app/dialogcertdate.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOGCERTDATE_H 2 | #define DIALOGCERTDATE_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class DialogCertDate; 9 | } 10 | 11 | class DialogCertDate : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit DialogCertDate(QWidget *parent = nullptr); 17 | ~DialogCertDate(); 18 | private: 19 | void calcDays(); 20 | 21 | private slots: 22 | void on_buttonBox_accepted(); 23 | 24 | void on_dateTimeEditStartDate_dateChanged(const QDate &date); 25 | 26 | void on_dateTimeEditEndValid_dateChanged(const QDate &date); 27 | 28 | private: 29 | Ui::DialogCertDate *ui; 30 | 31 | signals: 32 | void DlgCertDateAccept(QDateTime startDate, QDateTime endDate); 33 | }; 34 | 35 | #endif // DIALOGCERTDATE_H 36 | -------------------------------------------------------------------------------- /src/app/dialogcertdate.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogCertDate 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 231 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 20 | 190 21 | 341 22 | 32 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 90 36 | 30 37 | 191 38 | 22 39 | 40 | 41 | 42 | true 43 | 44 | 45 | 46 | 47 | 48 | 20 49 | 30 50 | 61 51 | 21 52 | 53 | 54 | 55 | Valid from : 56 | 57 | 58 | 59 | 60 | 61 | 30 62 | 70 63 | 47 64 | 20 65 | 66 | 67 | 68 | To : 69 | 70 | 71 | 72 | 73 | 74 | 90 75 | 70 76 | 194 77 | 22 78 | 79 | 80 | 81 | true 82 | 83 | 84 | 85 | 86 | 87 | 90 88 | 110 89 | 191 90 | 20 91 | 92 | 93 | 94 | CrossCursor 95 | 96 | 97 | Qt::LeftToRight 98 | 99 | 100 | 0 days 101 | 102 | 103 | 104 | 105 | 106 | 107 | buttonBox 108 | accepted() 109 | DialogCertDate 110 | accept() 111 | 112 | 113 | 248 114 | 254 115 | 116 | 117 | 157 118 | 274 119 | 120 | 121 | 122 | 123 | buttonBox 124 | rejected() 125 | DialogCertDate 126 | reject() 127 | 128 | 129 | 316 130 | 260 131 | 132 | 133 | 286 134 | 274 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /src/app/dialoggeneratekey.cpp: -------------------------------------------------------------------------------- 1 | #include "dialoggeneratekey.h" 2 | #include "ui_dialoggeneratekey.h" 3 | 4 | DialogGenerateKey::DialogGenerateKey(QString title, QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::DialogGenerateKey) 7 | { 8 | ui->setupUi(this); 9 | this->setWindowTitle(title); 10 | } 11 | 12 | DialogGenerateKey::~DialogGenerateKey() 13 | { 14 | delete ui; 15 | } 16 | 17 | void DialogGenerateKey::add_text_output(QString msg) 18 | { 19 | QString actualMsg=this->ui->labelOutput->toPlainText(); 20 | actualMsg+=msg; 21 | this->ui->labelOutput->setText(actualMsg); 22 | } 23 | void DialogGenerateKey::finished_calc() 24 | { 25 | this->ui->pushButtonClose->setEnabled(true); 26 | this->ui->pushButtonAbort->setEnabled(false); 27 | } 28 | 29 | void DialogGenerateKey::on_pushButtonAbort_clicked() 30 | { 31 | this->ui->pushButtonAbort->setEnabled(false); 32 | emit btn_abort_pressed(); 33 | } 34 | -------------------------------------------------------------------------------- /src/app/dialoggeneratekey.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOGGENERATEKEY_H 2 | #define DIALOGGENERATEKEY_H 3 | 4 | #include 5 | #include "sslcertificates.h" 6 | 7 | namespace Ui { 8 | class DialogGenerateKey; 9 | } 10 | 11 | class DialogGenerateKey : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit DialogGenerateKey(QString title="Output",QWidget *parent = nullptr); 17 | ~DialogGenerateKey(); 18 | 19 | private: 20 | Ui::DialogGenerateKey *ui; 21 | 22 | public slots: 23 | void add_text_output(QString msg); 24 | void finished_calc(); 25 | 26 | signals: 27 | void btn_abort_pressed(); 28 | 29 | private slots: 30 | void on_pushButtonAbort_clicked(); 31 | }; 32 | 33 | #endif // DIALOGGENERATEKEY_H 34 | -------------------------------------------------------------------------------- /src/app/dialoggeneratekey.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogGenerateKey 4 | 5 | 6 | 7 | 0 8 | 0 9 | 499 10 | 377 11 | 12 | 13 | 14 | Key Generation 15 | 16 | 17 | 18 | false 19 | 20 | 21 | 22 | 320 23 | 340 24 | 75 25 | 23 26 | 27 | 28 | 29 | Close 30 | 31 | 32 | 33 | 34 | true 35 | 36 | 37 | 38 | 410 39 | 340 40 | 75 41 | 23 42 | 43 | 44 | 45 | Abort 46 | 47 | 48 | 49 | 50 | true 51 | 52 | 53 | 54 | 10 55 | 100 56 | 471 57 | 231 58 | 59 | 60 | 61 | false 62 | 63 | 64 | Qt::ImhNone 65 | 66 | 67 | 68 | 69 | 70 | 71 | pushButtonClose 72 | clicked() 73 | DialogGenerateKey 74 | accept() 75 | 76 | 77 | 394 78 | 355 79 | 80 | 81 | 364 82 | 279 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /src/app/dialogsslerrors.cpp: -------------------------------------------------------------------------------- 1 | #include "dialogsslerrors.h" 2 | #include "ui_dialogsslerrors.h" 3 | 4 | DialogSSLErrors::DialogSSLErrors(QString label, QString errors, QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::DialogSSLErrors) 7 | { 8 | ui->setupUi(this); 9 | this->ui->labelError->setText(label); 10 | this->ui->textEditError->setText(errors); 11 | } 12 | 13 | DialogSSLErrors::~DialogSSLErrors() 14 | { 15 | delete ui; 16 | } 17 | -------------------------------------------------------------------------------- /src/app/dialogsslerrors.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOGSSLERRORS_H 2 | #define DIALOGSSLERRORS_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class DialogSSLErrors; 8 | } 9 | 10 | class DialogSSLErrors : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit DialogSSLErrors(QString label, QString errors, QWidget *parent = nullptr); 16 | ~DialogSSLErrors(); 17 | 18 | private: 19 | Ui::DialogSSLErrors *ui; 20 | }; 21 | 22 | #endif // DIALOGSSLERRORS_H 23 | -------------------------------------------------------------------------------- /src/app/dialogsslerrors.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogSSLErrors 4 | 5 | 6 | 7 | 0 8 | 0 9 | 412 10 | 359 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | QLayout::SetMinimumSize 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 16777215 35 | 100 36 | 37 | 38 | 39 | SSL Error 40 | 41 | 42 | Qt::AlignCenter 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 0 51 | 0 52 | 53 | 54 | 55 | Qt::Vertical 56 | 57 | 58 | QDialogButtonBox::Ok 59 | 60 | 61 | true 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | false 71 | 72 | 73 | Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | buttonBox 85 | accepted() 86 | DialogSSLErrors 87 | accept() 88 | 89 | 90 | 248 91 | 254 92 | 93 | 94 | 157 95 | 274 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /src/app/dialogx509extensions.cpp: -------------------------------------------------------------------------------- 1 | #include "dialogx509extensions.h" 2 | #include "ui_dialogx509extensions.h" 3 | 4 | DialogX509Extensions::DialogX509Extensions(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::DialogX509Extensions) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | DialogX509Extensions::~DialogX509Extensions() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /src/app/dialogx509extensions.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOGX509EXTENSIONS_H 2 | #define DIALOGX509EXTENSIONS_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class DialogX509Extensions; 8 | } 9 | 10 | class DialogX509Extensions : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit DialogX509Extensions(QWidget *parent = nullptr); 16 | ~DialogX509Extensions(); 17 | 18 | private: 19 | Ui::DialogX509Extensions *ui; 20 | }; 21 | 22 | #endif // DIALOGX509EXTENSIONS_H 23 | -------------------------------------------------------------------------------- /src/app/dialogx509extensions.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogX509Extensions 4 | 5 | 6 | 7 | 0 8 | 0 9 | 774 10 | 538 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 0 21 | 22 | 23 | 24 | Tab 1 25 | 26 | 27 | 28 | 29 | 10 30 | 10 31 | 181 32 | 271 33 | 34 | 35 | 36 | Alternate Names 37 | 38 | 39 | 40 | 41 | 42 | Tab 2 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | Qt::Horizontal 51 | 52 | 53 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | buttonBox 63 | accepted() 64 | DialogX509Extensions 65 | accept() 66 | 67 | 68 | 670 69 | 464 70 | 71 | 72 | 157 73 | 274 74 | 75 | 76 | 77 | 78 | buttonBox 79 | rejected() 80 | DialogX509Extensions 81 | reject() 82 | 83 | 84 | 670 85 | 470 86 | 87 | 88 | 286 89 | 274 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /src/app/dialogx509v3extention.cpp: -------------------------------------------------------------------------------- 1 | #include "dialogx509v3extention.h" 2 | #include "ui_dialogx509v3extention.h" 3 | 4 | DialogX509v3Extention::DialogX509v3Extention(QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::DialogX509v3Extention) 7 | { 8 | ui->setupUi(this); 9 | try { this->Cert=new SSLCertificates(); } 10 | catch (int e) 11 | { 12 | QMessageBox msgBox; 13 | if (e==10) msgBox.setText(tr("Error initializing key(s) : program will end")); 14 | if (e==20) msgBox.setText(tr("Error initializing certificate : program will end")); 15 | msgBox.exec(); 16 | exit(1); 17 | } 18 | this->reset_form(); 19 | } 20 | 21 | DialogX509v3Extention::~DialogX509v3Extention() 22 | { 23 | delete this->Cert; 24 | delete ui; 25 | } 26 | 27 | void DialogX509v3Extention::on_pushButtonOKExtension_clicked() 28 | { 29 | QString extName=this->ui->comboBoxNameChooser->currentText(); 30 | QString value; 31 | QStringList valueList; 32 | int i,j; 33 | 34 | this->ui->comboBoxNameChooser->setEnabled(false); 35 | this->ui->pushButtonOKExtension->setEnabled(false); 36 | this->ui->checkBoxCritical->setEnabled(true); 37 | this->ui->comboBoxExtensionValue->setEnabled(true); 38 | this->ui->lineEditValue->setEnabled(true); 39 | this->ui->pushButtonAddValue->setEnabled(true); 40 | 41 | for (i=0; iCert->X509ExtensionHelpNum;i++) 42 | { 43 | if (extName == QString::fromStdString(this->Cert->X509ExtensionHelp[i].name)) 44 | { 45 | value=QString::fromStdString(this->Cert->X509ExtensionHelp[i].values); 46 | valueList=value.split(","); 47 | for (j=0; jcomboBoxExtensionValue->addItem(valueList.at(j),j); 50 | } 51 | break; 52 | } 53 | } 54 | extName += "="; 55 | this->ui->labelExtensionNameOutput->setText(extName); 56 | this->ui->pushButtonResetForm->setEnabled(true); 57 | this->ui->pushButtonAdd->setEnabled(true); 58 | } 59 | 60 | void DialogX509v3Extention::on_pushButtonAddValue_clicked() 61 | { 62 | QString value=this->ui->lineEditValue->text(); 63 | 64 | if (!value.isEmpty()) 65 | value +=","; 66 | value+=this->ui->comboBoxExtensionValue->currentText(); 67 | this->ui->lineEditValue->setText(value); 68 | } 69 | 70 | void DialogX509v3Extention::on_checkBoxCritical_clicked() 71 | { 72 | QString label=this->ui->comboBoxNameChooser->currentText(); 73 | label +="="; 74 | if (this->ui->checkBoxCritical->isChecked()) 75 | label += "critical,"; 76 | this->ui->labelExtensionNameOutput->setText(label); 77 | } 78 | 79 | void DialogX509v3Extention::reset_form() 80 | { 81 | while (this->ui->comboBoxExtensionValue->count() != 0) 82 | this->ui->comboBoxExtensionValue->removeItem(0); 83 | while (this->ui->comboBoxNameChooser->count() != 0) 84 | this->ui->comboBoxNameChooser->removeItem(0); 85 | for (int i=0; iCert->X509ExtensionHelpNum;i++) 86 | { 87 | ui->comboBoxNameChooser->addItem(QString::fromStdString(this->Cert->X509ExtensionHelp[i].name),i); 88 | } 89 | ui->checkBoxCritical->setEnabled(false); 90 | ui->comboBoxExtensionValue->setEnabled(false); 91 | ui->lineEditValue->setEnabled(false); 92 | ui->pushButtonAddValue->setEnabled(false); 93 | this->ui->comboBoxNameChooser->setEnabled(true); 94 | this->ui->pushButtonOKExtension->setEnabled(true); 95 | this->ui->checkBoxCritical->setChecked(false); 96 | this->ui->lineEditValue->setText(""); 97 | this->ui->pushButtonResetForm->setEnabled(false); 98 | this->ui->pushButtonAdd->setEnabled(false); 99 | this->ui->labelExtensionNameOutput->setText(tr("