├── img └── main.jpg ├── docs ├── img │ ├── 1-fullex.jpg │ ├── 3-fullex.jpg │ ├── 5-fullex.jpg │ ├── 7-fullex.jpg │ ├── 9-fullex.jpg │ ├── generate.png │ ├── 11-fullex.jpg │ ├── 12-fullex.jpg │ ├── 20-fullex.jpg │ ├── 22-fullex.jpg │ ├── 24-fullex.jpg │ ├── 30-fullex.jpg │ ├── 32-fullex.jpg │ ├── 34-fullex.jpg │ ├── 36-fullex.jpg │ └── 40-fullex.jpg ├── CONTRIBUTING.md ├── 01-installation.md ├── 80-compile.md ├── 02-maindoc.md └── 10-full-example-1.md ├── src ├── app │ ├── res │ │ └── lock.ico │ ├── ressources.qrc │ ├── main.cpp │ ├── dialogx509extensions.cpp │ ├── dialogsslerrors.cpp │ ├── dialogsslerrors.h │ ├── dialogx509extensions.h │ ├── dialoggeneratekey.h │ ├── dialogcertdate.h │ ├── dialoggeneratekey.cpp │ ├── dialogx509v3extention.h │ ├── cdialogpkcs12.h │ ├── dialogcertdate.cpp │ ├── stackwindow.h │ ├── dialoggeneratekey.ui │ ├── dialogx509extensions.ui │ ├── dialogsslerrors.ui │ ├── dialogcertdate.ui │ ├── stackwindow.ui │ └── dialogx509v3extention.cpp └── openssl │ ├── lib │ ├── libssl.exp │ ├── libssl.lib │ ├── libssl.res │ ├── libcrypto.exp │ ├── libcrypto.lib │ ├── libcrypto.res │ ├── libssl.rc │ └── libcrypto.rc │ └── include │ └── openssl │ ├── ecdh.h │ ├── ecdsa.h │ ├── asn1_mac.h │ ├── pem2.h │ ├── ssl2.h │ ├── __DECC_INCLUDE_EPILOGUE.H │ ├── __DECC_INCLUDE_PROLOGUE.H │ ├── buffererr.h │ ├── rc4.h │ ├── ebcdic.h │ ├── mdc2.h │ ├── cmac.h │ ├── md2.h │ ├── comperr.h │ ├── ripemd.h │ ├── symhacks.h │ ├── conf_api.h │ ├── objectserr.h │ ├── asyncerr.h │ ├── srtp.h │ ├── md5.h │ ├── md4.h │ ├── comp.h │ ├── whrlpool.h │ ├── rc2.h │ ├── hmac.h │ ├── dtls1.h │ ├── buffer.h │ ├── cast.h │ ├── txt_db.h │ ├── blowfish.h │ ├── rc5.h │ ├── kdferr.h │ ├── idea.h │ ├── cryptoerr.h │ ├── rand.h │ ├── async.h │ ├── uierr.h │ ├── dsaerr.h │ ├── stack.h │ ├── camellia.h │ ├── ocsperr.h │ ├── aes.h │ ├── conferr.h │ ├── cterr.h │ ├── seed.h │ ├── pkcs12err.h │ ├── dherr.h │ ├── applink.c │ ├── sha.h │ ├── srp.h │ ├── opensslv.h │ ├── kdf.h │ ├── storeerr.h │ ├── opensslconf.h.in │ ├── randerr.h │ ├── bnerr.h │ ├── rand_drbg.h │ ├── pemerr.h │ ├── pkcs7err.h │ ├── opensslconf.h │ └── engineerr.h ├── README.md └── YetAnotherOpensslGui.pro /img/main.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/img/main.jpg -------------------------------------------------------------------------------- /docs/img/1-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/1-fullex.jpg -------------------------------------------------------------------------------- /docs/img/3-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/3-fullex.jpg -------------------------------------------------------------------------------- /docs/img/5-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/5-fullex.jpg -------------------------------------------------------------------------------- /docs/img/7-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/7-fullex.jpg -------------------------------------------------------------------------------- /docs/img/9-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/9-fullex.jpg -------------------------------------------------------------------------------- /docs/img/generate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/generate.png -------------------------------------------------------------------------------- /src/app/res/lock.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/app/res/lock.ico -------------------------------------------------------------------------------- /docs/img/11-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/11-fullex.jpg -------------------------------------------------------------------------------- /docs/img/12-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/12-fullex.jpg -------------------------------------------------------------------------------- /docs/img/20-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/20-fullex.jpg -------------------------------------------------------------------------------- /docs/img/22-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/22-fullex.jpg -------------------------------------------------------------------------------- /docs/img/24-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/24-fullex.jpg -------------------------------------------------------------------------------- /docs/img/30-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/30-fullex.jpg -------------------------------------------------------------------------------- /docs/img/32-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/32-fullex.jpg -------------------------------------------------------------------------------- /docs/img/34-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/34-fullex.jpg -------------------------------------------------------------------------------- /docs/img/36-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/36-fullex.jpg -------------------------------------------------------------------------------- /docs/img/40-fullex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/docs/img/40-fullex.jpg -------------------------------------------------------------------------------- /src/openssl/lib/libssl.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/openssl/lib/libssl.exp -------------------------------------------------------------------------------- /src/openssl/lib/libssl.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/openssl/lib/libssl.lib -------------------------------------------------------------------------------- /src/openssl/lib/libssl.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/openssl/lib/libssl.res -------------------------------------------------------------------------------- /src/openssl/lib/libcrypto.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/openssl/lib/libcrypto.exp -------------------------------------------------------------------------------- /src/openssl/lib/libcrypto.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/openssl/lib/libcrypto.lib -------------------------------------------------------------------------------- /src/openssl/lib/libcrypto.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrickpr/YAOG/HEAD/src/openssl/lib/libcrypto.res -------------------------------------------------------------------------------- /src/app/ressources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | res/lock.ico 4 | 5 | 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/app/main.cpp: -------------------------------------------------------------------------------- 1 | #include "sslmainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 7 | QApplication a(argc, argv); 8 | SSLMainWindow w; 9 | w.show(); 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #error "This file is obsolete; please update your software." 11 | -------------------------------------------------------------------------------- /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/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/openssl/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_PEM2_H 11 | # define HEADER_PEM2_H 12 | # include 13 | #endif 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_SSL2_H 11 | # define HEADER_SSL2_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | # define SSL2_VERSION 0x0002 18 | 19 | # define SSL2_MT_CLIENT_HELLO 1 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /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/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/openssl/include/openssl/__DECC_INCLUDE_EPILOGUE.H: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * This file is only used by HP C/C++ on VMS, and is included automatically 12 | * after each header file from this directory 13 | */ 14 | 15 | /* 16 | * The C++ compiler doesn't understand these pragmas, even though it 17 | * understands the corresponding command line qualifier. 18 | */ 19 | #ifndef __cplusplus 20 | /* restore state. Must correspond to the save in __decc_include_prologue.h */ 21 | # pragma names restore 22 | #endif 23 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/__DECC_INCLUDE_PROLOGUE.H: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * This file is only used by HP C/C++ on VMS, and is included automatically 12 | * after each header file from this directory 13 | */ 14 | 15 | /* 16 | * The C++ compiler doesn't understand these pragmas, even though it 17 | * understands the corresponding command line qualifier. 18 | */ 19 | #ifndef __cplusplus 20 | /* save state */ 21 | # pragma names save 22 | /* have the compiler shorten symbols larger than 31 chars to 23 chars 23 | * followed by a 8 hex char CRC 24 | */ 25 | # pragma names as_is,shortened 26 | #endif 27 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/buffererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_BUFERR_H 12 | # define HEADER_BUFERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_BUF_strings(void); 22 | 23 | /* 24 | * BUF function codes. 25 | */ 26 | # define BUF_F_BUF_MEM_GROW 100 27 | # define BUF_F_BUF_MEM_GROW_CLEAN 105 28 | # define BUF_F_BUF_MEM_NEW 101 29 | 30 | /* 31 | * BUF reason codes. 32 | */ 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RC4_H 11 | # define HEADER_RC4_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_RC4 16 | # include 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | typedef struct rc4_key_st { 22 | RC4_INT x, y; 23 | RC4_INT data[256]; 24 | } RC4_KEY; 25 | 26 | const char *RC4_options(void); 27 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 28 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 29 | unsigned char *outdata); 30 | 31 | # ifdef __cplusplus 32 | } 33 | # endif 34 | # endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/app/dialogx509v3extention.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOGX509V3EXTENTION_H 2 | #define DIALOGX509V3EXTENTION_H 3 | 4 | #include 5 | #include 6 | #include "sslcertificates.h" 7 | 8 | namespace Ui { 9 | class DialogX509v3Extention; 10 | } 11 | 12 | class DialogX509v3Extention : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit DialogX509v3Extention(QWidget *parent = nullptr); 18 | ~DialogX509v3Extention(); 19 | 20 | private: 21 | SSLCertificates *Cert; //!< Used to get extensions 22 | private slots: 23 | void on_pushButtonOKExtension_clicked(); 24 | 25 | void on_pushButtonAddValue_clicked(); 26 | 27 | void on_checkBoxCritical_clicked(); 28 | 29 | void on_pushButtonAdd_clicked(); 30 | 31 | void on_pushButtonResetForm_clicked(); 32 | 33 | void on_buttonBox_accepted(); 34 | 35 | private: 36 | Ui::DialogX509v3Extention *ui; 37 | void reset_form(); 38 | 39 | signals: 40 | void add_extension(QString ext, QString value, bool critical); 41 | }; 42 | 43 | #endif // DIALOGX509V3EXTENTION_H 44 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_EBCDIC_H 11 | # define HEADER_EBCDIC_H 12 | 13 | # include 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /* Avoid name clashes with other applications */ 20 | # define os_toascii _openssl_os_toascii 21 | # define os_toebcdic _openssl_os_toebcdic 22 | # define ebcdic2ascii _openssl_ebcdic2ascii 23 | # define ascii2ebcdic _openssl_ascii2ebcdic 24 | 25 | extern const unsigned char os_toascii[256]; 26 | extern const unsigned char os_toebcdic[256]; 27 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 28 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | #endif 34 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MDC2_H 11 | # define HEADER_MDC2_H 12 | 13 | # include 14 | 15 | #ifndef OPENSSL_NO_MDC2 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # define MDC2_BLOCK 8 23 | # define MDC2_DIGEST_LENGTH 16 24 | 25 | typedef struct mdc2_ctx_st { 26 | unsigned int num; 27 | unsigned char data[MDC2_BLOCK]; 28 | DES_cblock h, hh; 29 | int pad_type; /* either 1 or 2, default 1 */ 30 | } MDC2_CTX; 31 | 32 | int MDC2_Init(MDC2_CTX *c); 33 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 34 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); 35 | unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); 36 | 37 | # ifdef __cplusplus 38 | } 39 | # endif 40 | # endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CMAC_H 11 | # define HEADER_CMAC_H 12 | 13 | # ifndef OPENSSL_NO_CMAC 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | # include 20 | 21 | /* Opaque */ 22 | typedef struct CMAC_CTX_st CMAC_CTX; 23 | 24 | CMAC_CTX *CMAC_CTX_new(void); 25 | void CMAC_CTX_cleanup(CMAC_CTX *ctx); 26 | void CMAC_CTX_free(CMAC_CTX *ctx); 27 | EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 28 | int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 29 | 30 | int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, 31 | const EVP_CIPHER *cipher, ENGINE *impl); 32 | int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); 33 | int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); 34 | int CMAC_resume(CMAC_CTX *ctx); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | # endif 41 | #endif 42 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/md2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MD2_H 11 | # define HEADER_MD2_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_MD2 16 | # include 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | typedef unsigned char MD2_INT; 22 | 23 | # define MD2_DIGEST_LENGTH 16 24 | # define MD2_BLOCK 16 25 | 26 | typedef struct MD2state_st { 27 | unsigned int num; 28 | unsigned char data[MD2_BLOCK]; 29 | MD2_INT cksm[MD2_BLOCK]; 30 | MD2_INT state[MD2_BLOCK]; 31 | } MD2_CTX; 32 | 33 | const char *MD2_options(void); 34 | int MD2_Init(MD2_CTX *c); 35 | int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 36 | int MD2_Final(unsigned char *md, MD2_CTX *c); 37 | unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md); 38 | 39 | # ifdef __cplusplus 40 | } 41 | # endif 42 | # endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/openssl/lib/libssl.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | LANGUAGE 0x09,0x01 4 | 5 | 1 VERSIONINFO 6 | FILEVERSION 1,1,1,7 7 | PRODUCTVERSION 1,1,1,7 8 | FILEFLAGSMASK 0x3fL 9 | #ifdef _DEBUG 10 | FILEFLAGS 0x01L 11 | #else 12 | FILEFLAGS 0x00L 13 | #endif 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE 0x0L 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904b0" 21 | BEGIN 22 | // Required: 23 | VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\0" 24 | VALUE "FileDescription", "OpenSSL library\0" 25 | VALUE "FileVersion", "1.1.1g\0" 26 | VALUE "InternalName", "libssl\0" 27 | VALUE "OriginalFilename", "libssl\0" 28 | VALUE "ProductName", "The OpenSSL Toolkit\0" 29 | VALUE "ProductVersion", "1.1.1g\0" 30 | // Optional: 31 | //VALUE "Comments", "\0" 32 | VALUE "LegalCopyright", "Copyright 1998-2020 The OpenSSL Authors. All rights reserved.\0" 33 | //VALUE "LegalTrademarks", "\0" 34 | //VALUE "PrivateBuild", "\0" 35 | //VALUE "SpecialBuild", "\0" 36 | END 37 | END 38 | BLOCK "VarFileInfo" 39 | BEGIN 40 | VALUE "Translation", 0x409, 0x4b0 41 | END 42 | END 43 | -------------------------------------------------------------------------------- /src/openssl/lib/libcrypto.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | LANGUAGE 0x09,0x01 4 | 5 | 1 VERSIONINFO 6 | FILEVERSION 1,1,1,7 7 | PRODUCTVERSION 1,1,1,7 8 | FILEFLAGSMASK 0x3fL 9 | #ifdef _DEBUG 10 | FILEFLAGS 0x01L 11 | #else 12 | FILEFLAGS 0x00L 13 | #endif 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE 0x0L 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | BLOCK "040904b0" 21 | BEGIN 22 | // Required: 23 | VALUE "CompanyName", "The OpenSSL Project, https://www.openssl.org/\0" 24 | VALUE "FileDescription", "OpenSSL library\0" 25 | VALUE "FileVersion", "1.1.1g\0" 26 | VALUE "InternalName", "libcrypto\0" 27 | VALUE "OriginalFilename", "libcrypto\0" 28 | VALUE "ProductName", "The OpenSSL Toolkit\0" 29 | VALUE "ProductVersion", "1.1.1g\0" 30 | // Optional: 31 | //VALUE "Comments", "\0" 32 | VALUE "LegalCopyright", "Copyright 1998-2020 The OpenSSL Authors. All rights reserved.\0" 33 | //VALUE "LegalTrademarks", "\0" 34 | //VALUE "PrivateBuild", "\0" 35 | //VALUE "SpecialBuild", "\0" 36 | END 37 | END 38 | BLOCK "VarFileInfo" 39 | BEGIN 40 | VALUE "Translation", 0x409, 0x4b0 41 | END 42 | END 43 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/comperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_COMPERR_H 12 | # define HEADER_COMPERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # include 19 | 20 | # ifndef OPENSSL_NO_COMP 21 | 22 | # ifdef __cplusplus 23 | extern "C" 24 | # endif 25 | int ERR_load_COMP_strings(void); 26 | 27 | /* 28 | * COMP function codes. 29 | */ 30 | # define COMP_F_BIO_ZLIB_FLUSH 99 31 | # define COMP_F_BIO_ZLIB_NEW 100 32 | # define COMP_F_BIO_ZLIB_READ 101 33 | # define COMP_F_BIO_ZLIB_WRITE 102 34 | # define COMP_F_COMP_CTX_NEW 103 35 | 36 | /* 37 | * COMP reason codes. 38 | */ 39 | # define COMP_R_ZLIB_DEFLATE_ERROR 99 40 | # define COMP_R_ZLIB_INFLATE_ERROR 100 41 | # define COMP_R_ZLIB_NOT_SUPPORTED 101 42 | 43 | # endif 44 | #endif 45 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RIPEMD_H 11 | # define HEADER_RIPEMD_H 12 | 13 | # include 14 | 15 | #ifndef OPENSSL_NO_RMD160 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # define RIPEMD160_LONG unsigned int 23 | 24 | # define RIPEMD160_CBLOCK 64 25 | # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 26 | # define RIPEMD160_DIGEST_LENGTH 20 27 | 28 | typedef struct RIPEMD160state_st { 29 | RIPEMD160_LONG A, B, C, D, E; 30 | RIPEMD160_LONG Nl, Nh; 31 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 32 | unsigned int num; 33 | } RIPEMD160_CTX; 34 | 35 | int RIPEMD160_Init(RIPEMD160_CTX *c); 36 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 37 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 38 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); 39 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 40 | 41 | # ifdef __cplusplus 42 | } 43 | # endif 44 | # endif 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/symhacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_SYMHACKS_H 11 | # define HEADER_SYMHACKS_H 12 | 13 | # include 14 | 15 | /* Case insensitive linking causes problems.... */ 16 | # if defined(OPENSSL_SYS_VMS) 17 | # undef ERR_load_CRYPTO_strings 18 | # define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings 19 | # undef OCSP_crlID_new 20 | # define OCSP_crlID_new OCSP_crlID2_new 21 | 22 | # undef d2i_ECPARAMETERS 23 | # define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS 24 | # undef i2d_ECPARAMETERS 25 | # define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS 26 | # undef d2i_ECPKPARAMETERS 27 | # define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS 28 | # undef i2d_ECPKPARAMETERS 29 | # define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS 30 | 31 | /* This one clashes with CMS_data_create */ 32 | # undef cms_Data_create 33 | # define cms_Data_create priv_cms_Data_create 34 | 35 | # endif 36 | 37 | #endif /* ! defined HEADER_VMS_IDHACKS_H */ 38 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CONF_API_H 11 | # define HEADER_CONF_API_H 12 | 13 | # include 14 | # include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /* Up until OpenSSL 0.9.5a, this was new_section */ 21 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 22 | /* Up until OpenSSL 0.9.5a, this was get_section */ 23 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 24 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 25 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 26 | const char *section); 27 | 28 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 29 | char *_CONF_get_string(const CONF *conf, const char *section, 30 | const char *name); 31 | long _CONF_get_number(const CONF *conf, const char *section, 32 | const char *name); 33 | 34 | int _CONF_new_data(CONF *conf); 35 | void _CONF_free_data(CONF *conf); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/objectserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_OBJERR_H 12 | # define HEADER_OBJERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_OBJ_strings(void); 22 | 23 | /* 24 | * OBJ function codes. 25 | */ 26 | # define OBJ_F_OBJ_ADD_OBJECT 105 27 | # define OBJ_F_OBJ_ADD_SIGID 107 28 | # define OBJ_F_OBJ_CREATE 100 29 | # define OBJ_F_OBJ_DUP 101 30 | # define OBJ_F_OBJ_NAME_NEW_INDEX 106 31 | # define OBJ_F_OBJ_NID2LN 102 32 | # define OBJ_F_OBJ_NID2OBJ 103 33 | # define OBJ_F_OBJ_NID2SN 104 34 | # define OBJ_F_OBJ_TXT2OBJ 108 35 | 36 | /* 37 | * OBJ reason codes. 38 | */ 39 | # define OBJ_R_OID_EXISTS 102 40 | # define OBJ_R_UNKNOWN_NID 101 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/asyncerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_ASYNCERR_H 12 | # define HEADER_ASYNCERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_ASYNC_strings(void); 22 | 23 | /* 24 | * ASYNC function codes. 25 | */ 26 | # define ASYNC_F_ASYNC_CTX_NEW 100 27 | # define ASYNC_F_ASYNC_INIT_THREAD 101 28 | # define ASYNC_F_ASYNC_JOB_NEW 102 29 | # define ASYNC_F_ASYNC_PAUSE_JOB 103 30 | # define ASYNC_F_ASYNC_START_FUNC 104 31 | # define ASYNC_F_ASYNC_START_JOB 105 32 | # define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106 33 | 34 | /* 35 | * ASYNC reason codes. 36 | */ 37 | # define ASYNC_R_FAILED_TO_SET_POOL 101 38 | # define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 39 | # define ASYNC_R_INIT_FAILED 105 40 | # define ASYNC_R_INVALID_POOL_SIZE 103 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * DTLS code by Eric Rescorla 12 | * 13 | * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. 14 | */ 15 | 16 | #ifndef HEADER_D1_SRTP_H 17 | # define HEADER_D1_SRTP_H 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | # define SRTP_AES128_CM_SHA1_80 0x0001 26 | # define SRTP_AES128_CM_SHA1_32 0x0002 27 | # define SRTP_AES128_F8_SHA1_80 0x0003 28 | # define SRTP_AES128_F8_SHA1_32 0x0004 29 | # define SRTP_NULL_SHA1_80 0x0005 30 | # define SRTP_NULL_SHA1_32 0x0006 31 | 32 | /* AEAD SRTP protection profiles from RFC 7714 */ 33 | # define SRTP_AEAD_AES_128_GCM 0x0007 34 | # define SRTP_AEAD_AES_256_GCM 0x0008 35 | 36 | # ifndef OPENSSL_NO_SRTP 37 | 38 | __owur int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); 39 | __owur int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); 40 | 41 | __owur STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); 42 | __owur SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 43 | 44 | # endif 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MD5_H 11 | # define HEADER_MD5_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_MD5 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | /* 23 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24 | * ! MD5_LONG has to be at least 32 bits wide. ! 25 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 | */ 27 | # define MD5_LONG unsigned int 28 | 29 | # define MD5_CBLOCK 64 30 | # define MD5_LBLOCK (MD5_CBLOCK/4) 31 | # define MD5_DIGEST_LENGTH 16 32 | 33 | typedef struct MD5state_st { 34 | MD5_LONG A, B, C, D; 35 | MD5_LONG Nl, Nh; 36 | MD5_LONG data[MD5_LBLOCK]; 37 | unsigned int num; 38 | } MD5_CTX; 39 | 40 | int MD5_Init(MD5_CTX *c); 41 | int MD5_Update(MD5_CTX *c, const void *data, size_t len); 42 | int MD5_Final(unsigned char *md, MD5_CTX *c); 43 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); 44 | void MD5_Transform(MD5_CTX *c, const unsigned char *b); 45 | # ifdef __cplusplus 46 | } 47 | # endif 48 | # endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_MD4_H 11 | # define HEADER_MD4_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_MD4 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | /*- 23 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24 | * ! MD4_LONG has to be at least 32 bits wide. ! 25 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 | */ 27 | # define MD4_LONG unsigned int 28 | 29 | # define MD4_CBLOCK 64 30 | # define MD4_LBLOCK (MD4_CBLOCK/4) 31 | # define MD4_DIGEST_LENGTH 16 32 | 33 | typedef struct MD4state_st { 34 | MD4_LONG A, B, C, D; 35 | MD4_LONG Nl, Nh; 36 | MD4_LONG data[MD4_LBLOCK]; 37 | unsigned int num; 38 | } MD4_CTX; 39 | 40 | int MD4_Init(MD4_CTX *c); 41 | int MD4_Update(MD4_CTX *c, const void *data, size_t len); 42 | int MD4_Final(unsigned char *md, MD4_CTX *c); 43 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 44 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); 45 | 46 | # ifdef __cplusplus 47 | } 48 | # endif 49 | # endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_COMP_H 11 | # define HEADER_COMP_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_COMP 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | 23 | 24 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 25 | const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); 26 | int COMP_CTX_get_type(const COMP_CTX* comp); 27 | int COMP_get_type(const COMP_METHOD *meth); 28 | const char *COMP_get_name(const COMP_METHOD *meth); 29 | void COMP_CTX_free(COMP_CTX *ctx); 30 | 31 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 32 | unsigned char *in, int ilen); 33 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 34 | unsigned char *in, int ilen); 35 | 36 | COMP_METHOD *COMP_zlib(void); 37 | 38 | #if OPENSSL_API_COMPAT < 0x10100000L 39 | #define COMP_zlib_cleanup() while(0) continue 40 | #endif 41 | 42 | # ifdef HEADER_BIO_H 43 | # ifdef ZLIB 44 | const BIO_METHOD *BIO_f_zlib(void); 45 | # endif 46 | # endif 47 | 48 | 49 | # ifdef __cplusplus 50 | } 51 | # endif 52 | # endif 53 | #endif 54 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_WHRLPOOL_H 11 | # define HEADER_WHRLPOOL_H 12 | 13 | #include 14 | 15 | # ifndef OPENSSL_NO_WHIRLPOOL 16 | # include 17 | # include 18 | # ifdef __cplusplus 19 | extern "C" { 20 | # endif 21 | 22 | # define WHIRLPOOL_DIGEST_LENGTH (512/8) 23 | # define WHIRLPOOL_BBLOCK 512 24 | # define WHIRLPOOL_COUNTER (256/8) 25 | 26 | typedef struct { 27 | union { 28 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 29 | /* double q is here to ensure 64-bit alignment */ 30 | double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; 31 | } H; 32 | unsigned char data[WHIRLPOOL_BBLOCK / 8]; 33 | unsigned int bitoff; 34 | size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; 35 | } WHIRLPOOL_CTX; 36 | 37 | int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 38 | int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); 39 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); 40 | int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 41 | unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); 42 | 43 | # ifdef __cplusplus 44 | } 45 | # endif 46 | # endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RC2_H 11 | # define HEADER_RC2_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_RC2 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | typedef unsigned int RC2_INT; 21 | 22 | # define RC2_ENCRYPT 1 23 | # define RC2_DECRYPT 0 24 | 25 | # define RC2_BLOCK 8 26 | # define RC2_KEY_LENGTH 16 27 | 28 | typedef struct rc2_key_st { 29 | RC2_INT data[64]; 30 | } RC2_KEY; 31 | 32 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); 33 | void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, 34 | RC2_KEY *key, int enc); 35 | void RC2_encrypt(unsigned long *data, RC2_KEY *key); 36 | void RC2_decrypt(unsigned long *data, RC2_KEY *key); 37 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 38 | RC2_KEY *ks, unsigned char *iv, int enc); 39 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 40 | long length, RC2_KEY *schedule, unsigned char *ivec, 41 | int *num, int enc); 42 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 43 | long length, RC2_KEY *schedule, unsigned char *ivec, 44 | int *num); 45 | 46 | # ifdef __cplusplus 47 | } 48 | # endif 49 | # endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_HMAC_H 11 | # define HEADER_HMAC_H 12 | 13 | # include 14 | 15 | # include 16 | 17 | # if OPENSSL_API_COMPAT < 0x10200000L 18 | # define HMAC_MAX_MD_CBLOCK 128 /* Deprecated */ 19 | # endif 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | size_t HMAC_size(const HMAC_CTX *e); 26 | HMAC_CTX *HMAC_CTX_new(void); 27 | int HMAC_CTX_reset(HMAC_CTX *ctx); 28 | void HMAC_CTX_free(HMAC_CTX *ctx); 29 | 30 | DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 31 | const EVP_MD *md)) 32 | 33 | /*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 34 | const EVP_MD *md, ENGINE *impl); 35 | /*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, 36 | size_t len); 37 | /*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, 38 | unsigned int *len); 39 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 40 | const unsigned char *d, size_t n, unsigned char *md, 41 | unsigned int *md_len); 42 | __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 43 | 44 | void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 45 | const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_DTLS1_H 11 | # define HEADER_DTLS1_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | # define DTLS1_VERSION 0xFEFF 18 | # define DTLS1_2_VERSION 0xFEFD 19 | # define DTLS_MIN_VERSION DTLS1_VERSION 20 | # define DTLS_MAX_VERSION DTLS1_2_VERSION 21 | # define DTLS1_VERSION_MAJOR 0xFE 22 | 23 | # define DTLS1_BAD_VER 0x0100 24 | 25 | /* Special value for method supporting multiple versions */ 26 | # define DTLS_ANY_VERSION 0x1FFFF 27 | 28 | /* lengths of messages */ 29 | /* 30 | * Actually the max cookie length in DTLS is 255. But we can't change this now 31 | * due to compatibility concerns. 32 | */ 33 | # define DTLS1_COOKIE_LENGTH 256 34 | 35 | # define DTLS1_RT_HEADER_LENGTH 13 36 | 37 | # define DTLS1_HM_HEADER_LENGTH 12 38 | 39 | # define DTLS1_HM_BAD_FRAGMENT -2 40 | # define DTLS1_HM_FRAGMENT_RETRY -3 41 | 42 | # define DTLS1_CCS_HEADER_LENGTH 1 43 | 44 | # define DTLS1_AL_HEADER_LENGTH 2 45 | 46 | /* Timeout multipliers */ 47 | # define DTLS1_TMO_READ_COUNT 2 48 | # define DTLS1_TMO_WRITE_COUNT 2 49 | 50 | # define DTLS1_TMO_ALERT_COUNT 12 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | #endif 56 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_BUFFER_H 11 | # define HEADER_BUFFER_H 12 | 13 | # include 14 | # ifndef HEADER_CRYPTO_H 15 | # include 16 | # endif 17 | # include 18 | 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | # include 25 | # include 26 | 27 | /* 28 | * These names are outdated as of OpenSSL 1.1; a future release 29 | * will move them to be deprecated. 30 | */ 31 | # define BUF_strdup(s) OPENSSL_strdup(s) 32 | # define BUF_strndup(s, size) OPENSSL_strndup(s, size) 33 | # define BUF_memdup(data, size) OPENSSL_memdup(data, size) 34 | # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) 35 | # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) 36 | # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) 37 | 38 | struct buf_mem_st { 39 | size_t length; /* current number of bytes */ 40 | char *data; 41 | size_t max; /* size of buffer */ 42 | unsigned long flags; 43 | }; 44 | 45 | # define BUF_MEM_FLAG_SECURE 0x01 46 | 47 | BUF_MEM *BUF_MEM_new(void); 48 | BUF_MEM *BUF_MEM_new_ex(unsigned long flags); 49 | void BUF_MEM_free(BUF_MEM *a); 50 | size_t BUF_MEM_grow(BUF_MEM *str, size_t len); 51 | size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 52 | void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); 53 | 54 | 55 | # ifdef __cplusplus 56 | } 57 | # endif 58 | #endif 59 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CAST_H 11 | # define HEADER_CAST_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_CAST 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | # define CAST_ENCRYPT 1 21 | # define CAST_DECRYPT 0 22 | 23 | # define CAST_LONG unsigned int 24 | 25 | # define CAST_BLOCK 8 26 | # define CAST_KEY_LENGTH 16 27 | 28 | typedef struct cast_key_st { 29 | CAST_LONG data[32]; 30 | int short_key; /* Use reduced rounds for short key */ 31 | } CAST_KEY; 32 | 33 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 34 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, 35 | const CAST_KEY *key, int enc); 36 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 37 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 38 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, 39 | long length, const CAST_KEY *ks, unsigned char *iv, 40 | int enc); 41 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 42 | long length, const CAST_KEY *schedule, 43 | unsigned char *ivec, int *num, int enc); 44 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 45 | long length, const CAST_KEY *schedule, 46 | unsigned char *ivec, int *num); 47 | 48 | # ifdef __cplusplus 49 | } 50 | # endif 51 | # endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_TXT_DB_H 11 | # define HEADER_TXT_DB_H 12 | 13 | # include 14 | # include 15 | # include 16 | # include 17 | 18 | # define DB_ERROR_OK 0 19 | # define DB_ERROR_MALLOC 1 20 | # define DB_ERROR_INDEX_CLASH 2 21 | # define DB_ERROR_INDEX_OUT_OF_RANGE 3 22 | # define DB_ERROR_NO_INDEX 4 23 | # define DB_ERROR_INSERT_INDEX_CLASH 5 24 | # define DB_ERROR_WRONG_NUM_FIELDS 6 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 31 | DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 32 | 33 | typedef struct txt_db_st { 34 | int num_fields; 35 | STACK_OF(OPENSSL_PSTRING) *data; 36 | LHASH_OF(OPENSSL_STRING) **index; 37 | int (**qual) (OPENSSL_STRING *); 38 | long error; 39 | long arg1; 40 | long arg2; 41 | OPENSSL_STRING *arg_row; 42 | } TXT_DB; 43 | 44 | TXT_DB *TXT_DB_read(BIO *in, int num); 45 | long TXT_DB_write(BIO *out, TXT_DB *db); 46 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), 47 | OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); 48 | void TXT_DB_free(TXT_DB *db); 49 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, 50 | OPENSSL_STRING *value); 51 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/app/stackwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef STACKWINDOW_H 2 | #define STACKWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "sslcertificates.h" 8 | 9 | namespace Ui { 10 | class CStackWindow; 11 | } 12 | 13 | class CStackWindow : public QDialog 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit CStackWindow(QWidget *parent = nullptr); 19 | ~CStackWindow(); 20 | 21 | enum certType {nocert=-1,certificate=0,csr=1}; 22 | //enum keyType { nokey=-1,rsa=KeyRSA, dsa=KeyDSA , ec=KeyEC }; 23 | QString keyName[10]; 24 | struct CertData { 25 | QString key; //!< PEM format 26 | SSLCertificates::keyTypes key_type; 27 | QString key_param; //!< Size for RSA/DSA, type of EC 28 | QString certificate;//!< PEM format 29 | certType cert_type; 30 | QString name; 31 | }; 32 | int push_cert(CertData *cert); 33 | 34 | void show(); 35 | 36 | CertData getSigningCert(); 37 | 38 | void pkcs12Selection(bool isOn); 39 | 40 | private slots: 41 | void on_pushButtonHide_clicked(); 42 | 43 | void on_pushButtonPurge_clicked(); 44 | 45 | void on_pushButtonDelete_clicked(); 46 | 47 | void on_pushButtonPop_clicked(); 48 | 49 | void on_pushButtonSelectSign_clicked(); 50 | 51 | void on_pushButtonSelectForP12_clicked(); 52 | 53 | void on_CStackWindow_rejected(); 54 | 55 | protected slots: 56 | void select_cert(); 57 | 58 | private: 59 | void stack_empty(bool empty);//!< disable or enable buttons when stack is empty or not 60 | void update_list(); 61 | 62 | bool p12SelectMode; 63 | CertData signing_cert; 64 | 65 | QWidget * mainWindow; 66 | QPoint windowsPosition; 67 | bool windowsPositionSet; 68 | Ui::CStackWindow *ui; 69 | 70 | QList stack; 71 | 72 | signals: 73 | void pop_certificate(CStackWindow::CertData certificate); 74 | void p12_import(CStackWindow::CertData certificate); 75 | }; 76 | 77 | #endif // STACKWINDOW_H 78 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_BLOWFISH_H 11 | # define HEADER_BLOWFISH_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_BF 16 | # include 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | # define BF_ENCRYPT 1 22 | # define BF_DECRYPT 0 23 | 24 | /*- 25 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 | * ! BF_LONG has to be at least 32 bits wide. ! 27 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28 | */ 29 | # define BF_LONG unsigned int 30 | 31 | # define BF_ROUNDS 16 32 | # define BF_BLOCK 8 33 | 34 | typedef struct bf_key_st { 35 | BF_LONG P[BF_ROUNDS + 2]; 36 | BF_LONG S[4 * 256]; 37 | } BF_KEY; 38 | 39 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 40 | 41 | void BF_encrypt(BF_LONG *data, const BF_KEY *key); 42 | void BF_decrypt(BF_LONG *data, const BF_KEY *key); 43 | 44 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 45 | const BF_KEY *key, int enc); 46 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 47 | const BF_KEY *schedule, unsigned char *ivec, int enc); 48 | void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, 49 | long length, const BF_KEY *schedule, 50 | unsigned char *ivec, int *num, int enc); 51 | void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, 52 | long length, const BF_KEY *schedule, 53 | unsigned char *ivec, int *num); 54 | const char *BF_options(void); 55 | 56 | # ifdef __cplusplus 57 | } 58 | # endif 59 | # endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/rc5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RC5_H 11 | # define HEADER_RC5_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_RC5 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | # define RC5_ENCRYPT 1 21 | # define RC5_DECRYPT 0 22 | 23 | # define RC5_32_INT unsigned int 24 | 25 | # define RC5_32_BLOCK 8 26 | # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ 27 | 28 | /* 29 | * This are the only values supported. Tweak the code if you want more The 30 | * most supported modes will be RC5-32/12/16 RC5-32/16/8 31 | */ 32 | # define RC5_8_ROUNDS 8 33 | # define RC5_12_ROUNDS 12 34 | # define RC5_16_ROUNDS 16 35 | 36 | typedef struct rc5_key_st { 37 | /* Number of rounds */ 38 | int rounds; 39 | RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; 40 | } RC5_32_KEY; 41 | 42 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, 43 | int rounds); 44 | void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out, 45 | RC5_32_KEY *key, int enc); 46 | void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); 47 | void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); 48 | void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, 49 | long length, RC5_32_KEY *ks, unsigned char *iv, 50 | int enc); 51 | void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, 52 | long length, RC5_32_KEY *schedule, 53 | unsigned char *ivec, int *num, int enc); 54 | void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, 55 | long length, RC5_32_KEY *schedule, 56 | unsigned char *ivec, int *num); 57 | 58 | # ifdef __cplusplus 59 | } 60 | # endif 61 | # endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/kdferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_KDFERR_H 12 | # define HEADER_KDFERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_KDF_strings(void); 22 | 23 | /* 24 | * KDF function codes. 25 | */ 26 | # define KDF_F_PKEY_HKDF_CTRL_STR 103 27 | # define KDF_F_PKEY_HKDF_DERIVE 102 28 | # define KDF_F_PKEY_HKDF_INIT 108 29 | # define KDF_F_PKEY_SCRYPT_CTRL_STR 104 30 | # define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 31 | # define KDF_F_PKEY_SCRYPT_DERIVE 109 32 | # define KDF_F_PKEY_SCRYPT_INIT 106 33 | # define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 34 | # define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 35 | # define KDF_F_PKEY_TLS1_PRF_DERIVE 101 36 | # define KDF_F_PKEY_TLS1_PRF_INIT 110 37 | # define KDF_F_TLS1_PRF_ALG 111 38 | 39 | /* 40 | * KDF reason codes. 41 | */ 42 | # define KDF_R_INVALID_DIGEST 100 43 | # define KDF_R_MISSING_ITERATION_COUNT 109 44 | # define KDF_R_MISSING_KEY 104 45 | # define KDF_R_MISSING_MESSAGE_DIGEST 105 46 | # define KDF_R_MISSING_PARAMETER 101 47 | # define KDF_R_MISSING_PASS 110 48 | # define KDF_R_MISSING_SALT 111 49 | # define KDF_R_MISSING_SECRET 107 50 | # define KDF_R_MISSING_SEED 106 51 | # define KDF_R_UNKNOWN_PARAMETER_TYPE 103 52 | # define KDF_R_VALUE_ERROR 108 53 | # define KDF_R_VALUE_MISSING 102 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_IDEA_H 11 | # define HEADER_IDEA_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_IDEA 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | typedef unsigned int IDEA_INT; 21 | 22 | # define IDEA_ENCRYPT 1 23 | # define IDEA_DECRYPT 0 24 | 25 | # define IDEA_BLOCK 8 26 | # define IDEA_KEY_LENGTH 16 27 | 28 | typedef struct idea_key_st { 29 | IDEA_INT data[9][6]; 30 | } IDEA_KEY_SCHEDULE; 31 | 32 | const char *IDEA_options(void); 33 | void IDEA_ecb_encrypt(const unsigned char *in, unsigned char *out, 34 | IDEA_KEY_SCHEDULE *ks); 35 | void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 36 | void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 37 | void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out, 38 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 39 | int enc); 40 | void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, 41 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 42 | int *num, int enc); 43 | void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out, 44 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 45 | int *num); 46 | void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 47 | 48 | # if OPENSSL_API_COMPAT < 0x10100000L 49 | # define idea_options IDEA_options 50 | # define idea_ecb_encrypt IDEA_ecb_encrypt 51 | # define idea_set_encrypt_key IDEA_set_encrypt_key 52 | # define idea_set_decrypt_key IDEA_set_decrypt_key 53 | # define idea_cbc_encrypt IDEA_cbc_encrypt 54 | # define idea_cfb64_encrypt IDEA_cfb64_encrypt 55 | # define idea_ofb64_encrypt IDEA_ofb64_encrypt 56 | # define idea_encrypt IDEA_encrypt 57 | # endif 58 | 59 | # ifdef __cplusplus 60 | } 61 | # endif 62 | # endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/cryptoerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_CRYPTOERR_H 12 | # define HEADER_CRYPTOERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_CRYPTO_strings(void); 22 | 23 | /* 24 | * CRYPTO function codes. 25 | */ 26 | # define CRYPTO_F_CMAC_CTX_NEW 120 27 | # define CRYPTO_F_CRYPTO_DUP_EX_DATA 110 28 | # define CRYPTO_F_CRYPTO_FREE_EX_DATA 111 29 | # define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 30 | # define CRYPTO_F_CRYPTO_MEMDUP 115 31 | # define CRYPTO_F_CRYPTO_NEW_EX_DATA 112 32 | # define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 121 33 | # define CRYPTO_F_CRYPTO_OCB128_INIT 122 34 | # define CRYPTO_F_CRYPTO_SET_EX_DATA 102 35 | # define CRYPTO_F_FIPS_MODE_SET 109 36 | # define CRYPTO_F_GET_AND_LOCK 113 37 | # define CRYPTO_F_OPENSSL_ATEXIT 114 38 | # define CRYPTO_F_OPENSSL_BUF2HEXSTR 117 39 | # define CRYPTO_F_OPENSSL_FOPEN 119 40 | # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 41 | # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 42 | # define CRYPTO_F_OPENSSL_LH_NEW 126 43 | # define CRYPTO_F_OPENSSL_SK_DEEP_COPY 127 44 | # define CRYPTO_F_OPENSSL_SK_DUP 128 45 | # define CRYPTO_F_PKEY_HMAC_INIT 123 46 | # define CRYPTO_F_PKEY_POLY1305_INIT 124 47 | # define CRYPTO_F_PKEY_SIPHASH_INIT 125 48 | # define CRYPTO_F_SK_RESERVE 129 49 | 50 | /* 51 | * CRYPTO reason codes. 52 | */ 53 | # define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 54 | # define CRYPTO_R_ILLEGAL_HEX_DIGIT 102 55 | # define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_RAND_H 11 | # define HEADER_RAND_H 12 | 13 | # include 14 | # include 15 | # include 16 | # include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | struct rand_meth_st { 23 | int (*seed) (const void *buf, int num); 24 | int (*bytes) (unsigned char *buf, int num); 25 | void (*cleanup) (void); 26 | int (*add) (const void *buf, int num, double randomness); 27 | int (*pseudorand) (unsigned char *buf, int num); 28 | int (*status) (void); 29 | }; 30 | 31 | int RAND_set_rand_method(const RAND_METHOD *meth); 32 | const RAND_METHOD *RAND_get_rand_method(void); 33 | # ifndef OPENSSL_NO_ENGINE 34 | int RAND_set_rand_engine(ENGINE *engine); 35 | # endif 36 | 37 | RAND_METHOD *RAND_OpenSSL(void); 38 | 39 | # if OPENSSL_API_COMPAT < 0x10100000L 40 | # define RAND_cleanup() while(0) continue 41 | # endif 42 | int RAND_bytes(unsigned char *buf, int num); 43 | int RAND_priv_bytes(unsigned char *buf, int num); 44 | DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num)) 45 | 46 | void RAND_seed(const void *buf, int num); 47 | void RAND_keep_random_devices_open(int keep); 48 | 49 | # if defined(__ANDROID__) && defined(__NDK_FPABI__) 50 | __NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */ 51 | # endif 52 | void RAND_add(const void *buf, int num, double randomness); 53 | int RAND_load_file(const char *file, long max_bytes); 54 | int RAND_write_file(const char *file); 55 | const char *RAND_file_name(char *file, size_t num); 56 | int RAND_status(void); 57 | 58 | # ifndef OPENSSL_NO_EGD 59 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); 60 | int RAND_egd(const char *path); 61 | int RAND_egd_bytes(const char *path, int bytes); 62 | # endif 63 | 64 | int RAND_poll(void); 65 | 66 | # if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H)) 67 | /* application has to include in order to use these */ 68 | DEPRECATEDIN_1_1_0(void RAND_screen(void)) 69 | DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM)) 70 | # endif 71 | 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/async.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | 12 | #ifndef HEADER_ASYNC_H 13 | # define HEADER_ASYNC_H 14 | 15 | #if defined(_WIN32) 16 | # if defined(BASETYPES) || defined(_WINDEF_H) 17 | /* application has to include to use this */ 18 | #define OSSL_ASYNC_FD HANDLE 19 | #define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE 20 | # endif 21 | #else 22 | #define OSSL_ASYNC_FD int 23 | #define OSSL_BAD_ASYNC_FD -1 24 | #endif 25 | # include 26 | 27 | 28 | # ifdef __cplusplus 29 | extern "C" { 30 | # endif 31 | 32 | typedef struct async_job_st ASYNC_JOB; 33 | typedef struct async_wait_ctx_st ASYNC_WAIT_CTX; 34 | 35 | #define ASYNC_ERR 0 36 | #define ASYNC_NO_JOBS 1 37 | #define ASYNC_PAUSE 2 38 | #define ASYNC_FINISH 3 39 | 40 | int ASYNC_init_thread(size_t max_size, size_t init_size); 41 | void ASYNC_cleanup_thread(void); 42 | 43 | #ifdef OSSL_ASYNC_FD 44 | ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void); 45 | void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx); 46 | int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key, 47 | OSSL_ASYNC_FD fd, 48 | void *custom_data, 49 | void (*cleanup)(ASYNC_WAIT_CTX *, const void *, 50 | OSSL_ASYNC_FD, void *)); 51 | int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key, 52 | OSSL_ASYNC_FD *fd, void **custom_data); 53 | int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, 54 | size_t *numfds); 55 | int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd, 56 | size_t *numaddfds, OSSL_ASYNC_FD *delfd, 57 | size_t *numdelfds); 58 | int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key); 59 | #endif 60 | 61 | int ASYNC_is_capable(void); 62 | 63 | int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret, 64 | int (*func)(void *), void *args, size_t size); 65 | int ASYNC_pause_job(void); 66 | 67 | ASYNC_JOB *ASYNC_get_current_job(void); 68 | ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job); 69 | void ASYNC_block_pause(void); 70 | void ASYNC_unblock_pause(void); 71 | 72 | 73 | # ifdef __cplusplus 74 | } 75 | # endif 76 | #endif 77 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/uierr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_UIERR_H 12 | # define HEADER_UIERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_UI_strings(void); 22 | 23 | /* 24 | * UI function codes. 25 | */ 26 | # define UI_F_CLOSE_CONSOLE 115 27 | # define UI_F_ECHO_CONSOLE 116 28 | # define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 29 | # define UI_F_GENERAL_ALLOCATE_PROMPT 109 30 | # define UI_F_NOECHO_CONSOLE 117 31 | # define UI_F_OPEN_CONSOLE 114 32 | # define UI_F_UI_CONSTRUCT_PROMPT 121 33 | # define UI_F_UI_CREATE_METHOD 112 34 | # define UI_F_UI_CTRL 111 35 | # define UI_F_UI_DUP_ERROR_STRING 101 36 | # define UI_F_UI_DUP_INFO_STRING 102 37 | # define UI_F_UI_DUP_INPUT_BOOLEAN 110 38 | # define UI_F_UI_DUP_INPUT_STRING 103 39 | # define UI_F_UI_DUP_USER_DATA 118 40 | # define UI_F_UI_DUP_VERIFY_STRING 106 41 | # define UI_F_UI_GET0_RESULT 107 42 | # define UI_F_UI_GET_RESULT_LENGTH 119 43 | # define UI_F_UI_NEW_METHOD 104 44 | # define UI_F_UI_PROCESS 113 45 | # define UI_F_UI_SET_RESULT 105 46 | # define UI_F_UI_SET_RESULT_EX 120 47 | 48 | /* 49 | * UI reason codes. 50 | */ 51 | # define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 52 | # define UI_R_INDEX_TOO_LARGE 102 53 | # define UI_R_INDEX_TOO_SMALL 103 54 | # define UI_R_NO_RESULT_BUFFER 105 55 | # define UI_R_PROCESSING_ERROR 107 56 | # define UI_R_RESULT_TOO_LARGE 100 57 | # define UI_R_RESULT_TOO_SMALL 101 58 | # define UI_R_SYSASSIGN_ERROR 109 59 | # define UI_R_SYSDASSGN_ERROR 110 60 | # define UI_R_SYSQIOW_ERROR 111 61 | # define UI_R_UNKNOWN_CONTROL_COMMAND 106 62 | # define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 63 | # define UI_R_USER_DATA_DUPLICATION_UNSUPPORTED 112 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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/openssl/include/openssl/dsaerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_DSAERR_H 12 | # define HEADER_DSAERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # include 19 | 20 | # ifndef OPENSSL_NO_DSA 21 | 22 | # ifdef __cplusplus 23 | extern "C" 24 | # endif 25 | int ERR_load_DSA_strings(void); 26 | 27 | /* 28 | * DSA function codes. 29 | */ 30 | # define DSA_F_DSAPARAMS_PRINT 100 31 | # define DSA_F_DSAPARAMS_PRINT_FP 101 32 | # define DSA_F_DSA_BUILTIN_PARAMGEN 125 33 | # define DSA_F_DSA_BUILTIN_PARAMGEN2 126 34 | # define DSA_F_DSA_DO_SIGN 112 35 | # define DSA_F_DSA_DO_VERIFY 113 36 | # define DSA_F_DSA_METH_DUP 127 37 | # define DSA_F_DSA_METH_NEW 128 38 | # define DSA_F_DSA_METH_SET1_NAME 129 39 | # define DSA_F_DSA_NEW_METHOD 103 40 | # define DSA_F_DSA_PARAM_DECODE 119 41 | # define DSA_F_DSA_PRINT_FP 105 42 | # define DSA_F_DSA_PRIV_DECODE 115 43 | # define DSA_F_DSA_PRIV_ENCODE 116 44 | # define DSA_F_DSA_PUB_DECODE 117 45 | # define DSA_F_DSA_PUB_ENCODE 118 46 | # define DSA_F_DSA_SIGN 106 47 | # define DSA_F_DSA_SIGN_SETUP 107 48 | # define DSA_F_DSA_SIG_NEW 102 49 | # define DSA_F_OLD_DSA_PRIV_DECODE 122 50 | # define DSA_F_PKEY_DSA_CTRL 120 51 | # define DSA_F_PKEY_DSA_CTRL_STR 104 52 | # define DSA_F_PKEY_DSA_KEYGEN 121 53 | 54 | /* 55 | * DSA reason codes. 56 | */ 57 | # define DSA_R_BAD_Q_VALUE 102 58 | # define DSA_R_BN_DECODE_ERROR 108 59 | # define DSA_R_BN_ERROR 109 60 | # define DSA_R_DECODE_ERROR 104 61 | # define DSA_R_INVALID_DIGEST_TYPE 106 62 | # define DSA_R_INVALID_PARAMETERS 112 63 | # define DSA_R_MISSING_PARAMETERS 101 64 | # define DSA_R_MISSING_PRIVATE_KEY 111 65 | # define DSA_R_MODULUS_TOO_LARGE 103 66 | # define DSA_R_NO_PARAMETERS_SET 107 67 | # define DSA_R_PARAMETER_ENCODING_ERROR 105 68 | # define DSA_R_Q_NOT_PRIME 113 69 | # define DSA_R_SEED_LEN_SMALL 110 70 | 71 | # endif 72 | #endif 73 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_STACK_H 11 | # define HEADER_STACK_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | typedef struct stack_st OPENSSL_STACK; /* Use STACK_OF(...) instead */ 18 | 19 | typedef int (*OPENSSL_sk_compfunc)(const void *, const void *); 20 | typedef void (*OPENSSL_sk_freefunc)(void *); 21 | typedef void *(*OPENSSL_sk_copyfunc)(const void *); 22 | 23 | int OPENSSL_sk_num(const OPENSSL_STACK *); 24 | void *OPENSSL_sk_value(const OPENSSL_STACK *, int); 25 | 26 | void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data); 27 | 28 | OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp); 29 | OPENSSL_STACK *OPENSSL_sk_new_null(void); 30 | OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n); 31 | int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n); 32 | void OPENSSL_sk_free(OPENSSL_STACK *); 33 | void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *)); 34 | OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *, 35 | OPENSSL_sk_copyfunc c, 36 | OPENSSL_sk_freefunc f); 37 | int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where); 38 | void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc); 39 | void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p); 40 | int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data); 41 | int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data); 42 | int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data); 43 | int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data); 44 | void *OPENSSL_sk_shift(OPENSSL_STACK *st); 45 | void *OPENSSL_sk_pop(OPENSSL_STACK *st); 46 | void OPENSSL_sk_zero(OPENSSL_STACK *st); 47 | OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk, 48 | OPENSSL_sk_compfunc cmp); 49 | OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st); 50 | void OPENSSL_sk_sort(OPENSSL_STACK *st); 51 | int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st); 52 | 53 | # if OPENSSL_API_COMPAT < 0x10100000L 54 | # define _STACK OPENSSL_STACK 55 | # define sk_num OPENSSL_sk_num 56 | # define sk_value OPENSSL_sk_value 57 | # define sk_set OPENSSL_sk_set 58 | # define sk_new OPENSSL_sk_new 59 | # define sk_new_null OPENSSL_sk_new_null 60 | # define sk_free OPENSSL_sk_free 61 | # define sk_pop_free OPENSSL_sk_pop_free 62 | # define sk_deep_copy OPENSSL_sk_deep_copy 63 | # define sk_insert OPENSSL_sk_insert 64 | # define sk_delete OPENSSL_sk_delete 65 | # define sk_delete_ptr OPENSSL_sk_delete_ptr 66 | # define sk_find OPENSSL_sk_find 67 | # define sk_find_ex OPENSSL_sk_find_ex 68 | # define sk_push OPENSSL_sk_push 69 | # define sk_unshift OPENSSL_sk_unshift 70 | # define sk_shift OPENSSL_sk_shift 71 | # define sk_pop OPENSSL_sk_pop 72 | # define sk_zero OPENSSL_sk_zero 73 | # define sk_set_cmp_func OPENSSL_sk_set_cmp_func 74 | # define sk_dup OPENSSL_sk_dup 75 | # define sk_sort OPENSSL_sk_sort 76 | # define sk_is_sorted OPENSSL_sk_is_sorted 77 | # endif 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_CAMELLIA_H 11 | # define HEADER_CAMELLIA_H 12 | 13 | # include 14 | 15 | # ifndef OPENSSL_NO_CAMELLIA 16 | # include 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | # define CAMELLIA_ENCRYPT 1 22 | # define CAMELLIA_DECRYPT 0 23 | 24 | /* 25 | * Because array size can't be a const in C, the following two are macros. 26 | * Both sizes are in bytes. 27 | */ 28 | 29 | /* This should be a hidden type, but EVP requires that the size be known */ 30 | 31 | # define CAMELLIA_BLOCK_SIZE 16 32 | # define CAMELLIA_TABLE_BYTE_LEN 272 33 | # define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 34 | 35 | typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match 36 | * with WORD */ 37 | 38 | struct camellia_key_st { 39 | union { 40 | double d; /* ensures 64-bit align */ 41 | KEY_TABLE_TYPE rd_key; 42 | } u; 43 | int grand_rounds; 44 | }; 45 | typedef struct camellia_key_st CAMELLIA_KEY; 46 | 47 | int Camellia_set_key(const unsigned char *userKey, const int bits, 48 | CAMELLIA_KEY *key); 49 | 50 | void Camellia_encrypt(const unsigned char *in, unsigned char *out, 51 | const CAMELLIA_KEY *key); 52 | void Camellia_decrypt(const unsigned char *in, unsigned char *out, 53 | const CAMELLIA_KEY *key); 54 | 55 | void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, 56 | const CAMELLIA_KEY *key, const int enc); 57 | void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, 58 | size_t length, const CAMELLIA_KEY *key, 59 | unsigned char *ivec, const int enc); 60 | void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, 61 | size_t length, const CAMELLIA_KEY *key, 62 | unsigned char *ivec, int *num, const int enc); 63 | void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, 64 | size_t length, const CAMELLIA_KEY *key, 65 | unsigned char *ivec, int *num, const int enc); 66 | void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, 67 | size_t length, const CAMELLIA_KEY *key, 68 | unsigned char *ivec, int *num, const int enc); 69 | void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, 70 | size_t length, const CAMELLIA_KEY *key, 71 | unsigned char *ivec, int *num); 72 | void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, 73 | size_t length, const CAMELLIA_KEY *key, 74 | unsigned char ivec[CAMELLIA_BLOCK_SIZE], 75 | unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], 76 | unsigned int *num); 77 | 78 | # ifdef __cplusplus 79 | } 80 | # endif 81 | # endif 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/ocsperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_OCSPERR_H 12 | # define HEADER_OCSPERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # include 19 | 20 | # ifndef OPENSSL_NO_OCSP 21 | 22 | # ifdef __cplusplus 23 | extern "C" 24 | # endif 25 | int ERR_load_OCSP_strings(void); 26 | 27 | /* 28 | * OCSP function codes. 29 | */ 30 | # define OCSP_F_D2I_OCSP_NONCE 102 31 | # define OCSP_F_OCSP_BASIC_ADD1_STATUS 103 32 | # define OCSP_F_OCSP_BASIC_SIGN 104 33 | # define OCSP_F_OCSP_BASIC_SIGN_CTX 119 34 | # define OCSP_F_OCSP_BASIC_VERIFY 105 35 | # define OCSP_F_OCSP_CERT_ID_NEW 101 36 | # define OCSP_F_OCSP_CHECK_DELEGATED 106 37 | # define OCSP_F_OCSP_CHECK_IDS 107 38 | # define OCSP_F_OCSP_CHECK_ISSUER 108 39 | # define OCSP_F_OCSP_CHECK_VALIDITY 115 40 | # define OCSP_F_OCSP_MATCH_ISSUERID 109 41 | # define OCSP_F_OCSP_PARSE_URL 114 42 | # define OCSP_F_OCSP_REQUEST_SIGN 110 43 | # define OCSP_F_OCSP_REQUEST_VERIFY 116 44 | # define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111 45 | # define OCSP_F_PARSE_HTTP_LINE1 118 46 | 47 | /* 48 | * OCSP reason codes. 49 | */ 50 | # define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 51 | # define OCSP_R_DIGEST_ERR 102 52 | # define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 53 | # define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 54 | # define OCSP_R_ERROR_PARSING_URL 121 55 | # define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 56 | # define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 57 | # define OCSP_R_NOT_BASIC_RESPONSE 104 58 | # define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 59 | # define OCSP_R_NO_RESPONSE_DATA 108 60 | # define OCSP_R_NO_REVOKED_TIME 109 61 | # define OCSP_R_NO_SIGNER_KEY 130 62 | # define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 63 | # define OCSP_R_REQUEST_NOT_SIGNED 128 64 | # define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 65 | # define OCSP_R_ROOT_CA_NOT_TRUSTED 112 66 | # define OCSP_R_SERVER_RESPONSE_ERROR 114 67 | # define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 115 68 | # define OCSP_R_SIGNATURE_FAILURE 117 69 | # define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 70 | # define OCSP_R_STATUS_EXPIRED 125 71 | # define OCSP_R_STATUS_NOT_YET_VALID 126 72 | # define OCSP_R_STATUS_TOO_OLD 127 73 | # define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 74 | # define OCSP_R_UNKNOWN_NID 120 75 | # define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 76 | 77 | # endif 78 | #endif 79 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_AES_H 11 | # define HEADER_AES_H 12 | 13 | # include 14 | 15 | # include 16 | # ifdef __cplusplus 17 | extern "C" { 18 | # endif 19 | 20 | # define AES_ENCRYPT 1 21 | # define AES_DECRYPT 0 22 | 23 | /* 24 | * Because array size can't be a const in C, the following two are macros. 25 | * Both sizes are in bytes. 26 | */ 27 | # define AES_MAXNR 14 28 | # define AES_BLOCK_SIZE 16 29 | 30 | /* This should be a hidden type, but EVP requires that the size be known */ 31 | struct aes_key_st { 32 | # ifdef AES_LONG 33 | unsigned long rd_key[4 * (AES_MAXNR + 1)]; 34 | # else 35 | unsigned int rd_key[4 * (AES_MAXNR + 1)]; 36 | # endif 37 | int rounds; 38 | }; 39 | typedef struct aes_key_st AES_KEY; 40 | 41 | const char *AES_options(void); 42 | 43 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 44 | AES_KEY *key); 45 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 46 | AES_KEY *key); 47 | 48 | void AES_encrypt(const unsigned char *in, unsigned char *out, 49 | const AES_KEY *key); 50 | void AES_decrypt(const unsigned char *in, unsigned char *out, 51 | const AES_KEY *key); 52 | 53 | void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, 54 | const AES_KEY *key, const int enc); 55 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 56 | size_t length, const AES_KEY *key, 57 | unsigned char *ivec, const int enc); 58 | void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, 59 | size_t length, const AES_KEY *key, 60 | unsigned char *ivec, int *num, const int enc); 61 | void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, 62 | size_t length, const AES_KEY *key, 63 | unsigned char *ivec, int *num, const int enc); 64 | void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, 65 | size_t length, const AES_KEY *key, 66 | unsigned char *ivec, int *num, const int enc); 67 | void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, 68 | size_t length, const AES_KEY *key, 69 | unsigned char *ivec, int *num); 70 | /* NB: the IV is _two_ blocks long */ 71 | void AES_ige_encrypt(const unsigned char *in, unsigned char *out, 72 | size_t length, const AES_KEY *key, 73 | unsigned char *ivec, const int enc); 74 | /* NB: the IV is _four_ blocks long */ 75 | void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, 76 | size_t length, const AES_KEY *key, 77 | const AES_KEY *key2, const unsigned char *ivec, 78 | const int enc); 79 | 80 | int AES_wrap_key(AES_KEY *key, const unsigned char *iv, 81 | unsigned char *out, 82 | const unsigned char *in, unsigned int inlen); 83 | int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, 84 | unsigned char *out, 85 | const unsigned char *in, unsigned int inlen); 86 | 87 | 88 | # ifdef __cplusplus 89 | } 90 | # endif 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/conferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_CONFERR_H 12 | # define HEADER_CONFERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_CONF_strings(void); 22 | 23 | /* 24 | * CONF function codes. 25 | */ 26 | # define CONF_F_CONF_DUMP_FP 104 27 | # define CONF_F_CONF_LOAD 100 28 | # define CONF_F_CONF_LOAD_FP 103 29 | # define CONF_F_CONF_PARSE_LIST 119 30 | # define CONF_F_DEF_LOAD 120 31 | # define CONF_F_DEF_LOAD_BIO 121 32 | # define CONF_F_GET_NEXT_FILE 107 33 | # define CONF_F_MODULE_ADD 122 34 | # define CONF_F_MODULE_INIT 115 35 | # define CONF_F_MODULE_LOAD_DSO 117 36 | # define CONF_F_MODULE_RUN 118 37 | # define CONF_F_NCONF_DUMP_BIO 105 38 | # define CONF_F_NCONF_DUMP_FP 106 39 | # define CONF_F_NCONF_GET_NUMBER_E 112 40 | # define CONF_F_NCONF_GET_SECTION 108 41 | # define CONF_F_NCONF_GET_STRING 109 42 | # define CONF_F_NCONF_LOAD 113 43 | # define CONF_F_NCONF_LOAD_BIO 110 44 | # define CONF_F_NCONF_LOAD_FP 114 45 | # define CONF_F_NCONF_NEW 111 46 | # define CONF_F_PROCESS_INCLUDE 116 47 | # define CONF_F_SSL_MODULE_INIT 123 48 | # define CONF_F_STR_COPY 101 49 | 50 | /* 51 | * CONF reason codes. 52 | */ 53 | # define CONF_R_ERROR_LOADING_DSO 110 54 | # define CONF_R_LIST_CANNOT_BE_NULL 115 55 | # define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 56 | # define CONF_R_MISSING_EQUAL_SIGN 101 57 | # define CONF_R_MISSING_INIT_FUNCTION 112 58 | # define CONF_R_MODULE_INITIALIZATION_ERROR 109 59 | # define CONF_R_NO_CLOSE_BRACE 102 60 | # define CONF_R_NO_CONF 105 61 | # define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 62 | # define CONF_R_NO_SECTION 107 63 | # define CONF_R_NO_SUCH_FILE 114 64 | # define CONF_R_NO_VALUE 108 65 | # define CONF_R_NUMBER_TOO_LARGE 121 66 | # define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111 67 | # define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 68 | # define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 69 | # define CONF_R_SSL_SECTION_EMPTY 119 70 | # define CONF_R_SSL_SECTION_NOT_FOUND 120 71 | # define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 72 | # define CONF_R_UNKNOWN_MODULE_NAME 113 73 | # define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116 74 | # define CONF_R_VARIABLE_HAS_NO_VALUE 104 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/cterr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_CTERR_H 12 | # define HEADER_CTERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # include 19 | 20 | # ifndef OPENSSL_NO_CT 21 | 22 | # ifdef __cplusplus 23 | extern "C" 24 | # endif 25 | int ERR_load_CT_strings(void); 26 | 27 | /* 28 | * CT function codes. 29 | */ 30 | # define CT_F_CTLOG_NEW 117 31 | # define CT_F_CTLOG_NEW_FROM_BASE64 118 32 | # define CT_F_CTLOG_NEW_FROM_CONF 119 33 | # define CT_F_CTLOG_STORE_LOAD_CTX_NEW 122 34 | # define CT_F_CTLOG_STORE_LOAD_FILE 123 35 | # define CT_F_CTLOG_STORE_LOAD_LOG 130 36 | # define CT_F_CTLOG_STORE_NEW 131 37 | # define CT_F_CT_BASE64_DECODE 124 38 | # define CT_F_CT_POLICY_EVAL_CTX_NEW 133 39 | # define CT_F_CT_V1_LOG_ID_FROM_PKEY 125 40 | # define CT_F_I2O_SCT 107 41 | # define CT_F_I2O_SCT_LIST 108 42 | # define CT_F_I2O_SCT_SIGNATURE 109 43 | # define CT_F_O2I_SCT 110 44 | # define CT_F_O2I_SCT_LIST 111 45 | # define CT_F_O2I_SCT_SIGNATURE 112 46 | # define CT_F_SCT_CTX_NEW 126 47 | # define CT_F_SCT_CTX_VERIFY 128 48 | # define CT_F_SCT_NEW 100 49 | # define CT_F_SCT_NEW_FROM_BASE64 127 50 | # define CT_F_SCT_SET0_LOG_ID 101 51 | # define CT_F_SCT_SET1_EXTENSIONS 114 52 | # define CT_F_SCT_SET1_LOG_ID 115 53 | # define CT_F_SCT_SET1_SIGNATURE 116 54 | # define CT_F_SCT_SET_LOG_ENTRY_TYPE 102 55 | # define CT_F_SCT_SET_SIGNATURE_NID 103 56 | # define CT_F_SCT_SET_VERSION 104 57 | 58 | /* 59 | * CT reason codes. 60 | */ 61 | # define CT_R_BASE64_DECODE_ERROR 108 62 | # define CT_R_INVALID_LOG_ID_LENGTH 100 63 | # define CT_R_LOG_CONF_INVALID 109 64 | # define CT_R_LOG_CONF_INVALID_KEY 110 65 | # define CT_R_LOG_CONF_MISSING_DESCRIPTION 111 66 | # define CT_R_LOG_CONF_MISSING_KEY 112 67 | # define CT_R_LOG_KEY_INVALID 113 68 | # define CT_R_SCT_FUTURE_TIMESTAMP 116 69 | # define CT_R_SCT_INVALID 104 70 | # define CT_R_SCT_INVALID_SIGNATURE 107 71 | # define CT_R_SCT_LIST_INVALID 105 72 | # define CT_R_SCT_LOG_ID_MISMATCH 114 73 | # define CT_R_SCT_NOT_SET 106 74 | # define CT_R_SCT_UNSUPPORTED_VERSION 115 75 | # define CT_R_UNRECOGNIZED_SIGNATURE_NID 101 76 | # define CT_R_UNSUPPORTED_ENTRY_TYPE 102 77 | # define CT_R_UNSUPPORTED_VERSION 103 78 | 79 | # endif 80 | #endif 81 | -------------------------------------------------------------------------------- /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/openssl/include/openssl/seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. 12 | * 13 | * Redistribution and use in source and binary forms, with or without 14 | * modification, are permitted provided that the following conditions 15 | * are met: 16 | * 1. Redistributions of source code must retain the above copyright 17 | * notice, this list of conditions and the following disclaimer. 18 | * 2. Neither the name of author nor the names of its contributors may 19 | * be used to endorse or promote products derived from this software 20 | * without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 23 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | * SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef HEADER_SEED_H 36 | # define HEADER_SEED_H 37 | 38 | # include 39 | 40 | # ifndef OPENSSL_NO_SEED 41 | # include 42 | # include 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | /* look whether we need 'long' to get 32 bits */ 49 | # ifdef AES_LONG 50 | # ifndef SEED_LONG 51 | # define SEED_LONG 1 52 | # endif 53 | # endif 54 | 55 | # include 56 | 57 | # define SEED_BLOCK_SIZE 16 58 | # define SEED_KEY_LENGTH 16 59 | 60 | typedef struct seed_key_st { 61 | # ifdef SEED_LONG 62 | unsigned long data[32]; 63 | # else 64 | unsigned int data[32]; 65 | # endif 66 | } SEED_KEY_SCHEDULE; 67 | 68 | void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], 69 | SEED_KEY_SCHEDULE *ks); 70 | 71 | void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], 72 | unsigned char d[SEED_BLOCK_SIZE], 73 | const SEED_KEY_SCHEDULE *ks); 74 | void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], 75 | unsigned char d[SEED_BLOCK_SIZE], 76 | const SEED_KEY_SCHEDULE *ks); 77 | 78 | void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, 79 | const SEED_KEY_SCHEDULE *ks, int enc); 80 | void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, 81 | const SEED_KEY_SCHEDULE *ks, 82 | unsigned char ivec[SEED_BLOCK_SIZE], int enc); 83 | void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, 84 | size_t len, const SEED_KEY_SCHEDULE *ks, 85 | unsigned char ivec[SEED_BLOCK_SIZE], int *num, 86 | int enc); 87 | void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, 88 | size_t len, const SEED_KEY_SCHEDULE *ks, 89 | unsigned char ivec[SEED_BLOCK_SIZE], int *num); 90 | 91 | # ifdef __cplusplus 92 | } 93 | # endif 94 | # endif 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /src/app/stackwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CStackWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 360 10 | 327 11 | 12 | 13 | 14 | Stack 15 | 16 | 17 | 18 | 19 | 10 20 | 60 21 | 241 22 | 261 23 | 24 | 25 | 26 | 27 | 28 | false 29 | 30 | 31 | 32 | 260 33 | 110 34 | 91 35 | 23 36 | 37 | 38 | 39 | Pop selected 40 | 41 | 42 | 43 | 44 | false 45 | 46 | 47 | 48 | 260 49 | 140 50 | 91 51 | 23 52 | 53 | 54 | 55 | Delete selected 56 | 57 | 58 | 59 | 60 | 61 | 260 62 | 300 63 | 91 64 | 23 65 | 66 | 67 | 68 | Hide 69 | 70 | 71 | 72 | 73 | false 74 | 75 | 76 | 77 | 260 78 | 270 79 | 91 80 | 23 81 | 82 | 83 | 84 | Purge all 85 | 86 | 87 | 88 | 89 | false 90 | 91 | 92 | 93 | 260 94 | 60 95 | 91 96 | 23 97 | 98 | 99 | 100 | Sel for signing 101 | 102 | 103 | 104 | 105 | 106 | 10 107 | 20 108 | 101 109 | 16 110 | 111 | 112 | 113 | Signing Certificate : 114 | 115 | 116 | 117 | 118 | 119 | 120 120 | 20 121 | 231 122 | 16 123 | 124 | 125 | 126 | <none> 127 | 128 | 129 | 130 | 131 | 132 | 260 133 | 190 134 | 91 135 | 23 136 | 137 | 138 | 139 | Sel for P12 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/pkcs12err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_PKCS12ERR_H 12 | # define HEADER_PKCS12ERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # ifdef __cplusplus 19 | extern "C" 20 | # endif 21 | int ERR_load_PKCS12_strings(void); 22 | 23 | /* 24 | * PKCS12 function codes. 25 | */ 26 | # define PKCS12_F_OPENSSL_ASC2UNI 121 27 | # define PKCS12_F_OPENSSL_UNI2ASC 124 28 | # define PKCS12_F_OPENSSL_UNI2UTF8 127 29 | # define PKCS12_F_OPENSSL_UTF82UNI 129 30 | # define PKCS12_F_PKCS12_CREATE 105 31 | # define PKCS12_F_PKCS12_GEN_MAC 107 32 | # define PKCS12_F_PKCS12_INIT 109 33 | # define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 106 34 | # define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 108 35 | # define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 117 36 | # define PKCS12_F_PKCS12_KEY_GEN_ASC 110 37 | # define PKCS12_F_PKCS12_KEY_GEN_UNI 111 38 | # define PKCS12_F_PKCS12_KEY_GEN_UTF8 116 39 | # define PKCS12_F_PKCS12_NEWPASS 128 40 | # define PKCS12_F_PKCS12_PACK_P7DATA 114 41 | # define PKCS12_F_PKCS12_PACK_P7ENCDATA 115 42 | # define PKCS12_F_PKCS12_PARSE 118 43 | # define PKCS12_F_PKCS12_PBE_CRYPT 119 44 | # define PKCS12_F_PKCS12_PBE_KEYIVGEN 120 45 | # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_P8INF 112 46 | # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8 113 47 | # define PKCS12_F_PKCS12_SAFEBAG_CREATE_PKCS8_ENCRYPT 133 48 | # define PKCS12_F_PKCS12_SETUP_MAC 122 49 | # define PKCS12_F_PKCS12_SET_MAC 123 50 | # define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 130 51 | # define PKCS12_F_PKCS12_UNPACK_P7DATA 131 52 | # define PKCS12_F_PKCS12_VERIFY_MAC 126 53 | # define PKCS12_F_PKCS8_ENCRYPT 125 54 | # define PKCS12_F_PKCS8_SET0_PBE 132 55 | 56 | /* 57 | * PKCS12 reason codes. 58 | */ 59 | # define PKCS12_R_CANT_PACK_STRUCTURE 100 60 | # define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 61 | # define PKCS12_R_DECODE_ERROR 101 62 | # define PKCS12_R_ENCODE_ERROR 102 63 | # define PKCS12_R_ENCRYPT_ERROR 103 64 | # define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 65 | # define PKCS12_R_INVALID_NULL_ARGUMENT 104 66 | # define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 67 | # define PKCS12_R_IV_GEN_ERROR 106 68 | # define PKCS12_R_KEY_GEN_ERROR 107 69 | # define PKCS12_R_MAC_ABSENT 108 70 | # define PKCS12_R_MAC_GENERATION_ERROR 109 71 | # define PKCS12_R_MAC_SETUP_ERROR 110 72 | # define PKCS12_R_MAC_STRING_SET_ERROR 111 73 | # define PKCS12_R_MAC_VERIFY_FAILURE 113 74 | # define PKCS12_R_PARSE_ERROR 114 75 | # define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR 115 76 | # define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 77 | # define PKCS12_R_PKCS12_PBE_CRYPT_ERROR 117 78 | # define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 79 | # define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/dherr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef HEADER_DHERR_H 12 | # define HEADER_DHERR_H 13 | 14 | # ifndef HEADER_SYMHACKS_H 15 | # include 16 | # endif 17 | 18 | # include 19 | 20 | # ifndef OPENSSL_NO_DH 21 | 22 | # ifdef __cplusplus 23 | extern "C" 24 | # endif 25 | int ERR_load_DH_strings(void); 26 | 27 | /* 28 | * DH function codes. 29 | */ 30 | # define DH_F_COMPUTE_KEY 102 31 | # define DH_F_DHPARAMS_PRINT_FP 101 32 | # define DH_F_DH_BUILTIN_GENPARAMS 106 33 | # define DH_F_DH_CHECK_EX 121 34 | # define DH_F_DH_CHECK_PARAMS_EX 122 35 | # define DH_F_DH_CHECK_PUB_KEY_EX 123 36 | # define DH_F_DH_CMS_DECRYPT 114 37 | # define DH_F_DH_CMS_SET_PEERKEY 115 38 | # define DH_F_DH_CMS_SET_SHARED_INFO 116 39 | # define DH_F_DH_METH_DUP 117 40 | # define DH_F_DH_METH_NEW 118 41 | # define DH_F_DH_METH_SET1_NAME 119 42 | # define DH_F_DH_NEW_BY_NID 104 43 | # define DH_F_DH_NEW_METHOD 105 44 | # define DH_F_DH_PARAM_DECODE 107 45 | # define DH_F_DH_PKEY_PUBLIC_CHECK 124 46 | # define DH_F_DH_PRIV_DECODE 110 47 | # define DH_F_DH_PRIV_ENCODE 111 48 | # define DH_F_DH_PUB_DECODE 108 49 | # define DH_F_DH_PUB_ENCODE 109 50 | # define DH_F_DO_DH_PRINT 100 51 | # define DH_F_GENERATE_KEY 103 52 | # define DH_F_PKEY_DH_CTRL_STR 120 53 | # define DH_F_PKEY_DH_DERIVE 112 54 | # define DH_F_PKEY_DH_INIT 125 55 | # define DH_F_PKEY_DH_KEYGEN 113 56 | 57 | /* 58 | * DH reason codes. 59 | */ 60 | # define DH_R_BAD_GENERATOR 101 61 | # define DH_R_BN_DECODE_ERROR 109 62 | # define DH_R_BN_ERROR 106 63 | # define DH_R_CHECK_INVALID_J_VALUE 115 64 | # define DH_R_CHECK_INVALID_Q_VALUE 116 65 | # define DH_R_CHECK_PUBKEY_INVALID 122 66 | # define DH_R_CHECK_PUBKEY_TOO_LARGE 123 67 | # define DH_R_CHECK_PUBKEY_TOO_SMALL 124 68 | # define DH_R_CHECK_P_NOT_PRIME 117 69 | # define DH_R_CHECK_P_NOT_SAFE_PRIME 118 70 | # define DH_R_CHECK_Q_NOT_PRIME 119 71 | # define DH_R_DECODE_ERROR 104 72 | # define DH_R_INVALID_PARAMETER_NAME 110 73 | # define DH_R_INVALID_PARAMETER_NID 114 74 | # define DH_R_INVALID_PUBKEY 102 75 | # define DH_R_KDF_PARAMETER_ERROR 112 76 | # define DH_R_KEYS_NOT_SET 108 77 | # define DH_R_MISSING_PUBKEY 125 78 | # define DH_R_MODULUS_TOO_LARGE 103 79 | # define DH_R_NOT_SUITABLE_GENERATOR 120 80 | # define DH_R_NO_PARAMETERS_SET 107 81 | # define DH_R_NO_PRIVATE_VALUE 100 82 | # define DH_R_PARAMETER_ENCODING_ERROR 105 83 | # define DH_R_PEER_KEY_ERROR 111 84 | # define DH_R_SHARED_INFO_ERROR 113 85 | # define DH_R_UNABLE_TO_CHECK_GENERATOR 121 86 | 87 | # endif 88 | #endif 89 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/applink.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #define APPLINK_STDIN 1 11 | #define APPLINK_STDOUT 2 12 | #define APPLINK_STDERR 3 13 | #define APPLINK_FPRINTF 4 14 | #define APPLINK_FGETS 5 15 | #define APPLINK_FREAD 6 16 | #define APPLINK_FWRITE 7 17 | #define APPLINK_FSETMOD 8 18 | #define APPLINK_FEOF 9 19 | #define APPLINK_FCLOSE 10 /* should not be used */ 20 | 21 | #define APPLINK_FOPEN 11 /* solely for completeness */ 22 | #define APPLINK_FSEEK 12 23 | #define APPLINK_FTELL 13 24 | #define APPLINK_FFLUSH 14 25 | #define APPLINK_FERROR 15 26 | #define APPLINK_CLEARERR 16 27 | #define APPLINK_FILENO 17 /* to be used with below */ 28 | 29 | #define APPLINK_OPEN 18 /* formally can't be used, as flags can vary */ 30 | #define APPLINK_READ 19 31 | #define APPLINK_WRITE 20 32 | #define APPLINK_LSEEK 21 33 | #define APPLINK_CLOSE 22 34 | #define APPLINK_MAX 22 /* always same as last macro */ 35 | 36 | #ifndef APPMACROS_ONLY 37 | # include 38 | # include 39 | # include 40 | 41 | static void *app_stdin(void) 42 | { 43 | return stdin; 44 | } 45 | 46 | static void *app_stdout(void) 47 | { 48 | return stdout; 49 | } 50 | 51 | static void *app_stderr(void) 52 | { 53 | return stderr; 54 | } 55 | 56 | static int app_feof(FILE *fp) 57 | { 58 | return feof(fp); 59 | } 60 | 61 | static int app_ferror(FILE *fp) 62 | { 63 | return ferror(fp); 64 | } 65 | 66 | static void app_clearerr(FILE *fp) 67 | { 68 | clearerr(fp); 69 | } 70 | 71 | static int app_fileno(FILE *fp) 72 | { 73 | return _fileno(fp); 74 | } 75 | 76 | static int app_fsetmod(FILE *fp, char mod) 77 | { 78 | return _setmode(_fileno(fp), mod == 'b' ? _O_BINARY : _O_TEXT); 79 | } 80 | 81 | #ifdef __cplusplus 82 | extern "C" { 83 | #endif 84 | 85 | __declspec(dllexport) 86 | void ** 87 | # if defined(__BORLANDC__) 88 | /* 89 | * __stdcall appears to be the only way to get the name 90 | * decoration right with Borland C. Otherwise it works 91 | * purely incidentally, as we pass no parameters. 92 | */ 93 | __stdcall 94 | # else 95 | __cdecl 96 | # endif 97 | OPENSSL_Applink(void) 98 | { 99 | static int once = 1; 100 | static void *OPENSSL_ApplinkTable[APPLINK_MAX + 1] = 101 | { (void *)APPLINK_MAX }; 102 | 103 | if (once) { 104 | OPENSSL_ApplinkTable[APPLINK_STDIN] = (void*) app_stdin; 105 | OPENSSL_ApplinkTable[APPLINK_STDOUT] = (void*) app_stdout; 106 | OPENSSL_ApplinkTable[APPLINK_STDERR] = (void*) app_stderr; 107 | OPENSSL_ApplinkTable[APPLINK_FPRINTF] = (void*) fprintf; 108 | OPENSSL_ApplinkTable[APPLINK_FGETS] = (void*) fgets; 109 | OPENSSL_ApplinkTable[APPLINK_FREAD] = (void*) fread; 110 | OPENSSL_ApplinkTable[APPLINK_FWRITE] = (void*) fwrite; 111 | OPENSSL_ApplinkTable[APPLINK_FSETMOD] = (void*) app_fsetmod; 112 | OPENSSL_ApplinkTable[APPLINK_FEOF] = (void*) app_feof; 113 | OPENSSL_ApplinkTable[APPLINK_FCLOSE] = (void*) fclose; 114 | 115 | OPENSSL_ApplinkTable[APPLINK_FOPEN] = (void*) fopen; 116 | OPENSSL_ApplinkTable[APPLINK_FSEEK] = (void*) fseek; 117 | OPENSSL_ApplinkTable[APPLINK_FTELL] = (void*) ftell; 118 | OPENSSL_ApplinkTable[APPLINK_FFLUSH] = (void*) fflush; 119 | OPENSSL_ApplinkTable[APPLINK_FERROR] = (void*) app_ferror; 120 | OPENSSL_ApplinkTable[APPLINK_CLEARERR] = (void*) app_clearerr; 121 | OPENSSL_ApplinkTable[APPLINK_FILENO] = (void*) app_fileno; 122 | 123 | OPENSSL_ApplinkTable[APPLINK_OPEN] = (void*) _open; 124 | OPENSSL_ApplinkTable[APPLINK_READ] = (void*) _read; 125 | OPENSSL_ApplinkTable[APPLINK_WRITE] = (void*) _write; 126 | OPENSSL_ApplinkTable[APPLINK_LSEEK] = (void*) _lseek; 127 | OPENSSL_ApplinkTable[APPLINK_CLOSE] = (void*) _close; 128 | 129 | once = 0; 130 | } 131 | 132 | return OPENSSL_ApplinkTable; 133 | } 134 | 135 | #ifdef __cplusplus 136 | } 137 | #endif 138 | #endif 139 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_SHA_H 11 | # define HEADER_SHA_H 12 | 13 | # include 14 | # include 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /*- 21 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 22 | * ! SHA_LONG has to be at least 32 bits wide. ! 23 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24 | */ 25 | # define SHA_LONG unsigned int 26 | 27 | # define SHA_LBLOCK 16 28 | # define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a 29 | * contiguous array of 32 bit wide 30 | * big-endian values. */ 31 | # define SHA_LAST_BLOCK (SHA_CBLOCK-8) 32 | # define SHA_DIGEST_LENGTH 20 33 | 34 | typedef struct SHAstate_st { 35 | SHA_LONG h0, h1, h2, h3, h4; 36 | SHA_LONG Nl, Nh; 37 | SHA_LONG data[SHA_LBLOCK]; 38 | unsigned int num; 39 | } SHA_CTX; 40 | 41 | int SHA1_Init(SHA_CTX *c); 42 | int SHA1_Update(SHA_CTX *c, const void *data, size_t len); 43 | int SHA1_Final(unsigned char *md, SHA_CTX *c); 44 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); 45 | void SHA1_Transform(SHA_CTX *c, const unsigned char *data); 46 | 47 | # define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a 48 | * contiguous array of 32 bit wide 49 | * big-endian values. */ 50 | 51 | typedef struct SHA256state_st { 52 | SHA_LONG h[8]; 53 | SHA_LONG Nl, Nh; 54 | SHA_LONG data[SHA_LBLOCK]; 55 | unsigned int num, md_len; 56 | } SHA256_CTX; 57 | 58 | int SHA224_Init(SHA256_CTX *c); 59 | int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); 60 | int SHA224_Final(unsigned char *md, SHA256_CTX *c); 61 | unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); 62 | int SHA256_Init(SHA256_CTX *c); 63 | int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); 64 | int SHA256_Final(unsigned char *md, SHA256_CTX *c); 65 | unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); 66 | void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); 67 | 68 | # define SHA224_DIGEST_LENGTH 28 69 | # define SHA256_DIGEST_LENGTH 32 70 | # define SHA384_DIGEST_LENGTH 48 71 | # define SHA512_DIGEST_LENGTH 64 72 | 73 | /* 74 | * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 75 | * being exactly 64-bit wide. See Implementation Notes in sha512.c 76 | * for further details. 77 | */ 78 | /* 79 | * SHA-512 treats input data as a 80 | * contiguous array of 64 bit 81 | * wide big-endian values. 82 | */ 83 | # define SHA512_CBLOCK (SHA_LBLOCK*8) 84 | # if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) 85 | # define SHA_LONG64 unsigned __int64 86 | # define U64(C) C##UI64 87 | # elif defined(__arch64__) 88 | # define SHA_LONG64 unsigned long 89 | # define U64(C) C##UL 90 | # else 91 | # define SHA_LONG64 unsigned long long 92 | # define U64(C) C##ULL 93 | # endif 94 | 95 | typedef struct SHA512state_st { 96 | SHA_LONG64 h[8]; 97 | SHA_LONG64 Nl, Nh; 98 | union { 99 | SHA_LONG64 d[SHA_LBLOCK]; 100 | unsigned char p[SHA512_CBLOCK]; 101 | } u; 102 | unsigned int num, md_len; 103 | } SHA512_CTX; 104 | 105 | int SHA384_Init(SHA512_CTX *c); 106 | int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); 107 | int SHA384_Final(unsigned char *md, SHA512_CTX *c); 108 | unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); 109 | int SHA512_Init(SHA512_CTX *c); 110 | int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); 111 | int SHA512_Final(unsigned char *md, SHA512_CTX *c); 112 | unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); 113 | void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); 114 | 115 | #ifdef __cplusplus 116 | } 117 | #endif 118 | 119 | #endif 120 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/srp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * Copyright (c) 2004, EdelKey Project. All Rights Reserved. 4 | * 5 | * Licensed under the OpenSSL license (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | * 10 | * Originally written by Christophe Renou and Peter Sylvester, 11 | * for the EdelKey project. 12 | */ 13 | 14 | #ifndef HEADER_SRP_H 15 | # define HEADER_SRP_H 16 | 17 | #include 18 | 19 | #ifndef OPENSSL_NO_SRP 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | 26 | # ifdef __cplusplus 27 | extern "C" { 28 | # endif 29 | 30 | typedef struct SRP_gN_cache_st { 31 | char *b64_bn; 32 | BIGNUM *bn; 33 | } SRP_gN_cache; 34 | 35 | 36 | DEFINE_STACK_OF(SRP_gN_cache) 37 | 38 | typedef struct SRP_user_pwd_st { 39 | /* Owned by us. */ 40 | char *id; 41 | BIGNUM *s; 42 | BIGNUM *v; 43 | /* Not owned by us. */ 44 | const BIGNUM *g; 45 | const BIGNUM *N; 46 | /* Owned by us. */ 47 | char *info; 48 | } SRP_user_pwd; 49 | 50 | void SRP_user_pwd_free(SRP_user_pwd *user_pwd); 51 | 52 | DEFINE_STACK_OF(SRP_user_pwd) 53 | 54 | typedef struct SRP_VBASE_st { 55 | STACK_OF(SRP_user_pwd) *users_pwd; 56 | STACK_OF(SRP_gN_cache) *gN_cache; 57 | /* to simulate a user */ 58 | char *seed_key; 59 | const BIGNUM *default_g; 60 | const BIGNUM *default_N; 61 | } SRP_VBASE; 62 | 63 | /* 64 | * Internal structure storing N and g pair 65 | */ 66 | typedef struct SRP_gN_st { 67 | char *id; 68 | const BIGNUM *g; 69 | const BIGNUM *N; 70 | } SRP_gN; 71 | 72 | DEFINE_STACK_OF(SRP_gN) 73 | 74 | SRP_VBASE *SRP_VBASE_new(char *seed_key); 75 | void SRP_VBASE_free(SRP_VBASE *vb); 76 | int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file); 77 | 78 | /* This method ignores the configured seed and fails for an unknown user. */ 79 | DEPRECATEDIN_1_1_0(SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)) 80 | /* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/ 81 | SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username); 82 | 83 | char *SRP_create_verifier(const char *user, const char *pass, char **salt, 84 | char **verifier, const char *N, const char *g); 85 | int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, 86 | BIGNUM **verifier, const BIGNUM *N, 87 | const BIGNUM *g); 88 | 89 | # define SRP_NO_ERROR 0 90 | # define SRP_ERR_VBASE_INCOMPLETE_FILE 1 91 | # define SRP_ERR_VBASE_BN_LIB 2 92 | # define SRP_ERR_OPEN_FILE 3 93 | # define SRP_ERR_MEMORY 4 94 | 95 | # define DB_srptype 0 96 | # define DB_srpverifier 1 97 | # define DB_srpsalt 2 98 | # define DB_srpid 3 99 | # define DB_srpgN 4 100 | # define DB_srpinfo 5 101 | # undef DB_NUMBER 102 | # define DB_NUMBER 6 103 | 104 | # define DB_SRP_INDEX 'I' 105 | # define DB_SRP_VALID 'V' 106 | # define DB_SRP_REVOKED 'R' 107 | # define DB_SRP_MODIF 'v' 108 | 109 | /* see srp.c */ 110 | char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N); 111 | SRP_gN *SRP_get_default_gN(const char *id); 112 | 113 | /* server side .... */ 114 | BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u, 115 | const BIGNUM *b, const BIGNUM *N); 116 | BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, 117 | const BIGNUM *v); 118 | int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N); 119 | BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N); 120 | 121 | /* client side .... */ 122 | BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass); 123 | BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g); 124 | BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, 125 | const BIGNUM *x, const BIGNUM *a, const BIGNUM *u); 126 | int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N); 127 | 128 | # define SRP_MINIMAL_N 1024 129 | 130 | # ifdef __cplusplus 131 | } 132 | # endif 133 | # endif 134 | 135 | #endif 136 | -------------------------------------------------------------------------------- /src/openssl/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the OpenSSL license (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef HEADER_OPENSSLV_H 11 | # define HEADER_OPENSSLV_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /*- 18 | * Numeric release version identifier: 19 | * MNNFFPPS: major minor fix patch status 20 | * The status nibble has one of the values 0 for development, 1 to e for betas 21 | * 1 to 14, and f for release. The patch level is exactly that. 22 | * For example: 23 | * 0.9.3-dev 0x00903000 24 | * 0.9.3-beta1 0x00903001 25 | * 0.9.3-beta2-dev 0x00903002 26 | * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) 27 | * 0.9.3 0x0090300f 28 | * 0.9.3a 0x0090301f 29 | * 0.9.4 0x0090400f 30 | * 1.2.3z 0x102031af 31 | * 32 | * For continuity reasons (because 0.9.5 is already out, and is coded 33 | * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level 34 | * part is slightly different, by setting the highest bit. This means 35 | * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start 36 | * with 0x0090600S... 37 | * 38 | * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) 39 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 40 | * major minor fix final patch/beta) 41 | */ 42 | # define OPENSSL_VERSION_NUMBER 0x1010107fL 43 | # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1g 21 Apr 2020" 44 | 45 | /*- 46 | * The macros below are to be used for shared library (.so, .dll, ...) 47 | * versioning. That kind of versioning works a bit differently between 48 | * operating systems. The most usual scheme is to set a major and a minor 49 | * number, and have the runtime loader check that the major number is equal 50 | * to what it was at application link time, while the minor number has to 51 | * be greater or equal to what it was at application link time. With this 52 | * scheme, the version number is usually part of the file name, like this: 53 | * 54 | * libcrypto.so.0.9 55 | * 56 | * Some unixen also make a softlink with the major version number only: 57 | * 58 | * libcrypto.so.0 59 | * 60 | * On Tru64 and IRIX 6.x it works a little bit differently. There, the 61 | * shared library version is stored in the file, and is actually a series 62 | * of versions, separated by colons. The rightmost version present in the 63 | * library when linking an application is stored in the application to be 64 | * matched at run time. When the application is run, a check is done to 65 | * see if the library version stored in the application matches any of the 66 | * versions in the version string of the library itself. 67 | * This version string can be constructed in any way, depending on what 68 | * kind of matching is desired. However, to implement the same scheme as 69 | * the one used in the other unixen, all compatible versions, from lowest 70 | * to highest, should be part of the string. Consecutive builds would 71 | * give the following versions strings: 72 | * 73 | * 3.0 74 | * 3.0:3.1 75 | * 3.0:3.1:3.2 76 | * 4.0 77 | * 4.0:4.1 78 | * 79 | * Notice how version 4 is completely incompatible with version, and 80 | * therefore give the breach you can see. 81 | * 82 | * There may be other schemes as well that I haven't yet discovered. 83 | * 84 | * So, here's the way it works here: first of all, the library version 85 | * number doesn't need at all to match the overall OpenSSL version. 86 | * However, it's nice and more understandable if it actually does. 87 | * The current library version is stored in the macro SHLIB_VERSION_NUMBER, 88 | * which is just a piece of text in the format "M.m.e" (Major, minor, edit). 89 | * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, 90 | * we need to keep a history of version numbers, which is done in the 91 | * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and 92 | * should only keep the versions that are binary compatible with the current. 93 | */ 94 | # define SHLIB_VERSION_HISTORY "" 95 | # define SHLIB_VERSION_NUMBER "1.1" 96 | 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #endif /* HEADER_OPENSSLV_H */ 102 | -------------------------------------------------------------------------------- /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) -------------------------------------------------------------------------------- /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("