├── .gitattributes ├── .gitignore ├── CDIR.sln ├── CDIR ├── CDIR.cpp ├── CDIR.h ├── CDIR.rc ├── CDIR.vcxproj ├── CDIR.vcxproj.filters ├── ConfigParser.cpp ├── ConfigParser.h ├── ReadMe.txt ├── WriteWrapper.cpp ├── WriteWrapper.h ├── cdir.ini ├── collector.ico ├── globals.h ├── libressl-2.5.5-windows │ ├── include │ │ ├── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1t.h │ │ │ ├── bio.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── buffer.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── chacha.h │ │ │ ├── cmac.h │ │ │ ├── comp.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── crypto.h │ │ │ ├── curve25519.h │ │ │ ├── des.h │ │ │ ├── dh.h │ │ │ ├── dsa.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── engine.h │ │ │ ├── err.h │ │ │ ├── evp.h │ │ │ ├── gost.h │ │ │ ├── hmac.h │ │ │ ├── idea.h │ │ │ ├── lhash.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── ocsp.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslfeatures.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs7.h │ │ │ ├── poly1305.h │ │ │ ├── rand.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── safestack.h │ │ │ ├── sha.h │ │ │ ├── srtp.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── stack.h │ │ │ ├── tls1.h │ │ │ ├── ts.h │ │ │ ├── txt_db.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ └── x509v3.h │ │ └── tls.h │ ├── x64 │ │ ├── libcrypto-41.dll │ │ ├── libcrypto-41.exp │ │ ├── libcrypto-41.lib │ │ ├── libssl-43.dll │ │ ├── libssl-43.exp │ │ ├── libssl-43.lib │ │ ├── libtls-15.dll │ │ ├── libtls-15.exp │ │ ├── libtls-15.lib │ │ ├── ocspcheck.exe │ │ └── openssl.exe │ └── x86 │ │ ├── libcrypto-41.dll │ │ ├── libcrypto-41.exp │ │ ├── libcrypto-41.lib │ │ ├── libssl-43.dll │ │ ├── libssl-43.exp │ │ ├── libssl-43.lib │ │ ├── libtls-15.dll │ │ ├── libtls-15.exp │ │ ├── libtls-15.lib │ │ ├── ocspcheck.exe │ │ └── openssl.exe ├── resource.h ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── util.cpp ├── util.h ├── winpmem_x64.exe └── winpmem_x86.exe ├── LICENSE.txt ├── NTFSParserDLL ├── NTFS.h ├── NTFSParserDLL.cpp ├── NTFSParserDLL.vcxproj ├── NTFSParserDLL.vcxproj.filters ├── NTFS_Attribute.h ├── NTFS_Common.h ├── NTFS_DataType.h ├── NTFS_FileRecord.h ├── ReadMe.txt ├── dllmain.cpp ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── README.md └── README_en.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | CDIR/x64/ 19 | CDIR/x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | /CDIR.VC.db 214 | /CDIR.VC.VC.opendb 215 | -------------------------------------------------------------------------------- /CDIR.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdir-collector", "CDIR\CDIR.vcxproj", "{06718832-98E4-4A84-82C3-9F5678C326E5}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0} = {5E42B778-F231-4797-B7FD-7D5BCA9738D0} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NTFSParserDLL", "NTFSParserDLL\NTFSParserDLL.vcxproj", "{5E42B778-F231-4797-B7FD-7D5BCA9738D0}" 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|x64 = Debug|x64 16 | Debug|x86 = Debug|x86 17 | Release|x64 = Release|x64 18 | Release|x86 = Release|x86 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Debug|x64.ActiveCfg = Debug|x64 22 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Debug|x64.Build.0 = Debug|x64 23 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Debug|x86.ActiveCfg = Debug|Win32 24 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Debug|x86.Build.0 = Debug|Win32 25 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Debug|x86.Deploy.0 = Debug|Win32 26 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Release|x64.ActiveCfg = Release|x64 27 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Release|x64.Build.0 = Release|x64 28 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Release|x86.ActiveCfg = Release|Win32 29 | {06718832-98E4-4A84-82C3-9F5678C326E5}.Release|x86.Build.0 = Release|Win32 30 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Debug|x64.ActiveCfg = Debug|x64 31 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Debug|x64.Build.0 = Debug|x64 32 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Debug|x86.ActiveCfg = Debug|Win32 33 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Debug|x86.Build.0 = Debug|Win32 34 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Release|x64.ActiveCfg = Release|x64 35 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Release|x64.Build.0 = Release|x64 36 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Release|x86.ActiveCfg = Release|Win32 37 | {5E42B778-F231-4797-B7FD-7D5BCA9738D0}.Release|x86.Build.0 = Release|Win32 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | EndGlobal 43 | -------------------------------------------------------------------------------- /CDIR/CDIR.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "..\NTFSParserDLL\NTFS.h" 4 | #include "..\NTFSParserDLL\NTFS_DataType.h" 5 | 6 | struct FileInfo_t 7 | { 8 | CNTFSVolume* volume; 9 | CFileRecord* fileRecord; 10 | CIndexEntry* indexEntry; 11 | CAttrBase* data; 12 | }; -------------------------------------------------------------------------------- /CDIR/CDIR.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | 5 | #include "resource.h" 6 | 7 | #define APSTUDIO_READONLY_SYMBOLS 8 | ///////////////////////////////////////////////////////////////////////////// 9 | // 10 | // Generated from the TEXTINCLUDE 2 resource. 11 | // 12 | #include "winres.h" 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | #undef APSTUDIO_READONLY_SYMBOLS 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // 日本語 (日本) resources 19 | 20 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) 21 | LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT 22 | 23 | #ifdef APSTUDIO_INVOKED 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // 26 | // TEXTINCLUDE 27 | // 28 | 29 | 1 TEXTINCLUDE 30 | BEGIN 31 | "resource.h\0" 32 | END 33 | 34 | 2 TEXTINCLUDE 35 | BEGIN 36 | "#include ""winres.h""\r\n" 37 | "\0" 38 | END 39 | 40 | 3 TEXTINCLUDE 41 | BEGIN 42 | "\r\n" 43 | "\0" 44 | END 45 | 46 | #endif // APSTUDIO_INVOKED 47 | 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | // 51 | // Icon 52 | // 53 | 54 | // Icon with lowest ID value placed first to ensure application icon 55 | // remains consistent on all systems. 56 | IDI_ICON1 ICON "collector.ico" 57 | 58 | 59 | ///////////////////////////////////////////////////////////////////////////// 60 | // 61 | // Version 62 | // 63 | 64 | VS_VERSION_INFO VERSIONINFO 65 | FILEVERSION 1,3,7,0 66 | PRODUCTVERSION 1,3,7,0 67 | FILEFLAGSMASK 0x3fL 68 | #ifdef _DEBUG 69 | FILEFLAGS 0x1L 70 | #else 71 | FILEFLAGS 0x0L 72 | #endif 73 | FILEOS 0x40004L 74 | FILETYPE 0x1L 75 | FILESUBTYPE 0x0L 76 | BEGIN 77 | BLOCK "StringFileInfo" 78 | BEGIN 79 | BLOCK "041104b0" 80 | BEGIN 81 | VALUE "CompanyName", "Cyber Defense Institute, Inc." 82 | VALUE "FileDescription", "Data Collection Tool for Incident Response" 83 | VALUE "FileVersion", "1.3.7.0" 84 | VALUE "InternalName", "cdir-collector.exe" 85 | VALUE "LegalCopyright", "Copyright (C) 2024 Cyber Defense Institute" 86 | VALUE "OriginalFilename", "cdir-collector.exe" 87 | VALUE "ProductName", "CDIR Collector" 88 | VALUE "ProductVersion", "1.3.7.0" 89 | END 90 | END 91 | BLOCK "VarFileInfo" 92 | BEGIN 93 | VALUE "Translation", 0x411, 1200 94 | END 95 | END 96 | 97 | #endif // 日本語 (日本) resources 98 | ///////////////////////////////////////////////////////////////////////////// 99 | 100 | 101 | 102 | #ifndef APSTUDIO_INVOKED 103 | ///////////////////////////////////////////////////////////////////////////// 104 | // 105 | // Generated from the TEXTINCLUDE 3 resource. 106 | // 107 | 108 | 109 | ///////////////////////////////////////////////////////////////////////////// 110 | #endif // not APSTUDIO_INVOKED 111 | 112 | -------------------------------------------------------------------------------- /CDIR/CDIR.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ヘッダー ファイル 23 | 24 | 25 | ヘッダー ファイル 26 | 27 | 28 | ヘッダー ファイル 29 | 30 | 31 | ヘッダー ファイル 32 | 33 | 34 | ヘッダー ファイル 35 | 36 | 37 | ヘッダー ファイル 38 | 39 | 40 | ヘッダー ファイル 41 | 42 | 43 | ヘッダー ファイル 44 | 45 | 46 | 47 | 48 | ソース ファイル 49 | 50 | 51 | ソース ファイル 52 | 53 | 54 | ソース ファイル 55 | 56 | 57 | ソース ファイル 58 | 59 | 60 | ソース ファイル 61 | 62 | 63 | 64 | 65 | リソース ファイル 66 | 67 | 68 | 69 | 70 | リソース ファイル 71 | 72 | 73 | リソース ファイル 74 | 75 | 76 | 77 | 78 | リソース ファイル 79 | 80 | 81 | -------------------------------------------------------------------------------- /CDIR/ConfigParser.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "ConfigParser.h" 3 | #include "util.h" 4 | 5 | #include 6 | #include 7 | 8 | 9 | ConfigParser::ConfigParser(string path) 10 | { 11 | ifstream file(path); 12 | string l; 13 | if (file.is_open()) { 14 | opened = true; 15 | while (getline(file, l)) { 16 | size_t idx; 17 | // check if comment 18 | for (idx = 0; idx < l.size() && isspace(l[idx]); idx++); 19 | if (l[idx] == '#' || l[idx] == ';') continue; 20 | 21 | if ((idx = l.find_first_of('=')) != string::npos) { 22 | string key = l.substr(0, idx); 23 | string val = l.substr(idx+1); 24 | 25 | // trim key string 26 | key = trim(key); 27 | 28 | if (CONFIGLIST.find(key) != CONFIGLIST.end()) { 29 | Value value; 30 | value.type = CONFIGLIST[key]; 31 | switch (CONFIGLIST[key]) { 32 | case TYPE_BOOL: 33 | value.ptr = new bool; 34 | val = trim(val); 35 | *((bool*)value.ptr) = [=]() { 36 | if (_stricmp("true", val.c_str()) == 0) { 37 | return true; 38 | } 39 | if (_stricmp("false", val.c_str()) == 0) { 40 | return false; 41 | } 42 | if (strcmp("1", val.c_str()) == 0) { 43 | return true; 44 | } 45 | if (strcmp("0", val.c_str()) == 0) { 46 | return false; 47 | } 48 | cerr << msg("パースエラー", 49 | "parse error.") << endl; 50 | cerr << key + " " + "(1:ON 2:OFF 0:EXIT)" << endl << "> "; 51 | int input; cin >> input; 52 | if (!input) __exit(EXIT_SUCCESS); 53 | 54 | return (input == 1) ? true : false; 55 | }(); 56 | 57 | break; 58 | case TYPE_INT: 59 | value.ptr = new int; 60 | val = trim(val); 61 | *((int*)value.ptr) = atoi(val.c_str()); 62 | break; 63 | case TYPE_STRING: 64 | value.ptr = new string; 65 | for (idx = 0; idx < val.size() && isspace(val[idx]); idx++); 66 | *((string*)value.ptr) = val.substr(idx); 67 | break; 68 | } 69 | m[key] = value; 70 | } 71 | } 72 | } 73 | //for (auto &it : CONFIGLIST) { 74 | // cout << it.first << endl; 75 | //} 76 | } 77 | else { 78 | opened = false; 79 | } 80 | } 81 | 82 | 83 | ConfigParser::~ConfigParser() 84 | { 85 | } 86 | 87 | bool ConfigParser::isOpened() { 88 | return opened; 89 | } 90 | 91 | 92 | bool ConfigParser::isSet(string key) { 93 | return m.find(key) != m.end(); 94 | } 95 | 96 | 97 | Value ConfigParser::getValue(string key) { 98 | if (m.find(key) != m.end()) { 99 | return m[key]; 100 | } 101 | else { 102 | cerr << key << msg("は定義されていません", " is undefined") << endl; 103 | cerr << key + " " + "(1:ON 2:OFF 0:EXIT)" << endl << "> "; 104 | int input; cin >> input; 105 | if (!input) __exit(EXIT_SUCCESS); 106 | Value val; 107 | val.type = TYPE_BOOL; 108 | val.ptr = new bool; 109 | CASTVAL(bool,val) = (input == 1) ? true : false; 110 | return val; 111 | } 112 | } 113 | 114 | string ConfigParser::trim(string &str) { 115 | size_t beg, end; 116 | for (beg = 0; beg < str.size() && isspace(str[beg]); beg++); 117 | for (end = beg; end < str.size() && !isspace(str[end]); end++); 118 | str = str.substr(beg, end - beg); 119 | return str; 120 | } -------------------------------------------------------------------------------- /CDIR/ConfigParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | 10 | #define CASTVAL(type,val) *((type*)(val).ptr) 11 | #define CASTPTR(type,ptr) *((type*)ptr) 12 | 13 | enum TYPE_ID { 14 | TYPE_BOOL, 15 | TYPE_INT, 16 | TYPE_STRING 17 | }; 18 | 19 | struct Value { 20 | TYPE_ID type; 21 | void* ptr; 22 | }; 23 | 24 | //#define GETVALUE(val) ((val).type==TYPE_BOOL)?(CASTPTR(bool,(val).ptr)):((val.type==TYPE_INT)?(CASTPTR(int,(val).ptr)):(CASTPTR(string,(val).ptr))) 25 | //#define GETVALUE(val) [=](){if(val.type==TYPE_BOOL)return CASTPTR(bool,(val).ptr);if(val.type==TYPE_INT)return CASTPTR(int,(val).ptr);if(val.type==TYPE_STRING)return CASTPTR(int,(val).ptr);} 26 | 27 | struct c_ignorecase:std::function { 28 | bool operator() (const string &s1, const string &s2) const { 29 | return _stricmp(s1.c_str(), s2.c_str()) < 0; 30 | } 31 | }; 32 | 33 | static map CONFIGLIST = { 34 | {"MemoryDump", TYPE_BOOL}, 35 | {"MFT", TYPE_BOOL}, 36 | {"Secure", TYPE_BOOL}, 37 | {"UsnJrnl", TYPE_BOOL}, 38 | {"EventLog", TYPE_BOOL}, 39 | {"Prefetch", TYPE_BOOL}, 40 | {"Registry", TYPE_BOOL}, 41 | {"WMI", TYPE_BOOL}, 42 | {"SRUM", TYPE_BOOL }, 43 | {"Web", TYPE_BOOL }, 44 | {"Output", TYPE_STRING}, 45 | {"Target", TYPE_STRING}, 46 | {"MemoryDumpCmdline", TYPE_STRING}, 47 | {"host", TYPE_STRING}, 48 | {"port", TYPE_INT}, 49 | {"path", TYPE_STRING} 50 | }; 51 | 52 | class ConfigParser 53 | { 54 | private: 55 | bool opened; 56 | map m; 57 | 58 | public: 59 | ConfigParser(string); 60 | ~ConfigParser(); 61 | bool isOpened(); 62 | bool isSet(string); 63 | Value getValue(string); 64 | static string trim(string&); 65 | }; -------------------------------------------------------------------------------- /CDIR/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | コンソール アプリケーション: CDIR プロジェクトの概要 3 | ======================================================================== 4 | 5 | この CDIR アプリケーションは、AppWizard により作成されました。 6 | 7 | このファイルには、CDIR アプリケーションを構成する各ファイルの内容の概要が含まれています。 8 | 9 | 10 | CDIR.vcxproj 11 | これは、アプリケーション ウィザードを使用して生成された VC++ プロジェクトのメイン プロジェクト ファイルです。ファイルを生成した Visual C++ のバージョンに関する情報と、アプリケーション ウィザードで選択されたプラットフォーム、構成、およびプロジェクト機能に関する情報が含まれています。 12 | 13 | CDIR.vcxproj.filters 14 | これは、アプリケーション ウィザードで生成された VC++ プロジェクトのフィルター ファイルです。このファイルには、プロジェクト内のファイルとフィルターとの間の関連付けに関する情報が含まれています。この関連付けは、特定のノードで同様の拡張子を持つファイルのグループ化を示すために IDE で使用されます (たとえば、".cpp" ファイルは "ソース ファイル" フィルターに関連付けられています)。 15 | 16 | CDIR.cpp 17 | これは、メインのアプリケーション ソース ファイルです。 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | その他の標準ファイル : 21 | 22 | StdAfx.h, StdAfx.cpp 23 | これらのファイルは、CDIR.pch という名前のプリコンパイル済みヘッダー (PCH) ファイルと、StdAfx.obj という名前のプリコンパイル済みの型ファイルをビルドするために使用されます。 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | その他のメモ : 27 | 28 | AppWizard では "TODO:" コメントを使用して、ユーザーが追加またはカスタマイズする必要のあるソース コードを示します。 29 | 30 | ///////////////////////////////////////////////////////////////////////////// 31 | -------------------------------------------------------------------------------- /CDIR/WriteWrapper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "openssl\ssl.h" 9 | 10 | using namespace std; 11 | 12 | class WriteWrapper 13 | { 14 | private: 15 | char *filename; 16 | ULONGLONG filesize; 17 | 18 | ofstream osfile; 19 | 20 | static string address; 21 | static int port; 22 | static string proxy_address; 23 | static int proxy_port; 24 | static string path; 25 | static string uriroot; 26 | static bool useProxy; 27 | static string curdir; 28 | 29 | WSADATA wsadata; 30 | struct sockaddr_in server; 31 | bool isSSL; 32 | SSL *ssl; 33 | SOCKET sock; 34 | 35 | public: 36 | static const int STATUS_UNINTIALIZED = 0; 37 | static const int STATUS_LOCAL = 1; 38 | static const int STATUS_REMOTE = 2; 39 | 40 | public: 41 | static int status; // 0: uninitialized, 1: local, 2: remote 42 | bool isHeaderSent; 43 | 44 | public: 45 | WriteWrapper(char *, ULONGLONG, bool isDirectory=false); 46 | static bool isLocal(); 47 | bool getConnInfo(); 48 | int getProxyInfo(); 49 | string urlencode(string); 50 | void mkdir(string); 51 | static void chdir(string); 52 | int sendfile(const char *); 53 | int sendheader(ULONGLONG = 0); 54 | long long write(const char *, long long); 55 | long long read(char *, long long); 56 | string readall(); 57 | string readuntil(string); 58 | void close(); 59 | 60 | }; -------------------------------------------------------------------------------- /CDIR/cdir.ini: -------------------------------------------------------------------------------- 1 | ;MemoryDump = true 2 | MFT = true 3 | Secure = true 4 | UsnJrnl = true 5 | EventLog = true 6 | Prefetch = true 7 | Registry = true 8 | WMI = true 9 | SRUM = true 10 | Web = true 11 | ;Target = G:\ 12 | ;MemoryDumpCmdline = winpmem_v3.3.rc3.exe -dd --output RAM.aff4 13 | ;MemoryDumpCmdline = winpmem-2.1.post4.exe --output RAM.aff4 14 | ;MemoryDumpCmdline = DumpIt.exe /Q /N /T DMP /O RAM.dmp 15 | ;MemoryDumpCmdline = RamCapture64.exe RAM.raw 16 | ;Output = E:\ 17 | ;Output = \\hostname\sharename\ 18 | -------------------------------------------------------------------------------- /CDIR/collector.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/collector.ico -------------------------------------------------------------------------------- /CDIR/globals.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ConfigParser.h" 4 | 5 | extern ConfigParser *config; -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/aes.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: aes.h,v 1.14 2014/07/09 09:10:07 miod Exp $ */ 2 | /* ==================================================================== 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * openssl-core@openssl.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | */ 51 | 52 | #ifndef HEADER_AES_H 53 | #define HEADER_AES_H 54 | 55 | #include 56 | 57 | #ifdef OPENSSL_NO_AES 58 | #error AES is disabled. 59 | #endif 60 | 61 | #include 62 | 63 | #define AES_ENCRYPT 1 64 | #define AES_DECRYPT 0 65 | 66 | /* Because array size can't be a const in C, the following two are macros. 67 | Both sizes are in bytes. */ 68 | #define AES_MAXNR 14 69 | #define AES_BLOCK_SIZE 16 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | /* This should be a hidden type, but EVP requires that the size be known */ 76 | struct aes_key_st { 77 | unsigned int rd_key[4 *(AES_MAXNR + 1)]; 78 | int rounds; 79 | }; 80 | typedef struct aes_key_st AES_KEY; 81 | 82 | const char *AES_options(void); 83 | 84 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 85 | AES_KEY *key); 86 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 87 | AES_KEY *key); 88 | 89 | void AES_encrypt(const unsigned char *in, unsigned char *out, 90 | const AES_KEY *key); 91 | void AES_decrypt(const unsigned char *in, unsigned char *out, 92 | const AES_KEY *key); 93 | 94 | void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, 95 | const AES_KEY *key, const int enc); 96 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 97 | size_t length, const AES_KEY *key, unsigned char *ivec, const int enc); 98 | void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, 99 | size_t length, const AES_KEY *key, unsigned char *ivec, int *num, 100 | const int enc); 101 | void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, 102 | size_t length, const AES_KEY *key, unsigned char *ivec, int *num, 103 | const int enc); 104 | void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, 105 | size_t length, const AES_KEY *key, unsigned char *ivec, int *num, 106 | const int enc); 107 | void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, 108 | size_t length, const AES_KEY *key, unsigned char *ivec, int *num); 109 | void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, 110 | size_t length, const AES_KEY *key, unsigned char ivec[AES_BLOCK_SIZE], 111 | unsigned char ecount_buf[AES_BLOCK_SIZE], unsigned int *num); 112 | /* NB: the IV is _two_ blocks long */ 113 | void AES_ige_encrypt(const unsigned char *in, unsigned char *out, 114 | size_t length, const AES_KEY *key, unsigned char *ivec, const int enc); 115 | 116 | int AES_wrap_key(AES_KEY *key, const unsigned char *iv, unsigned char *out, 117 | const unsigned char *in, unsigned int inlen); 118 | int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, unsigned char *out, 119 | const unsigned char *in, unsigned int inlen); 120 | 121 | 122 | #ifdef __cplusplus 123 | } 124 | #endif 125 | 126 | #endif /* !HEADER_AES_H */ 127 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: blowfish.h,v 1.14 2014/07/10 09:01:04 miod Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_BLOWFISH_H 60 | #define HEADER_BLOWFISH_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_BF 69 | #error BF is disabled. 70 | #endif 71 | 72 | #define BF_ENCRYPT 1 73 | #define BF_DECRYPT 0 74 | 75 | /* 76 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 77 | * ! BF_LONG has to be at least 32 bits wide. If it's wider, then ! 78 | * ! BF_LONG_LOG2 has to be defined along. ! 79 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 80 | */ 81 | 82 | #define BF_LONG unsigned int 83 | 84 | #define BF_ROUNDS 16 85 | #define BF_BLOCK 8 86 | 87 | typedef struct bf_key_st 88 | { 89 | BF_LONG P[BF_ROUNDS+2]; 90 | BF_LONG S[4*256]; 91 | } BF_KEY; 92 | 93 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 94 | 95 | void BF_encrypt(BF_LONG *data,const BF_KEY *key); 96 | void BF_decrypt(BF_LONG *data,const BF_KEY *key); 97 | 98 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 99 | const BF_KEY *key, int enc); 100 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 101 | const BF_KEY *schedule, unsigned char *ivec, int enc); 102 | void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, 103 | const BF_KEY *schedule, unsigned char *ivec, int *num, int enc); 104 | void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, 105 | const BF_KEY *schedule, unsigned char *ivec, int *num); 106 | const char *BF_options(void); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: buffer.h,v 1.15 2015/06/24 10:05:14 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_BUFFER_H 60 | #define HEADER_BUFFER_H 61 | #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) 62 | #define __bounded__(x, y, z) 63 | #endif 64 | 65 | #include 66 | 67 | #ifdef __cplusplus 68 | extern "C" { 69 | #endif 70 | 71 | #include 72 | #include 73 | 74 | /* Already declared in ossl_typ.h */ 75 | /* typedef struct buf_mem_st BUF_MEM; */ 76 | 77 | struct buf_mem_st { 78 | size_t length; /* current number of bytes */ 79 | char *data; 80 | size_t max; /* size of buffer */ 81 | }; 82 | 83 | BUF_MEM *BUF_MEM_new(void); 84 | void BUF_MEM_free(BUF_MEM *a); 85 | int BUF_MEM_grow(BUF_MEM *str, size_t len); 86 | int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 87 | 88 | #ifndef LIBRESSL_INTERNAL 89 | char * BUF_strdup(const char *str); 90 | char * BUF_strndup(const char *str, size_t siz); 91 | void * BUF_memdup(const void *data, size_t siz); 92 | void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); 93 | 94 | /* safe string functions */ 95 | size_t BUF_strlcpy(char *dst, const char *src, size_t siz) 96 | __attribute__ ((__bounded__(__string__,1,3))); 97 | size_t BUF_strlcat(char *dst, const char *src, size_t siz) 98 | __attribute__ ((__bounded__(__string__,1,3))); 99 | #endif 100 | 101 | /* BEGIN ERROR CODES */ 102 | /* The following lines are auto generated by the script mkerr.pl. Any changes 103 | * made after this point may be overwritten when the script is next run. 104 | */ 105 | void ERR_load_BUF_strings(void); 106 | 107 | /* Error codes for the BUF functions. */ 108 | 109 | /* Function codes. */ 110 | #define BUF_F_BUF_MEMDUP 103 111 | #define BUF_F_BUF_MEM_GROW 100 112 | #define BUF_F_BUF_MEM_GROW_CLEAN 105 113 | #define BUF_F_BUF_MEM_NEW 101 114 | #define BUF_F_BUF_STRDUP 102 115 | #define BUF_F_BUF_STRNDUP 104 116 | 117 | /* Reason codes. */ 118 | 119 | #ifdef __cplusplus 120 | } 121 | #endif 122 | #endif 123 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: camellia.h,v 1.5 2014/11/13 20:01:58 miod Exp $ */ 2 | /* ==================================================================== 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * openssl-core@openssl.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | */ 51 | 52 | #ifndef HEADER_CAMELLIA_H 53 | #define HEADER_CAMELLIA_H 54 | 55 | #include 56 | 57 | #ifdef OPENSSL_NO_CAMELLIA 58 | #error CAMELLIA is disabled. 59 | #endif 60 | 61 | #include 62 | 63 | #define CAMELLIA_ENCRYPT 1 64 | #define CAMELLIA_DECRYPT 0 65 | 66 | /* Because array size can't be a const in C, the following two are macros. 67 | Both sizes are in bytes. */ 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | /* This should be a hidden type, but EVP requires that the size be known */ 74 | 75 | #define CAMELLIA_BLOCK_SIZE 16 76 | #define CAMELLIA_TABLE_BYTE_LEN 272 77 | #define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 78 | 79 | typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match with WORD */ 80 | 81 | struct camellia_key_st { 82 | union { 83 | double d; /* ensures 64-bit align */ 84 | KEY_TABLE_TYPE rd_key; 85 | } u; 86 | int grand_rounds; 87 | }; 88 | typedef struct camellia_key_st CAMELLIA_KEY; 89 | 90 | int Camellia_set_key(const unsigned char *userKey, const int bits, 91 | CAMELLIA_KEY *key); 92 | 93 | void Camellia_encrypt(const unsigned char *in, unsigned char *out, 94 | const CAMELLIA_KEY *key); 95 | void Camellia_decrypt(const unsigned char *in, unsigned char *out, 96 | const CAMELLIA_KEY *key); 97 | 98 | void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, 99 | const CAMELLIA_KEY *key, const int enc); 100 | void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, 101 | size_t length, const CAMELLIA_KEY *key, 102 | unsigned char *ivec, const int enc); 103 | void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, 104 | size_t length, const CAMELLIA_KEY *key, 105 | unsigned char *ivec, int *num, const int enc); 106 | void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, 107 | size_t length, const CAMELLIA_KEY *key, 108 | unsigned char *ivec, int *num, const int enc); 109 | void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, 110 | size_t length, const CAMELLIA_KEY *key, 111 | unsigned char *ivec, int *num, const int enc); 112 | void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, 113 | size_t length, const CAMELLIA_KEY *key, 114 | unsigned char *ivec, int *num); 115 | void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, 116 | size_t length, const CAMELLIA_KEY *key, 117 | unsigned char ivec[CAMELLIA_BLOCK_SIZE], 118 | unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], 119 | unsigned int *num); 120 | 121 | #ifdef __cplusplus 122 | } 123 | #endif 124 | 125 | #endif /* !HEADER_Camellia_H */ 126 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: cast.h,v 1.12 2014/07/10 22:45:56 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CAST_H 60 | #define HEADER_CAST_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_CAST 69 | #error CAST is disabled. 70 | #endif 71 | 72 | #define CAST_ENCRYPT 1 73 | #define CAST_DECRYPT 0 74 | 75 | #define CAST_LONG unsigned int 76 | 77 | #define CAST_BLOCK 8 78 | #define CAST_KEY_LENGTH 16 79 | 80 | typedef struct cast_key_st 81 | { 82 | CAST_LONG data[32]; 83 | int short_key; /* Use reduced rounds for short key */ 84 | } CAST_KEY; 85 | 86 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 87 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, 88 | int enc); 89 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 90 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 91 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 92 | const CAST_KEY *ks, unsigned char *iv, int enc); 93 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, const CAST_KEY *schedule, unsigned char *ivec, 95 | int *num, int enc); 96 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 97 | long length, const CAST_KEY *schedule, unsigned char *ivec, 98 | int *num); 99 | 100 | #ifdef __cplusplus 101 | } 102 | #endif 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/chacha.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: chacha.h,v 1.7 2015/12/09 14:07:55 bcook Exp $ */ 2 | /* 3 | * Copyright (c) 2014 Joel Sing 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #ifndef HEADER_CHACHA_H 19 | #define HEADER_CHACHA_H 20 | 21 | #include 22 | 23 | #if defined(OPENSSL_NO_CHACHA) 24 | #error ChaCha is disabled. 25 | #endif 26 | 27 | #include 28 | #include 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | typedef struct { 35 | unsigned int input[16]; 36 | unsigned char ks[64]; 37 | unsigned char unused; 38 | } ChaCha_ctx; 39 | 40 | void ChaCha_set_key(ChaCha_ctx *ctx, const unsigned char *key, 41 | unsigned int keybits); 42 | void ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv, 43 | const unsigned char *counter); 44 | void ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in, 45 | size_t len); 46 | 47 | void CRYPTO_chacha_20(unsigned char *out, const unsigned char *in, size_t len, 48 | const unsigned char key[32], const unsigned char iv[8], uint64_t counter); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif /* HEADER_CHACHA_H */ 55 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: cmac.h,v 1.3 2014/06/21 13:42:14 jsing Exp $ */ 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 | * project. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * licensing@OpenSSL.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | */ 53 | 54 | 55 | #ifndef HEADER_CMAC_H 56 | #define HEADER_CMAC_H 57 | 58 | #ifdef __cplusplus 59 | extern "C" { 60 | #endif 61 | 62 | #include 63 | 64 | /* Opaque */ 65 | typedef struct CMAC_CTX_st CMAC_CTX; 66 | 67 | CMAC_CTX *CMAC_CTX_new(void); 68 | void CMAC_CTX_cleanup(CMAC_CTX *ctx); 69 | void CMAC_CTX_free(CMAC_CTX *ctx); 70 | EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 71 | int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 72 | 73 | int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, 74 | const EVP_CIPHER *cipher, ENGINE *impl); 75 | int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); 76 | int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); 77 | int CMAC_resume(CMAC_CTX *ctx); 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: comp.h,v 1.8 2014/11/03 16:58:28 tedu Exp $ */ 2 | 3 | #ifndef HEADER_COMP_H 4 | #define HEADER_COMP_H 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct comp_ctx_st COMP_CTX; 13 | 14 | typedef struct comp_method_st { 15 | int type; /* NID for compression library */ 16 | const char *name; /* A text string to identify the library */ 17 | int (*init)(COMP_CTX *ctx); 18 | void (*finish)(COMP_CTX *ctx); 19 | int (*compress)(COMP_CTX *ctx, unsigned char *out, unsigned int olen, 20 | unsigned char *in, unsigned int ilen); 21 | int (*expand)(COMP_CTX *ctx, unsigned char *out, unsigned int olen, 22 | unsigned char *in, unsigned int ilen); 23 | /* The following two do NOTHING, but are kept for backward compatibility */ 24 | long (*ctrl)(void); 25 | long (*callback_ctrl)(void); 26 | } COMP_METHOD; 27 | 28 | struct comp_ctx_st { 29 | COMP_METHOD *meth; 30 | unsigned long compress_in; 31 | unsigned long compress_out; 32 | unsigned long expand_in; 33 | unsigned long expand_out; 34 | 35 | CRYPTO_EX_DATA ex_data; 36 | }; 37 | 38 | 39 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 40 | void COMP_CTX_free(COMP_CTX *ctx); 41 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 42 | unsigned char *in, int ilen); 43 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 44 | unsigned char *in, int ilen); 45 | COMP_METHOD *COMP_rle(void ); 46 | COMP_METHOD *COMP_zlib(void ); 47 | void COMP_zlib_cleanup(void); 48 | 49 | #ifdef HEADER_BIO_H 50 | #ifdef ZLIB 51 | BIO_METHOD *BIO_f_zlib(void); 52 | #endif 53 | #endif 54 | 55 | void ERR_load_COMP_strings(void); 56 | 57 | /* Error codes for the COMP functions. */ 58 | 59 | /* Function codes. */ 60 | #define COMP_F_BIO_ZLIB_FLUSH 99 61 | #define COMP_F_BIO_ZLIB_NEW 100 62 | #define COMP_F_BIO_ZLIB_READ 101 63 | #define COMP_F_BIO_ZLIB_WRITE 102 64 | 65 | /* Reason codes. */ 66 | #define COMP_R_ZLIB_DEFLATE_ERROR 99 67 | #define COMP_R_ZLIB_INFLATE_ERROR 100 68 | #define COMP_R_ZLIB_NOT_SUPPORTED 101 69 | 70 | #ifdef __cplusplus 71 | } 72 | #endif 73 | #endif 74 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: conf_api.h,v 1.4 2014/06/12 15:49:28 deraadt Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CONF_API_H 60 | #define HEADER_CONF_API_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* Up until OpenSSL 0.9.5a, this was new_section */ 70 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 71 | /* Up until OpenSSL 0.9.5a, this was get_section */ 72 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 73 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 74 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 75 | const char *section); 76 | 77 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 78 | char *_CONF_get_string(const CONF *conf, const char *section, 79 | const char *name); 80 | long _CONF_get_number(const CONF *conf, const char *section, const char *name); 81 | 82 | int _CONF_new_data(CONF *conf); 83 | void _CONF_free_data(CONF *conf); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/curve25519.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Google Inc. 3 | * 4 | * Permission to use, copy, modify, and/or distribute this software for any 5 | * purpose with or without fee is hereby granted, provided that the above 6 | * copyright notice and this permission notice appear in all copies. 7 | * 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 11 | * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | */ 16 | 17 | #ifndef HEADER_CURVE25519_H 18 | #define HEADER_CURVE25519_H 19 | 20 | #include 21 | 22 | #include 23 | 24 | #if defined(__cplusplus) 25 | extern "C" { 26 | #endif 27 | 28 | /* 29 | * Curve25519. 30 | * 31 | * Curve25519 is an elliptic curve. See https://tools.ietf.org/html/rfc7748. 32 | */ 33 | 34 | /* 35 | * X25519. 36 | * 37 | * X25519 is the Diffie-Hellman primitive built from curve25519. It is 38 | * sometimes referred to as curve25519, but X25519 is a more precise name. 39 | * See http://cr.yp.to/ecdh.html and https://tools.ietf.org/html/rfc7748. 40 | */ 41 | 42 | #define X25519_KEY_LENGTH 32 43 | 44 | /* 45 | * X25519_keypair sets |out_public_value| and |out_private_key| to a freshly 46 | * generated, public/private key pair. 47 | */ 48 | void X25519_keypair(uint8_t out_public_value[X25519_KEY_LENGTH], 49 | uint8_t out_private_key[X25519_KEY_LENGTH]); 50 | 51 | /* 52 | * X25519 writes a shared key to |out_shared_key| that is calculated from the 53 | * given private key and the peer's public value. It returns one on success and 54 | * zero on error. 55 | * 56 | * Don't use the shared key directly, rather use a KDF and also include the two 57 | * public values as inputs. 58 | */ 59 | int X25519(uint8_t out_shared_key[X25519_KEY_LENGTH], 60 | const uint8_t private_key[X25519_KEY_LENGTH], 61 | const uint8_t peers_public_value[X25519_KEY_LENGTH]); 62 | 63 | #if defined(__cplusplus) 64 | } /* extern C */ 65 | #endif 66 | 67 | #endif /* HEADER_CURVE25519_H */ 68 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: dtls1.h,v 1.21 2017/01/22 07:16:39 beck Exp $ */ 2 | /* 3 | * DTLS implementation written by Nagendra Modadugu 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_DTLS1_H 61 | #define HEADER_DTLS1_H 62 | 63 | #if defined(_WIN32) 64 | #include 65 | #else 66 | #include 67 | #endif 68 | 69 | #include 70 | #include 71 | #include 72 | 73 | #include 74 | #include 75 | 76 | #ifdef __cplusplus 77 | extern "C" { 78 | #endif 79 | 80 | #define DTLS1_VERSION 0xFEFF 81 | 82 | /* lengths of messages */ 83 | #define DTLS1_COOKIE_LENGTH 256 84 | 85 | #define DTLS1_RT_HEADER_LENGTH 13 86 | 87 | #define DTLS1_HM_HEADER_LENGTH 12 88 | 89 | #define DTLS1_HM_BAD_FRAGMENT -2 90 | #define DTLS1_HM_FRAGMENT_RETRY -3 91 | 92 | #define DTLS1_CCS_HEADER_LENGTH 1 93 | 94 | #ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 95 | #define DTLS1_AL_HEADER_LENGTH 7 96 | #else 97 | #define DTLS1_AL_HEADER_LENGTH 2 98 | #endif 99 | 100 | #ifndef OPENSSL_NO_SSL_INTERN 101 | 102 | 103 | typedef struct dtls1_bitmap_st { 104 | unsigned long map; /* track 32 packets on 32-bit systems 105 | and 64 - on 64-bit systems */ 106 | unsigned char max_seq_num[8]; /* max record number seen so far, 107 | 64-bit value in big-endian 108 | encoding */ 109 | } DTLS1_BITMAP; 110 | 111 | struct dtls1_retransmit_state { 112 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ 113 | EVP_MD_CTX *write_hash; /* used for mac generation */ 114 | SSL_SESSION *session; 115 | unsigned short epoch; 116 | }; 117 | 118 | struct hm_header_st { 119 | unsigned char type; 120 | unsigned long msg_len; 121 | unsigned short seq; 122 | unsigned long frag_off; 123 | unsigned long frag_len; 124 | unsigned int is_ccs; 125 | struct dtls1_retransmit_state saved_retransmit_state; 126 | }; 127 | 128 | struct ccs_header_st { 129 | unsigned char type; 130 | unsigned short seq; 131 | }; 132 | 133 | struct dtls1_timeout_st { 134 | /* Number of read timeouts so far */ 135 | unsigned int read_timeouts; 136 | 137 | /* Number of write timeouts so far */ 138 | unsigned int write_timeouts; 139 | 140 | /* Number of alerts received so far */ 141 | unsigned int num_alerts; 142 | }; 143 | 144 | struct _pqueue; 145 | 146 | typedef struct record_pqueue_st { 147 | unsigned short epoch; 148 | struct _pqueue *q; 149 | } record_pqueue; 150 | 151 | typedef struct hm_fragment_st { 152 | struct hm_header_st msg_header; 153 | unsigned char *fragment; 154 | unsigned char *reassembly; 155 | } hm_fragment; 156 | 157 | struct dtls1_state_internal_st; 158 | 159 | typedef struct dtls1_state_st { 160 | /* Buffered (sent) handshake records */ 161 | struct _pqueue *sent_messages; 162 | 163 | /* Indicates when the last handshake msg or heartbeat sent will timeout */ 164 | struct timeval next_timeout; 165 | 166 | /* Timeout duration */ 167 | unsigned short timeout_duration; 168 | 169 | struct dtls1_state_internal_st *internal; 170 | } DTLS1_STATE; 171 | 172 | typedef struct dtls1_record_data_st { 173 | unsigned char *packet; 174 | unsigned int packet_length; 175 | SSL3_BUFFER rbuf; 176 | SSL3_RECORD rrec; 177 | } DTLS1_RECORD_DATA; 178 | 179 | #endif 180 | 181 | /* Timeout multipliers (timeout slice is defined in apps/timeouts.h */ 182 | #define DTLS1_TMO_READ_COUNT 2 183 | #define DTLS1_TMO_WRITE_COUNT 2 184 | 185 | #define DTLS1_TMO_ALERT_COUNT 12 186 | 187 | #ifdef __cplusplus 188 | } 189 | #endif 190 | #endif 191 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: ecdh.h,v 1.5 2015/09/13 12:03:07 jsing Exp $ */ 2 | /* ==================================================================== 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 4 | * 5 | * The Elliptic Curve Public-Key Crypto Library (ECC Code) included 6 | * herein is developed by SUN MICROSYSTEMS, INC., and is contributed 7 | * to the OpenSSL project. 8 | * 9 | * The ECC Code is licensed pursuant to the OpenSSL open source 10 | * license provided below. 11 | * 12 | * The ECDH software is originally written by Douglas Stebila of 13 | * Sun Microsystems Laboratories. 14 | * 15 | */ 16 | /* ==================================================================== 17 | * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. 18 | * 19 | * Redistribution and use in source and binary forms, with or without 20 | * modification, are permitted provided that the following conditions 21 | * are met: 22 | * 23 | * 1. Redistributions of source code must retain the above copyright 24 | * notice, this list of conditions and the following disclaimer. 25 | * 26 | * 2. Redistributions in binary form must reproduce the above copyright 27 | * notice, this list of conditions and the following disclaimer in 28 | * the documentation and/or other materials provided with the 29 | * distribution. 30 | * 31 | * 3. All advertising materials mentioning features or use of this 32 | * software must display the following acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 35 | * 36 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 37 | * endorse or promote products derived from this software without 38 | * prior written permission. For written permission, please contact 39 | * licensing@OpenSSL.org. 40 | * 41 | * 5. Products derived from this software may not be called "OpenSSL" 42 | * nor may "OpenSSL" appear in their names without prior written 43 | * permission of the OpenSSL Project. 44 | * 45 | * 6. Redistributions of any form whatsoever must retain the following 46 | * acknowledgment: 47 | * "This product includes software developed by the OpenSSL Project 48 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 49 | * 50 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 51 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 53 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 54 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 56 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 57 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 58 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 59 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 60 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 61 | * OF THE POSSIBILITY OF SUCH DAMAGE. 62 | * ==================================================================== 63 | * 64 | * This product includes cryptographic software written by Eric Young 65 | * (eay@cryptsoft.com). This product includes software written by Tim 66 | * Hudson (tjh@cryptsoft.com). 67 | * 68 | */ 69 | #ifndef HEADER_ECDH_H 70 | #define HEADER_ECDH_H 71 | 72 | #include 73 | 74 | #ifdef OPENSSL_NO_ECDH 75 | #error ECDH is disabled. 76 | #endif 77 | 78 | #include 79 | #include 80 | #ifndef OPENSSL_NO_DEPRECATED 81 | #include 82 | #endif 83 | 84 | #ifdef __cplusplus 85 | extern "C" { 86 | #endif 87 | 88 | const ECDH_METHOD *ECDH_OpenSSL(void); 89 | 90 | void ECDH_set_default_method(const ECDH_METHOD *); 91 | const ECDH_METHOD *ECDH_get_default_method(void); 92 | int ECDH_set_method(EC_KEY *, const ECDH_METHOD *); 93 | 94 | int ECDH_size(const EC_KEY *ecdh); 95 | int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, 96 | EC_KEY *ecdh, 97 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); 98 | 99 | int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new 100 | *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 101 | int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg); 102 | void *ECDH_get_ex_data(EC_KEY *d, int idx); 103 | 104 | 105 | /* BEGIN ERROR CODES */ 106 | /* The following lines are auto generated by the script mkerr.pl. Any changes 107 | * made after this point may be overwritten when the script is next run. 108 | */ 109 | void ERR_load_ECDH_strings(void); 110 | 111 | /* Error codes for the ECDH functions. */ 112 | 113 | /* Function codes. */ 114 | #define ECDH_F_ECDH_CHECK 102 115 | #define ECDH_F_ECDH_COMPUTE_KEY 100 116 | #define ECDH_F_ECDH_DATA_NEW_METHOD 101 117 | 118 | /* Reason codes. */ 119 | #define ECDH_R_KDF_FAILED 102 120 | #define ECDH_R_KEY_TRUNCATION 104 121 | #define ECDH_R_NON_FIPS_METHOD 103 122 | #define ECDH_R_NO_PRIVATE_VALUE 100 123 | #define ECDH_R_POINT_ARITHMETIC_FAILURE 101 124 | 125 | #ifdef __cplusplus 126 | } 127 | #endif 128 | #endif 129 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: hmac.h,v 1.12 2014/06/21 13:39:46 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | #ifndef HEADER_HMAC_H 59 | #define HEADER_HMAC_H 60 | 61 | #include 62 | 63 | #ifdef OPENSSL_NO_HMAC 64 | #error HMAC is disabled. 65 | #endif 66 | 67 | #include 68 | 69 | #define HMAC_MAX_MD_CBLOCK 128 /* largest known is SHA512 */ 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | typedef struct hmac_ctx_st { 76 | const EVP_MD *md; 77 | EVP_MD_CTX md_ctx; 78 | EVP_MD_CTX i_ctx; 79 | EVP_MD_CTX o_ctx; 80 | unsigned int key_length; 81 | unsigned char key[HMAC_MAX_MD_CBLOCK]; 82 | } HMAC_CTX; 83 | 84 | #define HMAC_size(e) (EVP_MD_size((e)->md)) 85 | 86 | 87 | void HMAC_CTX_init(HMAC_CTX *ctx); 88 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); 89 | 90 | #define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */ 91 | 92 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 93 | const EVP_MD *md); /* deprecated */ 94 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, 95 | ENGINE *impl); 96 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); 97 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); 98 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 99 | const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len); 100 | int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 101 | 102 | void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 103 | 104 | #ifdef __cplusplus 105 | } 106 | #endif 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: idea.h,v 1.10 2014/06/12 15:49:29 deraadt Exp $ */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_IDEA_H 60 | #define HEADER_IDEA_H 61 | 62 | #include /* IDEA_INT, OPENSSL_NO_IDEA */ 63 | 64 | #ifdef OPENSSL_NO_IDEA 65 | #error IDEA is disabled. 66 | #endif 67 | 68 | #define IDEA_ENCRYPT 1 69 | #define IDEA_DECRYPT 0 70 | 71 | #define IDEA_BLOCK 8 72 | #define IDEA_KEY_LENGTH 16 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | typedef struct idea_key_st 79 | { 80 | IDEA_INT data[9][6]; 81 | } IDEA_KEY_SCHEDULE; 82 | 83 | const char *idea_options(void); 84 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 85 | IDEA_KEY_SCHEDULE *ks); 86 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 87 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 88 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 89 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); 90 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 92 | int *num,int enc); 93 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); 95 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: md4.h,v 1.16 2015/09/14 01:45:03 doug Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #include 60 | 61 | #ifndef HEADER_MD4_H 62 | #define HEADER_MD4_H 63 | 64 | #include 65 | 66 | #ifdef __cplusplus 67 | extern "C" { 68 | #endif 69 | 70 | #ifdef OPENSSL_NO_MD4 71 | #error MD4 is disabled. 72 | #endif 73 | 74 | /* 75 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 76 | * ! MD4_LONG has to be at least 32 bits wide. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | #define MD4_LONG unsigned int 81 | 82 | #define MD4_CBLOCK 64 83 | #define MD4_LBLOCK (MD4_CBLOCK/4) 84 | #define MD4_DIGEST_LENGTH 16 85 | 86 | typedef struct MD4state_st 87 | { 88 | MD4_LONG A,B,C,D; 89 | MD4_LONG Nl,Nh; 90 | MD4_LONG data[MD4_LBLOCK]; 91 | unsigned int num; 92 | } MD4_CTX; 93 | 94 | int MD4_Init(MD4_CTX *c); 95 | int MD4_Update(MD4_CTX *c, const void *data, size_t len); 96 | int MD4_Final(unsigned char *md, MD4_CTX *c); 97 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 98 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: md5.h,v 1.20 2014/10/20 13:06:54 bcook Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #include 60 | 61 | #ifndef HEADER_MD5_H 62 | #define HEADER_MD5_H 63 | #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) 64 | #define __bounded__(x, y, z) 65 | #endif 66 | 67 | #include 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | #ifdef OPENSSL_NO_MD5 74 | #error MD5 is disabled. 75 | #endif 76 | 77 | /* 78 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 79 | * ! MD5_LONG has to be at least 32 bits wide. ! 80 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 81 | */ 82 | 83 | #define MD5_LONG unsigned int 84 | 85 | #define MD5_CBLOCK 64 86 | #define MD5_LBLOCK (MD5_CBLOCK/4) 87 | #define MD5_DIGEST_LENGTH 16 88 | 89 | typedef struct MD5state_st 90 | { 91 | MD5_LONG A,B,C,D; 92 | MD5_LONG Nl,Nh; 93 | MD5_LONG data[MD5_LBLOCK]; 94 | unsigned int num; 95 | } MD5_CTX; 96 | 97 | int MD5_Init(MD5_CTX *c); 98 | int MD5_Update(MD5_CTX *c, const void *data, size_t len) 99 | __attribute__ ((__bounded__(__buffer__,2,3))); 100 | int MD5_Final(unsigned char *md, MD5_CTX *c); 101 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md) 102 | __attribute__ ((__bounded__(__buffer__,1,2))); 103 | void MD5_Transform(MD5_CTX *c, const unsigned char *b); 104 | #ifdef __cplusplus 105 | } 106 | #endif 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/modes.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: modes.h,v 1.2 2014/06/12 15:49:30 deraadt Exp $ */ 2 | /* ==================================================================== 3 | * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 4 | * 5 | * Rights for redistribution and usage in source and binary 6 | * forms are granted according to the OpenSSL license. 7 | */ 8 | 9 | #include 10 | 11 | typedef void (*block128_f)(const unsigned char in[16], 12 | unsigned char out[16], 13 | const void *key); 14 | 15 | typedef void (*cbc128_f)(const unsigned char *in, unsigned char *out, 16 | size_t len, const void *key, 17 | unsigned char ivec[16], int enc); 18 | 19 | typedef void (*ctr128_f)(const unsigned char *in, unsigned char *out, 20 | size_t blocks, const void *key, 21 | const unsigned char ivec[16]); 22 | 23 | typedef void (*ccm128_f)(const unsigned char *in, unsigned char *out, 24 | size_t blocks, const void *key, 25 | const unsigned char ivec[16],unsigned char cmac[16]); 26 | 27 | void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, 28 | size_t len, const void *key, 29 | unsigned char ivec[16], block128_f block); 30 | void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, 31 | size_t len, const void *key, 32 | unsigned char ivec[16], block128_f block); 33 | 34 | void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, 35 | size_t len, const void *key, 36 | unsigned char ivec[16], unsigned char ecount_buf[16], 37 | unsigned int *num, block128_f block); 38 | 39 | void CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out, 40 | size_t len, const void *key, 41 | unsigned char ivec[16], unsigned char ecount_buf[16], 42 | unsigned int *num, ctr128_f ctr); 43 | 44 | void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, 45 | size_t len, const void *key, 46 | unsigned char ivec[16], int *num, 47 | block128_f block); 48 | 49 | void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, 50 | size_t len, const void *key, 51 | unsigned char ivec[16], int *num, 52 | int enc, block128_f block); 53 | void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, 54 | size_t length, const void *key, 55 | unsigned char ivec[16], int *num, 56 | int enc, block128_f block); 57 | void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, 58 | size_t bits, const void *key, 59 | unsigned char ivec[16], int *num, 60 | int enc, block128_f block); 61 | 62 | size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, unsigned char *out, 63 | size_t len, const void *key, 64 | unsigned char ivec[16], block128_f block); 65 | size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, 66 | size_t len, const void *key, 67 | unsigned char ivec[16], cbc128_f cbc); 68 | size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, unsigned char *out, 69 | size_t len, const void *key, 70 | unsigned char ivec[16], block128_f block); 71 | size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, 72 | size_t len, const void *key, 73 | unsigned char ivec[16], cbc128_f cbc); 74 | 75 | size_t CRYPTO_nistcts128_encrypt_block(const unsigned char *in, unsigned char *out, 76 | size_t len, const void *key, 77 | unsigned char ivec[16], block128_f block); 78 | size_t CRYPTO_nistcts128_encrypt(const unsigned char *in, unsigned char *out, 79 | size_t len, const void *key, 80 | unsigned char ivec[16], cbc128_f cbc); 81 | size_t CRYPTO_nistcts128_decrypt_block(const unsigned char *in, unsigned char *out, 82 | size_t len, const void *key, 83 | unsigned char ivec[16], block128_f block); 84 | size_t CRYPTO_nistcts128_decrypt(const unsigned char *in, unsigned char *out, 85 | size_t len, const void *key, 86 | unsigned char ivec[16], cbc128_f cbc); 87 | 88 | typedef struct gcm128_context GCM128_CONTEXT; 89 | 90 | GCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block); 91 | void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx,void *key,block128_f block); 92 | void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, 93 | size_t len); 94 | int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, 95 | size_t len); 96 | int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx, 97 | const unsigned char *in, unsigned char *out, 98 | size_t len); 99 | int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, 100 | const unsigned char *in, unsigned char *out, 101 | size_t len); 102 | int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, 103 | const unsigned char *in, unsigned char *out, 104 | size_t len, ctr128_f stream); 105 | int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, 106 | const unsigned char *in, unsigned char *out, 107 | size_t len, ctr128_f stream); 108 | int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag, 109 | size_t len); 110 | void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len); 111 | void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx); 112 | 113 | typedef struct ccm128_context CCM128_CONTEXT; 114 | 115 | void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx, 116 | unsigned int M, unsigned int L, void *key,block128_f block); 117 | int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, 118 | const unsigned char *nonce, size_t nlen, size_t mlen); 119 | void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, 120 | const unsigned char *aad, size_t alen); 121 | int CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx, 122 | const unsigned char *inp, unsigned char *out, size_t len); 123 | int CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx, 124 | const unsigned char *inp, unsigned char *out, size_t len); 125 | int CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx, 126 | const unsigned char *inp, unsigned char *out, size_t len, 127 | ccm128_f stream); 128 | int CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, 129 | const unsigned char *inp, unsigned char *out, size_t len, 130 | ccm128_f stream); 131 | size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len); 132 | 133 | typedef struct xts128_context XTS128_CONTEXT; 134 | 135 | int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16], 136 | const unsigned char *inp, unsigned char *out, size_t len, int enc); 137 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* crypto/opensslconf.h.in */ 3 | 4 | #if defined(_MSC_VER) && !defined(__attribute__) 5 | #define __attribute__(a) 6 | #endif 7 | 8 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) 9 | #define OPENSSLDIR "/etc/ssl" 10 | #endif 11 | 12 | #undef OPENSSL_UNISTD 13 | #define OPENSSL_UNISTD 14 | 15 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 16 | 17 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 18 | #define IDEA_INT unsigned int 19 | #endif 20 | 21 | #if defined(HEADER_MD2_H) && !defined(MD2_INT) 22 | #define MD2_INT unsigned int 23 | #endif 24 | 25 | #if defined(HEADER_RC2_H) && !defined(RC2_INT) 26 | /* I need to put in a mod for the alpha - eay */ 27 | #define RC2_INT unsigned int 28 | #endif 29 | 30 | #if defined(HEADER_RC4_H) 31 | #if !defined(RC4_INT) 32 | /* using int types make the structure larger but make the code faster 33 | * on most boxes I have tested - up to %20 faster. */ 34 | /* 35 | * I don't know what does "most" mean, but declaring "int" is a must on: 36 | * - Intel P6 because partial register stalls are very expensive; 37 | * - elder Alpha because it lacks byte load/store instructions; 38 | */ 39 | #define RC4_INT unsigned int 40 | #endif 41 | #if !defined(RC4_CHUNK) 42 | /* 43 | * This enables code handling data aligned at natural CPU word 44 | * boundary. See crypto/rc4/rc4_enc.c for further details. 45 | */ 46 | #define RC4_CHUNK unsigned long 47 | #endif 48 | #endif 49 | 50 | #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 51 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 52 | * %20 speed up (longs are 8 bytes, int's are 4). */ 53 | #ifndef DES_LONG 54 | #define DES_LONG unsigned int 55 | #endif 56 | #endif 57 | 58 | #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 59 | #define CONFIG_HEADER_BN_H 60 | #undef BN_LLONG 61 | 62 | /* Should we define BN_DIV2W here? */ 63 | 64 | /* Only one for the following should be defined */ 65 | #define SIXTY_FOUR_BIT_LONG 66 | #undef SIXTY_FOUR_BIT 67 | #undef THIRTY_TWO_BIT 68 | #endif 69 | 70 | #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) 71 | #define CONFIG_HEADER_RC4_LOCL_H 72 | /* if this is defined data[i] is used instead of *data, this is a %20 73 | * speedup on x86 */ 74 | #undef RC4_INDEX 75 | #endif 76 | 77 | #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 78 | #define CONFIG_HEADER_BF_LOCL_H 79 | #undef BF_PTR 80 | #endif /* HEADER_BF_LOCL_H */ 81 | 82 | #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 83 | #define CONFIG_HEADER_DES_LOCL_H 84 | #ifndef DES_DEFAULT_OPTIONS 85 | /* the following is tweaked from a config script, that is why it is a 86 | * protected undef/define */ 87 | #ifndef DES_PTR 88 | #undef DES_PTR 89 | #endif 90 | 91 | /* This helps C compiler generate the correct code for multiple functional 92 | * units. It reduces register dependancies at the expense of 2 more 93 | * registers */ 94 | #ifndef DES_RISC1 95 | #undef DES_RISC1 96 | #endif 97 | 98 | #ifndef DES_RISC2 99 | #undef DES_RISC2 100 | #endif 101 | 102 | #if defined(DES_RISC1) && defined(DES_RISC2) 103 | YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 104 | #endif 105 | 106 | /* Unroll the inner loop, this sometimes helps, sometimes hinders. 107 | * Very mucy CPU dependant */ 108 | #ifndef DES_UNROLL 109 | #define DES_UNROLL 110 | #endif 111 | 112 | /* These default values were supplied by 113 | * Peter Gutman 114 | * They are only used if nothing else has been defined */ 115 | #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 116 | /* Special defines which change the way the code is built depending on the 117 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 118 | even newer MIPS CPU's, but at the moment one size fits all for 119 | optimization options. Older Sparc's work better with only UNROLL, but 120 | there's no way to tell at compile time what it is you're running on */ 121 | 122 | #if defined( sun ) /* Newer Sparc's */ 123 | # define DES_PTR 124 | # define DES_RISC1 125 | # define DES_UNROLL 126 | #elif defined( __ultrix ) /* Older MIPS */ 127 | # define DES_PTR 128 | # define DES_RISC2 129 | # define DES_UNROLL 130 | #elif defined( __osf1__ ) /* Alpha */ 131 | # define DES_PTR 132 | # define DES_RISC2 133 | #elif defined ( _AIX ) /* RS6000 */ 134 | /* Unknown */ 135 | #elif defined( __hpux ) /* HP-PA */ 136 | /* Unknown */ 137 | #elif defined( __aux ) /* 68K */ 138 | /* Unknown */ 139 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 140 | # define DES_UNROLL 141 | #elif defined( __sgi ) /* Newer MIPS */ 142 | # define DES_PTR 143 | # define DES_RISC2 144 | # define DES_UNROLL 145 | #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 146 | # define DES_PTR 147 | # define DES_RISC1 148 | # define DES_UNROLL 149 | #endif /* Systems-specific speed defines */ 150 | #endif 151 | 152 | #endif /* DES_DEFAULT_OPTIONS */ 153 | #endif /* HEADER_DES_LOCL_H */ 154 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/opensslfeatures.h: -------------------------------------------------------------------------------- 1 | # define OPENSSL_NO_EC_NISTP_64_GCC_128 2 | # define OPENSSL_NO_CMS 3 | # define OPENSSL_NO_COMP 4 | # define OPENSSL_NO_EGD 5 | # define OPENSSL_NO_GMP 6 | # define OPENSSL_NO_JPAKE 7 | # define OPENSSL_NO_KRB5 8 | # define OPENSSL_NO_MD2 9 | # define OPENSSL_NO_MDC2 10 | # define OPENSSL_NO_PSK 11 | # define OPENSSL_NO_RC5 12 | # define OPENSSL_NO_RFC3779 13 | # define OPENSSL_NO_RSAX 14 | # define OPENSSL_NO_SCTP 15 | # define OPENSSL_NO_SEED 16 | # define OPENSSL_NO_SHA0 17 | # define OPENSSL_NO_SRP 18 | # define OPENSSL_NO_SSL2 19 | # define OPENSSL_NO_SSL3 20 | # define OPENSSL_NO_SSL3_METHOD 21 | # define OPENSSL_NO_STORE 22 | # define OPENSSL_NO_BUF_FREELISTS 23 | # define OPENSSL_NO_HEARTBEATS 24 | # define OPENSSL_NO_DYNAMIC_ENGINE 25 | 26 | # define OPENSSL_THREADS 27 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: opensslv.h,v 1.39.4.3 2017/07/07 05:28:12 bcook Exp $ */ 2 | #ifndef HEADER_OPENSSLV_H 3 | #define HEADER_OPENSSLV_H 4 | 5 | /* These will change with each release of LibreSSL-portable */ 6 | #define LIBRESSL_VERSION_NUMBER 0x2050500fL 7 | #define LIBRESSL_VERSION_TEXT "LibreSSL 2.5.5" 8 | 9 | /* These will never change */ 10 | #define OPENSSL_VERSION_NUMBER 0x20000000L 11 | #define OPENSSL_VERSION_TEXT LIBRESSL_VERSION_TEXT 12 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 13 | 14 | #define SHLIB_VERSION_HISTORY "" 15 | #define SHLIB_VERSION_NUMBER "1.0.0" 16 | 17 | #endif /* HEADER_OPENSSLV_H */ 18 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: ossl_typ.h,v 1.13 2015/09/30 04:10:07 doug Exp $ */ 2 | /* ==================================================================== 3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * openssl-core@openssl.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | * This product includes cryptographic software written by Eric Young 51 | * (eay@cryptsoft.com). This product includes software written by Tim 52 | * Hudson (tjh@cryptsoft.com). 53 | * 54 | */ 55 | 56 | #ifndef HEADER_OPENSSL_TYPES_H 57 | #define HEADER_OPENSSL_TYPES_H 58 | 59 | #include 60 | 61 | typedef struct asn1_string_st ASN1_INTEGER; 62 | typedef struct asn1_string_st ASN1_ENUMERATED; 63 | typedef struct asn1_string_st ASN1_BIT_STRING; 64 | typedef struct asn1_string_st ASN1_OCTET_STRING; 65 | typedef struct asn1_string_st ASN1_PRINTABLESTRING; 66 | typedef struct asn1_string_st ASN1_T61STRING; 67 | typedef struct asn1_string_st ASN1_IA5STRING; 68 | typedef struct asn1_string_st ASN1_GENERALSTRING; 69 | typedef struct asn1_string_st ASN1_UNIVERSALSTRING; 70 | typedef struct asn1_string_st ASN1_BMPSTRING; 71 | typedef struct asn1_string_st ASN1_UTCTIME; 72 | typedef struct asn1_string_st ASN1_TIME; 73 | typedef struct asn1_string_st ASN1_GENERALIZEDTIME; 74 | typedef struct asn1_string_st ASN1_VISIBLESTRING; 75 | typedef struct asn1_string_st ASN1_UTF8STRING; 76 | typedef struct asn1_string_st ASN1_STRING; 77 | typedef int ASN1_BOOLEAN; 78 | typedef int ASN1_NULL; 79 | 80 | typedef struct ASN1_ITEM_st ASN1_ITEM; 81 | typedef struct asn1_pctx_st ASN1_PCTX; 82 | 83 | #if defined(_WIN32) && defined(__WINCRYPT_H__) 84 | #ifndef LIBRESSL_INTERNAL 85 | #ifdef _MSC_VER 86 | #pragma message("Warning, overriding WinCrypt defines") 87 | #else 88 | #warning overriding WinCrypt defines 89 | #endif 90 | #endif 91 | #undef X509_NAME 92 | #undef X509_CERT_PAIR 93 | #undef X509_EXTENSIONS 94 | #undef OCSP_REQUEST 95 | #undef OCSP_RESPONSE 96 | #undef PKCS7_ISSUER_AND_SERIAL 97 | #endif 98 | 99 | #ifdef BIGNUM 100 | #undef BIGNUM 101 | #endif 102 | typedef struct bignum_st BIGNUM; 103 | typedef struct bignum_ctx BN_CTX; 104 | typedef struct bn_blinding_st BN_BLINDING; 105 | typedef struct bn_mont_ctx_st BN_MONT_CTX; 106 | typedef struct bn_recp_ctx_st BN_RECP_CTX; 107 | typedef struct bn_gencb_st BN_GENCB; 108 | 109 | typedef struct buf_mem_st BUF_MEM; 110 | 111 | typedef struct evp_cipher_st EVP_CIPHER; 112 | typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; 113 | typedef struct env_md_st EVP_MD; 114 | typedef struct env_md_ctx_st EVP_MD_CTX; 115 | typedef struct evp_pkey_st EVP_PKEY; 116 | 117 | typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; 118 | 119 | typedef struct evp_pkey_method_st EVP_PKEY_METHOD; 120 | typedef struct evp_pkey_ctx_st EVP_PKEY_CTX; 121 | 122 | typedef struct dh_st DH; 123 | typedef struct dh_method DH_METHOD; 124 | 125 | typedef struct dsa_st DSA; 126 | typedef struct dsa_method DSA_METHOD; 127 | 128 | typedef struct rsa_st RSA; 129 | typedef struct rsa_meth_st RSA_METHOD; 130 | 131 | typedef struct rand_meth_st RAND_METHOD; 132 | 133 | typedef struct ecdh_method ECDH_METHOD; 134 | typedef struct ecdsa_method ECDSA_METHOD; 135 | 136 | typedef struct x509_st X509; 137 | typedef struct X509_algor_st X509_ALGOR; 138 | typedef struct X509_crl_st X509_CRL; 139 | typedef struct x509_crl_method_st X509_CRL_METHOD; 140 | typedef struct x509_revoked_st X509_REVOKED; 141 | typedef struct X509_name_st X509_NAME; 142 | typedef struct X509_pubkey_st X509_PUBKEY; 143 | typedef struct x509_store_st X509_STORE; 144 | typedef struct x509_store_ctx_st X509_STORE_CTX; 145 | 146 | typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO; 147 | 148 | typedef struct v3_ext_ctx X509V3_CTX; 149 | typedef struct conf_st CONF; 150 | 151 | typedef struct store_st STORE; 152 | typedef struct store_method_st STORE_METHOD; 153 | 154 | typedef struct ui_st UI; 155 | typedef struct ui_method_st UI_METHOD; 156 | 157 | typedef struct st_ERR_FNS ERR_FNS; 158 | 159 | typedef struct engine_st ENGINE; 160 | typedef struct ssl_st SSL; 161 | typedef struct ssl_ctx_st SSL_CTX; 162 | 163 | typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; 164 | typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; 165 | typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; 166 | typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; 167 | 168 | typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID; 169 | typedef struct DIST_POINT_st DIST_POINT; 170 | typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT; 171 | typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS; 172 | 173 | /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */ 174 | #define DECLARE_PKCS12_STACK_OF(type) /* Nothing */ 175 | #define IMPLEMENT_PKCS12_STACK_OF(type) /* Nothing */ 176 | 177 | typedef struct crypto_ex_data_st CRYPTO_EX_DATA; 178 | /* Callback types for crypto.h */ 179 | typedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad, 180 | int idx, long argl, void *argp); 181 | typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, 182 | int idx, long argl, void *argp); 183 | typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, 184 | void *from_d, int idx, long argl, void *argp); 185 | 186 | typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; 187 | typedef struct ocsp_response_st OCSP_RESPONSE; 188 | typedef struct ocsp_responder_id_st OCSP_RESPID; 189 | 190 | #endif /* def HEADER_OPENSSL_TYPES_H */ 191 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: pem2.h,v 1.5 2014/06/12 15:49:30 deraadt Exp $ */ 2 | /* ==================================================================== 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * licensing@OpenSSL.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | * This product includes cryptographic software written by Eric Young 51 | * (eay@cryptsoft.com). This product includes software written by Tim 52 | * Hudson (tjh@cryptsoft.com). 53 | * 54 | */ 55 | 56 | /* 57 | * This header only exists to break a circular dependency between pem and err 58 | * Ben 30 Jan 1999. 59 | */ 60 | 61 | #ifdef __cplusplus 62 | extern "C" { 63 | #endif 64 | 65 | #ifndef HEADER_PEM_H 66 | void ERR_load_PEM_strings(void); 67 | #endif 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/poly1305.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: poly1305.h,v 1.3 2014/07/25 14:04:51 jsing Exp $ */ 2 | /* 3 | * Copyright (c) 2014 Joel Sing 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #ifndef HEADER_POLY1305_H 19 | #define HEADER_POLY1305_H 20 | 21 | #include 22 | 23 | #if defined(OPENSSL_NO_POLY1305) 24 | #error Poly1305 is disabled. 25 | #endif 26 | 27 | #include 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | typedef struct poly1305_context { 34 | size_t aligner; 35 | unsigned char opaque[136]; 36 | } poly1305_context; 37 | 38 | typedef struct poly1305_context poly1305_state; 39 | 40 | void CRYPTO_poly1305_init(poly1305_context *ctx, const unsigned char key[32]); 41 | void CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in, 42 | size_t len); 43 | void CRYPTO_poly1305_finish(poly1305_context *ctx, unsigned char mac[16]); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif /* HEADER_POLY1305_H */ 50 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: rand.h,v 1.22 2014/10/22 14:02:52 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #include 60 | 61 | #ifndef HEADER_RAND_H 62 | #define HEADER_RAND_H 63 | 64 | #include 65 | 66 | #include 67 | 68 | #ifdef __cplusplus 69 | extern "C" { 70 | #endif 71 | 72 | /* Already defined in ossl_typ.h */ 73 | /* typedef struct rand_meth_st RAND_METHOD; */ 74 | 75 | struct rand_meth_st { 76 | void (*seed)(const void *buf, int num); 77 | int (*bytes)(unsigned char *buf, int num); 78 | void (*cleanup)(void); 79 | void (*add)(const void *buf, int num, double entropy); 80 | int (*pseudorand)(unsigned char *buf, int num); 81 | int (*status)(void); 82 | }; 83 | 84 | int RAND_set_rand_method(const RAND_METHOD *meth); 85 | const RAND_METHOD *RAND_get_rand_method(void); 86 | #ifndef OPENSSL_NO_ENGINE 87 | int RAND_set_rand_engine(ENGINE *engine); 88 | #endif 89 | RAND_METHOD *RAND_SSLeay(void); 90 | 91 | #ifndef LIBRESSL_INTERNAL 92 | void RAND_cleanup(void ); 93 | int RAND_bytes(unsigned char *buf, int num); 94 | int RAND_pseudo_bytes(unsigned char *buf, int num); 95 | void RAND_seed(const void *buf, int num); 96 | void RAND_add(const void *buf, int num, double entropy); 97 | int RAND_load_file(const char *file, long max_bytes); 98 | int RAND_write_file(const char *file); 99 | const char *RAND_file_name(char *file, size_t num); 100 | int RAND_status(void); 101 | int RAND_poll(void); 102 | #endif 103 | 104 | /* BEGIN ERROR CODES */ 105 | /* The following lines are auto generated by the script mkerr.pl. Any changes 106 | * made after this point may be overwritten when the script is next run. 107 | */ 108 | void ERR_load_RAND_strings(void); 109 | 110 | /* Error codes for the RAND functions. (no longer used) */ 111 | 112 | /* Function codes. */ 113 | #define RAND_F_RAND_GET_RAND_METHOD 101 114 | #define RAND_F_RAND_INIT_FIPS 102 115 | #define RAND_F_SSLEAY_RAND_BYTES 100 116 | 117 | /* Reason codes. */ 118 | #define RAND_R_DUAL_EC_DRBG_DISABLED 104 119 | #define RAND_R_ERROR_INITIALISING_DRBG 102 120 | #define RAND_R_ERROR_INSTANTIATING_DRBG 103 121 | #define RAND_R_NO_FIPS_RANDOM_METHOD_SET 101 122 | #define RAND_R_PRNG_NOT_SEEDED 100 123 | 124 | #ifdef __cplusplus 125 | } 126 | #endif 127 | #endif 128 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: rc2.h,v 1.11 2014/07/10 22:45:57 jsing Exp $ */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC2_H 60 | #define HEADER_RC2_H 61 | 62 | #include /* OPENSSL_NO_RC2, RC2_INT */ 63 | 64 | #ifdef OPENSSL_NO_RC2 65 | #error RC2 is disabled. 66 | #endif 67 | 68 | #define RC2_ENCRYPT 1 69 | #define RC2_DECRYPT 0 70 | 71 | #define RC2_BLOCK 8 72 | #define RC2_KEY_LENGTH 16 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | typedef struct rc2_key_st 79 | { 80 | RC2_INT data[64]; 81 | } RC2_KEY; 82 | 83 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 84 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, 85 | int enc); 86 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); 87 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); 88 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 89 | RC2_KEY *ks, unsigned char *iv, int enc); 90 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 91 | long length, RC2_KEY *schedule, unsigned char *ivec, 92 | int *num, int enc); 93 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, RC2_KEY *schedule, unsigned char *ivec, 95 | int *num); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: rc4.h,v 1.13 2015/10/20 15:50:13 jsing Exp $ */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC4_H 60 | #define HEADER_RC4_H 61 | 62 | #include /* OPENSSL_NO_RC4, RC4_INT */ 63 | 64 | #ifdef OPENSSL_NO_RC4 65 | #error RC4 is disabled. 66 | #endif 67 | 68 | #include 69 | 70 | #ifdef __cplusplus 71 | extern "C" { 72 | #endif 73 | 74 | typedef struct rc4_key_st { 75 | RC4_INT x, y; 76 | RC4_INT data[256]; 77 | } RC4_KEY; 78 | 79 | const char *RC4_options(void); 80 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 81 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 82 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 83 | unsigned char *outdata); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: ripemd.h,v 1.14 2014/07/10 22:45:57 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #include 60 | 61 | #ifndef HEADER_RIPEMD_H 62 | #define HEADER_RIPEMD_H 63 | 64 | #include 65 | 66 | #ifdef __cplusplus 67 | extern "C" { 68 | #endif 69 | 70 | #ifdef OPENSSL_NO_RIPEMD 71 | #error RIPEMD is disabled. 72 | #endif 73 | 74 | #if defined(__LP32__) 75 | #define RIPEMD160_LONG unsigned long 76 | #elif defined(__ILP64__) 77 | #define RIPEMD160_LONG unsigned long 78 | #define RIPEMD160_LONG_LOG2 3 79 | #else 80 | #define RIPEMD160_LONG unsigned int 81 | #endif 82 | 83 | #define RIPEMD160_CBLOCK 64 84 | #define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 85 | #define RIPEMD160_DIGEST_LENGTH 20 86 | 87 | typedef struct RIPEMD160state_st 88 | { 89 | RIPEMD160_LONG A,B,C,D,E; 90 | RIPEMD160_LONG Nl,Nh; 91 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 92 | unsigned int num; 93 | } RIPEMD160_CTX; 94 | 95 | int RIPEMD160_Init(RIPEMD160_CTX *c); 96 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 97 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 98 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, 99 | unsigned char *md); 100 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/sha.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: sha.h,v 1.21 2015/09/13 21:09:56 doug Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #include 60 | 61 | #ifndef HEADER_SHA_H 62 | #define HEADER_SHA_H 63 | #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) 64 | #define __bounded__(x, y, z) 65 | #endif 66 | 67 | #include 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | #if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA1) 74 | #error SHA is disabled. 75 | #endif 76 | 77 | /* 78 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 79 | * ! SHA_LONG has to be at least 32 bits wide. ! 80 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 81 | */ 82 | 83 | #define SHA_LONG unsigned int 84 | 85 | #define SHA_LBLOCK 16 86 | #define SHA_CBLOCK (SHA_LBLOCK*4) /* SHA treats input data as a 87 | * contiguous array of 32 bit 88 | * wide big-endian values. */ 89 | #define SHA_LAST_BLOCK (SHA_CBLOCK-8) 90 | #define SHA_DIGEST_LENGTH 20 91 | 92 | typedef struct SHAstate_st 93 | { 94 | SHA_LONG h0,h1,h2,h3,h4; 95 | SHA_LONG Nl,Nh; 96 | SHA_LONG data[SHA_LBLOCK]; 97 | unsigned int num; 98 | } SHA_CTX; 99 | 100 | #ifndef OPENSSL_NO_SHA1 101 | int SHA1_Init(SHA_CTX *c); 102 | int SHA1_Update(SHA_CTX *c, const void *data, size_t len) 103 | __attribute__ ((__bounded__(__buffer__,2,3))); 104 | int SHA1_Final(unsigned char *md, SHA_CTX *c); 105 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) 106 | __attribute__ ((__bounded__(__buffer__,1,2))); 107 | void SHA1_Transform(SHA_CTX *c, const unsigned char *data); 108 | #endif 109 | 110 | #define SHA256_CBLOCK (SHA_LBLOCK*4) /* SHA-256 treats input data as a 111 | * contiguous array of 32 bit 112 | * wide big-endian values. */ 113 | #define SHA224_DIGEST_LENGTH 28 114 | #define SHA256_DIGEST_LENGTH 32 115 | 116 | typedef struct SHA256state_st 117 | { 118 | SHA_LONG h[8]; 119 | SHA_LONG Nl,Nh; 120 | SHA_LONG data[SHA_LBLOCK]; 121 | unsigned int num,md_len; 122 | } SHA256_CTX; 123 | 124 | #ifndef OPENSSL_NO_SHA256 125 | int SHA224_Init(SHA256_CTX *c); 126 | int SHA224_Update(SHA256_CTX *c, const void *data, size_t len) 127 | __attribute__ ((__bounded__(__buffer__,2,3))); 128 | int SHA224_Final(unsigned char *md, SHA256_CTX *c); 129 | unsigned char *SHA224(const unsigned char *d, size_t n,unsigned char *md) 130 | __attribute__ ((__bounded__(__buffer__,1,2))); 131 | int SHA256_Init(SHA256_CTX *c); 132 | int SHA256_Update(SHA256_CTX *c, const void *data, size_t len) 133 | __attribute__ ((__bounded__(__buffer__,2,3))); 134 | int SHA256_Final(unsigned char *md, SHA256_CTX *c); 135 | unsigned char *SHA256(const unsigned char *d, size_t n,unsigned char *md) 136 | __attribute__ ((__bounded__(__buffer__,1,2))); 137 | void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); 138 | #endif 139 | 140 | #define SHA384_DIGEST_LENGTH 48 141 | #define SHA512_DIGEST_LENGTH 64 142 | 143 | #ifndef OPENSSL_NO_SHA512 144 | /* 145 | * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 146 | * being exactly 64-bit wide. See Implementation Notes in sha512.c 147 | * for further details. 148 | */ 149 | #define SHA512_CBLOCK (SHA_LBLOCK*8) /* SHA-512 treats input data as a 150 | * contiguous array of 64 bit 151 | * wide big-endian values. */ 152 | #if defined(_LP64) 153 | #define SHA_LONG64 unsigned long 154 | #define U64(C) C##UL 155 | #else 156 | #define SHA_LONG64 unsigned long long 157 | #define U64(C) C##ULL 158 | #endif 159 | 160 | typedef struct SHA512state_st 161 | { 162 | SHA_LONG64 h[8]; 163 | SHA_LONG64 Nl,Nh; 164 | union { 165 | SHA_LONG64 d[SHA_LBLOCK]; 166 | unsigned char p[SHA512_CBLOCK]; 167 | } u; 168 | unsigned int num,md_len; 169 | } SHA512_CTX; 170 | #endif 171 | 172 | #ifndef OPENSSL_NO_SHA512 173 | int SHA384_Init(SHA512_CTX *c); 174 | int SHA384_Update(SHA512_CTX *c, const void *data, size_t len) 175 | __attribute__ ((__bounded__(__buffer__,2,3))); 176 | int SHA384_Final(unsigned char *md, SHA512_CTX *c); 177 | unsigned char *SHA384(const unsigned char *d, size_t n,unsigned char *md) 178 | __attribute__ ((__bounded__(__buffer__,1,2))); 179 | int SHA512_Init(SHA512_CTX *c); 180 | int SHA512_Update(SHA512_CTX *c, const void *data, size_t len) 181 | __attribute__ ((__bounded__(__buffer__,2,3))); 182 | int SHA512_Final(unsigned char *md, SHA512_CTX *c); 183 | unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md) 184 | __attribute__ ((__bounded__(__buffer__,1,2))); 185 | void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); 186 | #endif 187 | 188 | #ifdef __cplusplus 189 | } 190 | #endif 191 | 192 | #endif 193 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: srtp.h,v 1.6 2015/09/01 15:18:23 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | /* ==================================================================== 59 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 60 | * 61 | * Redistribution and use in source and binary forms, with or without 62 | * modification, are permitted provided that the following conditions 63 | * are met: 64 | * 65 | * 1. Redistributions of source code must retain the above copyright 66 | * notice, this list of conditions and the following disclaimer. 67 | * 68 | * 2. Redistributions in binary form must reproduce the above copyright 69 | * notice, this list of conditions and the following disclaimer in 70 | * the documentation and/or other materials provided with the 71 | * distribution. 72 | * 73 | * 3. All advertising materials mentioning features or use of this 74 | * software must display the following acknowledgment: 75 | * "This product includes software developed by the OpenSSL Project 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 77 | * 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 79 | * endorse or promote products derived from this software without 80 | * prior written permission. For written permission, please contact 81 | * openssl-core@openssl.org. 82 | * 83 | * 5. Products derived from this software may not be called "OpenSSL" 84 | * nor may "OpenSSL" appear in their names without prior written 85 | * permission of the OpenSSL Project. 86 | * 87 | * 6. Redistributions of any form whatsoever must retain the following 88 | * acknowledgment: 89 | * "This product includes software developed by the OpenSSL Project 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 91 | * 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. 104 | * ==================================================================== 105 | * 106 | * This product includes cryptographic software written by Eric Young 107 | * (eay@cryptsoft.com). This product includes software written by Tim 108 | * Hudson (tjh@cryptsoft.com). 109 | * 110 | */ 111 | /* 112 | * DTLS code by Eric Rescorla 113 | * 114 | * Copyright (C) 2006, Network Resonance, Inc. 115 | * Copyright (C) 2011, RTFM, Inc. 116 | */ 117 | 118 | #ifndef HEADER_D1_SRTP_H 119 | #define HEADER_D1_SRTP_H 120 | 121 | #ifdef __cplusplus 122 | extern "C" { 123 | #endif 124 | 125 | #define SRTP_AES128_CM_SHA1_80 0x0001 126 | #define SRTP_AES128_CM_SHA1_32 0x0002 127 | #define SRTP_AES128_F8_SHA1_80 0x0003 128 | #define SRTP_AES128_F8_SHA1_32 0x0004 129 | #define SRTP_NULL_SHA1_80 0x0005 130 | #define SRTP_NULL_SHA1_32 0x0006 131 | 132 | int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); 133 | int SSL_set_tlsext_use_srtp(SSL *ctx, const char *profiles); 134 | 135 | STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); 136 | SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 137 | 138 | #ifdef __cplusplus 139 | } 140 | #endif 141 | 142 | #endif 143 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: ssl2.h,v 1.12 2014/12/14 15:30:50 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_SSL2_H 60 | #define HEADER_SSL2_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | /* Protocol Version Codes */ 67 | #define SSL2_VERSION 0x0002 68 | #define SSL2_VERSION_MAJOR 0x00 69 | #define SSL2_VERSION_MINOR 0x02 70 | /* #define SSL2_CLIENT_VERSION 0x0002 */ 71 | /* #define SSL2_SERVER_VERSION 0x0002 */ 72 | 73 | /* Protocol Message Codes */ 74 | #define SSL2_MT_ERROR 0 75 | #define SSL2_MT_CLIENT_HELLO 1 76 | #define SSL2_MT_CLIENT_MASTER_KEY 2 77 | #define SSL2_MT_CLIENT_FINISHED 3 78 | #define SSL2_MT_SERVER_HELLO 4 79 | #define SSL2_MT_SERVER_VERIFY 5 80 | #define SSL2_MT_SERVER_FINISHED 6 81 | #define SSL2_MT_REQUEST_CERTIFICATE 7 82 | #define SSL2_MT_CLIENT_CERTIFICATE 8 83 | 84 | /* Error Message Codes */ 85 | #define SSL2_PE_UNDEFINED_ERROR 0x0000 86 | #define SSL2_PE_NO_CIPHER 0x0001 87 | #define SSL2_PE_NO_CERTIFICATE 0x0002 88 | #define SSL2_PE_BAD_CERTIFICATE 0x0004 89 | #define SSL2_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006 90 | 91 | /* Cipher Kind Values */ 92 | #define SSL2_CK_NULL_WITH_MD5 0x02000000 /* v3 */ 93 | #define SSL2_CK_RC4_128_WITH_MD5 0x02010080 94 | #define SSL2_CK_RC4_128_EXPORT40_WITH_MD5 0x02020080 95 | #define SSL2_CK_RC2_128_CBC_WITH_MD5 0x02030080 96 | #define SSL2_CK_RC2_128_CBC_EXPORT40_WITH_MD5 0x02040080 97 | #define SSL2_CK_IDEA_128_CBC_WITH_MD5 0x02050080 98 | #define SSL2_CK_DES_64_CBC_WITH_MD5 0x02060040 99 | #define SSL2_CK_DES_64_CBC_WITH_SHA 0x02060140 /* v3 */ 100 | #define SSL2_CK_DES_192_EDE3_CBC_WITH_MD5 0x020700c0 101 | #define SSL2_CK_DES_192_EDE3_CBC_WITH_SHA 0x020701c0 /* v3 */ 102 | #define SSL2_CK_RC4_64_WITH_MD5 0x02080080 /* MS hack */ 103 | 104 | #define SSL2_CK_DES_64_CFB64_WITH_MD5_1 0x02ff0800 /* SSLeay */ 105 | #define SSL2_CK_NULL 0x02ff0810 /* SSLeay */ 106 | 107 | #define SSL2_TXT_DES_64_CFB64_WITH_MD5_1 "DES-CFB-M1" 108 | #define SSL2_TXT_NULL_WITH_MD5 "NULL-MD5" 109 | #define SSL2_TXT_RC4_128_WITH_MD5 "RC4-MD5" 110 | #define SSL2_TXT_RC4_128_EXPORT40_WITH_MD5 "EXP-RC4-MD5" 111 | #define SSL2_TXT_RC2_128_CBC_WITH_MD5 "RC2-CBC-MD5" 112 | #define SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 "EXP-RC2-CBC-MD5" 113 | #define SSL2_TXT_IDEA_128_CBC_WITH_MD5 "IDEA-CBC-MD5" 114 | #define SSL2_TXT_DES_64_CBC_WITH_MD5 "DES-CBC-MD5" 115 | #define SSL2_TXT_DES_64_CBC_WITH_SHA "DES-CBC-SHA" 116 | #define SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5 "DES-CBC3-MD5" 117 | #define SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA "DES-CBC3-SHA" 118 | #define SSL2_TXT_RC4_64_WITH_MD5 "RC4-64-MD5" 119 | 120 | #define SSL2_TXT_NULL "NULL" 121 | 122 | /* Flags for the SSL_CIPHER.algorithm2 field */ 123 | #define SSL2_CF_5_BYTE_ENC 0x01 124 | #define SSL2_CF_8_BYTE_ENC 0x02 125 | 126 | /* Certificate Type Codes */ 127 | #define SSL2_CT_X509_CERTIFICATE 0x01 128 | 129 | /* Authentication Type Code */ 130 | #define SSL2_AT_MD5_WITH_RSA_ENCRYPTION 0x01 131 | 132 | #define SSL2_MAX_SSL_SESSION_ID_LENGTH 32 133 | 134 | /* Upper/Lower Bounds */ 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 136 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 32767u /* 2^15-1 */ 137 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /* 2^14-1 */ 138 | 139 | #define SSL2_CHALLENGE_LENGTH 16 140 | /*#define SSL2_CHALLENGE_LENGTH 32 */ 141 | #define SSL2_MIN_CHALLENGE_LENGTH 16 142 | #define SSL2_MAX_CHALLENGE_LENGTH 32 143 | #define SSL2_CONNECTION_ID_LENGTH 16 144 | #define SSL2_MAX_CONNECTION_ID_LENGTH 16 145 | #define SSL2_SSL_SESSION_ID_LENGTH 16 146 | #define SSL2_MAX_CERT_CHALLENGE_LENGTH 32 147 | #define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 148 | #define SSL2_MAX_KEY_MATERIAL_LENGTH 24 149 | 150 | #ifdef __cplusplus 151 | } 152 | #endif 153 | #endif 154 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: ssl23.h,v 1.4 2014/12/14 15:30:50 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_SSL23_H 60 | #define HEADER_SSL23_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | /*client */ 67 | /* write to server */ 68 | #define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) 69 | #define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) 70 | /* read from server */ 71 | #define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) 72 | #define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) 73 | 74 | /* server */ 75 | /* read from client */ 76 | #define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) 77 | #define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: stack.h,v 1.9 2014/06/12 15:49:30 deraadt Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_STACK_H 60 | #define HEADER_STACK_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | typedef struct stack_st { 67 | int num; 68 | char **data; 69 | int sorted; 70 | 71 | int num_alloc; 72 | int (*comp)(const void *, const void *); 73 | } _STACK; /* Use STACK_OF(...) instead */ 74 | 75 | #define M_sk_num(sk) ((sk) ? (sk)->num:-1) 76 | #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) 77 | 78 | int sk_num(const _STACK *); 79 | void *sk_value(const _STACK *, int); 80 | 81 | void *sk_set(_STACK *, int, void *); 82 | 83 | _STACK *sk_new(int (*cmp)(const void *, const void *)); 84 | _STACK *sk_new_null(void); 85 | void sk_free(_STACK *); 86 | void sk_pop_free(_STACK *st, void (*func)(void *)); 87 | int sk_insert(_STACK *sk, void *data, int where); 88 | void *sk_delete(_STACK *st, int loc); 89 | void *sk_delete_ptr(_STACK *st, void *p); 90 | int sk_find(_STACK *st, void *data); 91 | int sk_find_ex(_STACK *st, void *data); 92 | int sk_push(_STACK *st, void *data); 93 | int sk_unshift(_STACK *st, void *data); 94 | void *sk_shift(_STACK *st); 95 | void *sk_pop(_STACK *st); 96 | void sk_zero(_STACK *st); 97 | int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *)))( 98 | const void *, const void *); 99 | _STACK *sk_dup(_STACK *st); 100 | void sk_sort(_STACK *st); 101 | int sk_is_sorted(const _STACK *st); 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: txt_db.h,v 1.9 2014/07/10 22:45:58 jsing Exp $ */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_TXT_DB_H 60 | #define HEADER_TXT_DB_H 61 | 62 | #include 63 | 64 | #ifndef OPENSSL_NO_BIO 65 | #include 66 | #endif 67 | #include 68 | #include 69 | 70 | #define DB_ERROR_OK 0 71 | #define DB_ERROR_MALLOC 1 72 | #define DB_ERROR_INDEX_CLASH 2 73 | #define DB_ERROR_INDEX_OUT_OF_RANGE 3 74 | #define DB_ERROR_NO_INDEX 4 75 | #define DB_ERROR_INSERT_INDEX_CLASH 5 76 | 77 | #ifdef __cplusplus 78 | extern "C" { 79 | #endif 80 | 81 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 82 | DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 83 | 84 | typedef struct txt_db_st { 85 | int num_fields; 86 | STACK_OF(OPENSSL_PSTRING) *data; 87 | LHASH_OF(OPENSSL_STRING) **index; 88 | int (**qual)(OPENSSL_STRING *); 89 | long error; 90 | long arg1; 91 | long arg2; 92 | OPENSSL_STRING *arg_row; 93 | } TXT_DB; 94 | 95 | #ifndef OPENSSL_NO_BIO 96 | TXT_DB *TXT_DB_read(BIO *in, int num); 97 | long TXT_DB_write(BIO *out, TXT_DB *db); 98 | #else 99 | TXT_DB *TXT_DB_read(char *in, int num); 100 | long TXT_DB_write(char *out, TXT_DB *db); 101 | #endif 102 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(OPENSSL_STRING *), 103 | LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); 104 | void TXT_DB_free(TXT_DB *db); 105 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value); 106 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: ui_compat.h,v 1.4 2014/06/12 15:49:31 deraadt Exp $ */ 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 3 | * project 2001. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * openssl-core@openssl.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | * 53 | * This product includes cryptographic software written by Eric Young 54 | * (eay@cryptsoft.com). This product includes software written by Tim 55 | * Hudson (tjh@cryptsoft.com). 56 | * 57 | */ 58 | 59 | #ifndef HEADER_UI_COMPAT_H 60 | #define HEADER_UI_COMPAT_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* The following functions were previously part of the DES section, 70 | and are provided here for backward compatibility reasons. */ 71 | 72 | #define des_read_pw_string(b,l,p,v) \ 73 | _ossl_old_des_read_pw_string((b),(l),(p),(v)) 74 | #define des_read_pw(b,bf,s,p,v) \ 75 | _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) 76 | 77 | int _ossl_old_des_read_pw_string(char *buf, int length, const char *prompt, int verify); 78 | int _ossl_old_des_read_pw(char *buf, char *buff, int size, const char *prompt, int verify); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif 84 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: whrlpool.h,v 1.5 2014/07/10 22:45:58 jsing Exp $ */ 2 | 3 | #include 4 | 5 | #ifndef HEADER_WHRLPOOL_H 6 | #define HEADER_WHRLPOOL_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #define WHIRLPOOL_DIGEST_LENGTH (512/8) 15 | #define WHIRLPOOL_BBLOCK 512 16 | #define WHIRLPOOL_COUNTER (256/8) 17 | 18 | typedef struct { 19 | union { 20 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 21 | /* double q is here to ensure 64-bit alignment */ 22 | double q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)]; 23 | } H; 24 | unsigned char data[WHIRLPOOL_BBLOCK/8]; 25 | unsigned int bitoff; 26 | size_t bitlen[WHIRLPOOL_COUNTER/sizeof(size_t)]; 27 | } WHIRLPOOL_CTX; 28 | 29 | #ifndef OPENSSL_NO_WHIRLPOOL 30 | int WHIRLPOOL_Init (WHIRLPOOL_CTX *c); 31 | int WHIRLPOOL_Update (WHIRLPOOL_CTX *c,const void *inp,size_t bytes); 32 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *inp,size_t bits); 33 | int WHIRLPOOL_Final (unsigned char *md,WHIRLPOOL_CTX *c); 34 | unsigned char *WHIRLPOOL(const void *inp,size_t bytes,unsigned char *md); 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libcrypto-41.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libcrypto-41.dll -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libcrypto-41.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libcrypto-41.exp -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libcrypto-41.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libcrypto-41.lib -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libssl-43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libssl-43.dll -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libssl-43.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libssl-43.exp -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libssl-43.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libssl-43.lib -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libtls-15.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libtls-15.dll -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libtls-15.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libtls-15.exp -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/libtls-15.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/libtls-15.lib -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/ocspcheck.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/ocspcheck.exe -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x64/openssl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x64/openssl.exe -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libcrypto-41.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libcrypto-41.dll -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libcrypto-41.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libcrypto-41.exp -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libcrypto-41.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libcrypto-41.lib -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libssl-43.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libssl-43.dll -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libssl-43.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libssl-43.exp -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libssl-43.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libssl-43.lib -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libtls-15.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libtls-15.dll -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libtls-15.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libtls-15.exp -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/libtls-15.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/libtls-15.lib -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/ocspcheck.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/ocspcheck.exe -------------------------------------------------------------------------------- /CDIR/libressl-2.5.5-windows/x86/openssl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/libressl-2.5.5-windows/x86/openssl.exe -------------------------------------------------------------------------------- /CDIR/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/resource.h -------------------------------------------------------------------------------- /CDIR/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : 標準インクルード CDIR.pch のみを 2 | // 含むソース ファイルは、プリコンパイル済みヘッダーになります。 3 | // stdafx.obj にはプリコンパイル済み型情報が含まれます。 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: このファイルではなく、STDAFX.H で必要な 8 | // 追加ヘッダーを参照してください。 9 | -------------------------------------------------------------------------------- /CDIR/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : 標準のシステム インクルード ファイルのインクルード ファイル、または 2 | // 参照回数が多く、かつあまり変更されない、プロジェクト専用のインクルード ファイル 3 | // を記述します。 4 | // 5 | 6 | #pragma once 7 | 8 | #define WIN32_LEAN_AND_MEAN 9 | 10 | #include "targetver.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | // TODO: プログラムに必要な追加ヘッダーをここで参照してください -------------------------------------------------------------------------------- /CDIR/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // SDKDDKVer.h をインクルードすると、利用できる最も上位の Windows プラットフォームが定義されます。 4 | 5 | // 以前の Windows プラットフォーム用にアプリケーションをビルドする場合は、WinSDKVer.h をインクルードし、 6 | // SDKDDKVer.h をインクルードする前に、サポート対象とするプラットフォームを示すように _WIN32_WINNT マクロを設定します。 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /CDIR/util.cpp: -------------------------------------------------------------------------------- 1 | #include "WriteWrapper.h" 2 | #include "globals.h" 3 | #include "util.h" 4 | 5 | #include 6 | #include 7 | 8 | void __exit(int code) { 9 | cerr << "Press Enter key to continue..." << endl; 10 | char c; 11 | cin.ignore(); 12 | cin.get(c); 13 | exit(code); 14 | } 15 | 16 | void _perror(char *msg) { 17 | char buf[1024]; 18 | DWORD ec = GetLastError(); // Error Code 19 | if (FormatMessage( 20 | FORMAT_MESSAGE_FROM_SYSTEM | 21 | FORMAT_MESSAGE_IGNORE_INSERTS, 22 | NULL, 23 | ec, 24 | MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 25 | buf, 26 | 1024, 27 | NULL) == 0) { 28 | cerr << "FormatMessage failed" << endl; 29 | } 30 | else { 31 | if (msg) 32 | cerr << msg << ": "; 33 | cerr << buf << endl; 34 | } 35 | } 36 | 37 | void mkdir(char *dirname, bool error) { 38 | WriteWrapper dir("", 0, true); 39 | 40 | if (dirname == NULL) { 41 | fprintf(stderr, "dirname must not be NULL\n"); 42 | return; 43 | } 44 | string dirname_s = string(dirname); 45 | 46 | size_t pos; 47 | if ((pos = dirname_s.find_first_of('\\')) == string::npos) { 48 | if (dir.isLocal()) { 49 | if (!CreateDirectory(dirname, NULL)) { 50 | if (error) 51 | _perror("CreateDirectory"); 52 | } 53 | } 54 | else { 55 | dir.mkdir(dirname); 56 | } 57 | dir.close(); 58 | } 59 | else { 60 | string topdir = dirname_s.substr(0, pos); 61 | string subdir = dirname_s.substr(pos + 1); 62 | mkdir((char*)topdir.c_str(), error); 63 | chdir((char*)topdir.c_str()); 64 | mkdir((char*)subdir.c_str(), error); 65 | chdir(".."); 66 | } 67 | } 68 | 69 | void chdir(char *dirname) { 70 | WriteWrapper dir("", 0, true); 71 | 72 | if (dir.isLocal()) { 73 | if (!SetCurrentDirectory(dirname)) { 74 | _perror("SetCurrentDirectory"); 75 | } 76 | } 77 | else { 78 | dir.chdir(dirname); 79 | } 80 | dir.close(); 81 | } 82 | 83 | string basename(string &path, char delim) { 84 | return path.substr(path.find_last_of(delim) + 1); 85 | } 86 | 87 | string dirname(string &path, char delim) { 88 | return path.substr(0, path.find_last_of(delim)); 89 | } 90 | 91 | string msg(string jp, string en, WORD lang) { 92 | if ((lang & 0xff) == LANG_JAPANESE) 93 | return jp; 94 | else 95 | return en; 96 | } 97 | 98 | string join(vector vs, string delim) { 99 | string ret = ""; 100 | for (size_t i = 0; i < vs.size() - 1; i++) { 101 | if (vs[i].empty()) continue; 102 | ret += vs[i] + delim; 103 | } 104 | ret += vs[vs.size() - 1]; 105 | return ret; 106 | } 107 | 108 | string hexdump(const unsigned char *s, size_t size) { 109 | if (s == NULL) 110 | return ""; 111 | ostringstream res; 112 | for (size_t i = 0; i < size; i++) { 113 | res << setw(2) << setfill('0') << hex << (unsigned int)s[i]; 114 | } 115 | return res.str(); 116 | } 117 | 118 | vector> findfiles(string filepath, bool error) { 119 | // return found file and isdir 120 | HANDLE hfind; 121 | WIN32_FIND_DATA w32fd; 122 | vector> paths; 123 | 124 | hfind = FindFirstFile(filepath.c_str(), &w32fd); 125 | 126 | if (hfind == INVALID_HANDLE_VALUE) { 127 | if (error) { 128 | _perror((char*)filepath.c_str()); 129 | } 130 | return paths; 131 | } 132 | else { 133 | do { 134 | if (!strcmp(w32fd.cFileName, ".") 135 | || !strcmp(w32fd.cFileName, "..")) 136 | continue; 137 | paths.push_back(pair((string)w32fd.cFileName, w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)); 138 | } while (FindNextFile(hfind, &w32fd)); 139 | } 140 | if (!FindClose(hfind)) { 141 | _perror("FindClose"); 142 | } 143 | 144 | return paths; 145 | } 146 | 147 | vector> findstreams(const char* cfilepath, bool error) { 148 | 149 | vector> paths; 150 | WIN32_FIND_STREAM_DATA streamData; 151 | HANDLE hfind; 152 | 153 | 154 | size_t ret; 155 | wchar_t wfilepath[MAX_PATH + 1]; 156 | 157 | mbstowcs_s(&ret, wfilepath, size_t(MAX_PATH + 1), cfilepath, _TRUNCATE); 158 | hfind = FindFirstStreamW(wfilepath, FindStreamInfoStandard, &streamData, 0); 159 | 160 | if (hfind != INVALID_HANDLE_VALUE) { 161 | do { 162 | char ads[ MAX_PATH + 1 ]; 163 | //WideCharToMultiByte(CP_ACP, 0, streamData.cStreamName, -1, mtxt, MAX_PATH, NULL, NULL); 164 | wcstombs_s(&ret, ads, size_t(MAX_PATH + 1), streamData.cStreamName, _TRUNCATE); 165 | 166 | if ( strcmp( ads, "::$DATA" ) != 0) { 167 | // trim last ":$DATA" 168 | string ads_str = string(ads).substr(0, string(ads).length() - 6); 169 | paths.push_back(pair( ads_str, 0 ) ); 170 | } 171 | } while (FindNextStreamW(hfind, &streamData)); 172 | if (!FindClose(hfind)) { 173 | _perror("FindClose"); 174 | } 175 | 176 | } 177 | 178 | return paths; 179 | } 180 | -------------------------------------------------------------------------------- /CDIR/util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | void __exit(int); 10 | void _perror(char *); 11 | void mkdir(char *, bool error=true); 12 | void chdir(char *); 13 | string basename(string &, char delim = '\\'); 14 | string dirname(string &, char delim = '\\'); 15 | string msg(string jp, string en, WORD lang = GetUserDefaultLangID()); 16 | string join(vector, string); 17 | string hexdump(const unsigned char*, size_t); 18 | vector> findfiles(string, bool error=true); 19 | vector> findstreams(const char* cfilepath, bool error = true); 20 | -------------------------------------------------------------------------------- /CDIR/winpmem_x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/winpmem_x64.exe -------------------------------------------------------------------------------- /CDIR/winpmem_x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyberDefenseInstitute/CDIR/b333b814fc3b32fe8800f73fcfd0413bf18e67fe/CDIR/winpmem_x86.exe -------------------------------------------------------------------------------- /NTFSParserDLL/NTFS.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NTFS include files 3 | * 4 | * Copyright(C) 2010 cyb70289 5 | * 6 | * This program/include file is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as published 8 | * by the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program/include file is distributed in the hope that it will be 12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | */ 16 | 17 | #ifndef __NTFS_H_CYB70289 18 | #define __NTFS_H_CYB70289 19 | 20 | #pragma pack(8) 21 | 22 | #include "NTFS_Common.h" 23 | #include "NTFS_FileRecord.h" 24 | #include "NTFS_Attribute.h" 25 | 26 | #pragma pack() 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /NTFSParserDLL/NTFSParserDLL.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright(C) 2016 Cyber Defense Institute, Inc. 3 | * 4 | * This program is modified from the following code: 5 | * 6 | * https://github.com/clymb3r/PowerShell/blob/master/Invoke-NinjaCopy/NTFSParser/NTFSParserDLL/NTFSParserDLL.cpp 7 | * 8 | * Copyright(C) 2013 Joe Bialek Twitter:@JosephBialek 9 | * 10 | * This program/include file is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as published 12 | * by the Free Software Foundation; either version 2 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program/include file is distributed in the hope that it will be 16 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 17 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | */ 20 | // 21 | // This code uses libraries released under GPLv2(or later) written by cyb70289 22 | 23 | #include "stdafx.h" 24 | #include "NTFS.h" 25 | #include "NTFS_DataType.h" 26 | 27 | 28 | using namespace std; 29 | 30 | struct FileInfo_t 31 | { 32 | CNTFSVolume* volume; 33 | CFileRecord* fileRecord; 34 | CIndexEntry* indexEntry; 35 | CAttrBase* data; 36 | }; 37 | 38 | extern "C" HANDLE __declspec(dllexport) StealthOpenFile(char* filePathCStr) 39 | { 40 | FileInfo_t* fileInfo = new FileInfo_t; 41 | string filePath = string(filePathCStr); 42 | _TCHAR volumeName = filePath.at(0); 43 | 44 | BOOL isADS = false; 45 | string ads_s; 46 | _TCHAR *ads; 47 | DWORD idx_ads; 48 | 49 | if ((idx_ads = filePath.find_first_of(':', 2)) != string::npos) { 50 | isADS = true; 51 | ads_s = filePath.substr(idx_ads + 1); 52 | ads = new _TCHAR[ads_s.size()]; 53 | filePath = filePath.substr(0, idx_ads); 54 | sprintf(ads, "%s", ads_s.c_str()); 55 | } 56 | 57 | fileInfo->volume = new CNTFSVolume(volumeName); 58 | if (!fileInfo->volume->IsVolumeOK()) 59 | { 60 | return NULL; 61 | } 62 | 63 | //Parse root directory 64 | fileInfo->fileRecord = new CFileRecord(fileInfo->volume); 65 | fileInfo->fileRecord->SetAttrMask(MASK_INDEX_ROOT | MASK_INDEX_ALLOCATION); 66 | 67 | if (!fileInfo->fileRecord->ParseFileRecord(MFT_IDX_ROOT)) 68 | { 69 | return NULL; 70 | } 71 | if (!fileInfo->fileRecord->ParseAttrs()) 72 | { 73 | return NULL; 74 | } 75 | 76 | //Find subdirectory 77 | fileInfo->indexEntry = new CIndexEntry; 78 | int dirs = filePath.find(_T('\\'), 0); 79 | int dire = filePath.find(_T('\\'), dirs+1); 80 | 81 | while (dire != string::npos) 82 | { 83 | string pathname = filePath.substr(dirs+1, dire-dirs-1); 84 | const _TCHAR* pathnameCStr = (const _TCHAR*)pathname.c_str(); 85 | if (fileInfo->fileRecord->FindSubEntry(pathnameCStr, *(fileInfo->indexEntry))) 86 | { 87 | if (!fileInfo->fileRecord->ParseFileRecord(fileInfo->indexEntry->GetFileReference())) 88 | { 89 | return NULL; 90 | } 91 | 92 | if (!fileInfo->fileRecord->ParseAttrs()) 93 | { 94 | if (fileInfo->fileRecord->IsCompressed()) 95 | { 96 | return NULL; 97 | } 98 | else if (fileInfo->fileRecord->IsEncrypted()) 99 | { 100 | return NULL; 101 | } 102 | else 103 | { 104 | return NULL; 105 | } 106 | } 107 | } 108 | else 109 | { 110 | return NULL; 111 | } 112 | 113 | 114 | dirs = dire; 115 | dire = filePath.find(_T('\\'), dirs+1); 116 | } 117 | 118 | string fileName = filePath.substr(dirs+1, filePath.size()-1); 119 | const _TCHAR* fileNameCStr = (const _TCHAR*)fileName.c_str(); 120 | if (fileInfo->fileRecord->FindSubEntry(fileNameCStr, *(fileInfo->indexEntry))) 121 | { 122 | if (!fileInfo->fileRecord->ParseFileRecord(fileInfo->indexEntry->GetFileReference())) 123 | { 124 | return NULL; 125 | } 126 | 127 | fileInfo->fileRecord->SetAttrMask(MASK_DATA); 128 | if (!fileInfo->fileRecord->ParseAttrs()) 129 | { 130 | return NULL; 131 | } 132 | 133 | if (isADS) { 134 | fileInfo->data = (CAttrBase*)fileInfo->fileRecord->FindStream(ads); 135 | } 136 | else { 137 | fileInfo->data = (CAttrBase*)fileInfo->fileRecord->FindStream(); 138 | } 139 | 140 | return fileInfo; 141 | } 142 | 143 | return NULL; 144 | } 145 | 146 | // add filesize argument 147 | extern "C" DWORD __declspec(dllexport) StealthReadFile(FileInfo_t* fileInfo, BYTE* buffer, DWORD bufferSize, ULONGLONG offset, DWORD* bytesRead, ULONGLONG* dataRemaining, ULONGLONG fileSize, ULONGLONG initializedSize) 148 | { 149 | if (fileInfo->data) 150 | { 151 | ULONGLONG dataLength = fileSize; // changed for datarun around multiple record 152 | ULONGLONG fullDataLength = dataLength; 153 | ULONGLONG validDataLength = initializedSize; 154 | 155 | dataLength = dataLength - offset; 156 | if (dataLength > bufferSize) 157 | { 158 | dataLength = bufferSize; 159 | } 160 | if (dataLength > MAXUINT32) 161 | { 162 | return 1; 163 | } 164 | 165 | DWORD len; 166 | if (fileInfo->data->ReadData(offset, buffer, (DWORD)dataLength, &len) && len == (DWORD)dataLength) 167 | { 168 | if (validDataLength < fileSize) 169 | { 170 | if (validDataLength <= offset) 171 | { 172 | std::memset(buffer, 0, sizeof(BYTE) * len); 173 | } 174 | else if (validDataLength < offset + len) 175 | { 176 | ULONGLONG offsetOfBuffer = validDataLength - offset; 177 | std::memset(buffer + offsetOfBuffer, 0, sizeof(BYTE)*size_t(bufferSize - offsetOfBuffer)); 178 | } 179 | } 180 | *bytesRead = len; 181 | *dataRemaining = fullDataLength - len - offset; 182 | return 0; //Success 183 | } 184 | else if (fileInfo->data->ReadData(offset, buffer, 1, &len)) 185 | { 186 | return 3; 187 | } 188 | return 4; 189 | } 190 | return 2; 191 | } 192 | 193 | 194 | extern "C" void __declspec(dllexport) StealthCloseFile(FileInfo_t* fileInfo) 195 | { 196 | delete (fileInfo->data); 197 | delete (fileInfo->indexEntry); 198 | delete (fileInfo->volume); 199 | delete fileInfo; 200 | } 201 | -------------------------------------------------------------------------------- /NTFSParserDLL/NTFSParserDLL.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | Header Files 41 | 42 | 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | Source Files 52 | 53 | 54 | -------------------------------------------------------------------------------- /NTFSParserDLL/NTFS_Common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NTFS Class common definitions 3 | * 4 | * Copyright(C) 2010 cyb70289 5 | * 6 | * This program/include file is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as published 8 | * by the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program/include file is distributed in the hope that it will be 12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | */ 16 | 17 | #ifndef __NTFS_COMMON_H_CYB70289 18 | #define __NTFS_COMMON_H_CYB70289 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "NTFS_DataType.h" 26 | 27 | #define ATTR_NUMS 16 // Attribute Types count 28 | #define ATTR_INDEX(at) (((at)>>4)-1) // Attribute Type to Index, eg. 0x10->0, 0x30->2 29 | #define ATTR_MASK(at) (((DWORD)1)< 77 | struct NTSLIST_ENTRY 78 | { 79 | NTSLIST_ENTRY *Next; 80 | ENTRY_TYPE *Entry; 81 | }; 82 | 83 | // List Entry Smart Pointer 84 | template 85 | class CEntrySmartPtr 86 | { 87 | public: 88 | CEntrySmartPtr(ENTRY_TYPE *ptr = NULL) 89 | { 90 | EntryPtr = ptr; 91 | } 92 | 93 | virtual ~CEntrySmartPtr() 94 | { 95 | if (EntryPtr) 96 | delete EntryPtr; 97 | } 98 | 99 | private: 100 | const ENTRY_TYPE *EntryPtr; 101 | 102 | public: 103 | __inline CEntrySmartPtr operator = (const ENTRY_TYPE* ptr) 104 | { 105 | // Delete previous pointer if allocated 106 | if (EntryPtr) 107 | delete EntryPtr; 108 | 109 | EntryPtr = ptr; 110 | 111 | return *this; 112 | } 113 | 114 | __inline const ENTRY_TYPE* operator->() const 115 | { 116 | _ASSERT(EntryPtr); 117 | return EntryPtr; 118 | } 119 | 120 | __inline BOOL IsValid() const 121 | { 122 | return EntryPtr != NULL; 123 | } 124 | }; 125 | 126 | ////////////////////////////////////// 127 | // Single list implementation 128 | ////////////////////////////////////// 129 | template 130 | class CSList 131 | { 132 | public: 133 | CSList() 134 | { 135 | ListHead = ListTail = NULL; 136 | ListCurrent = NULL; 137 | EntryCount = 0; 138 | } 139 | 140 | virtual ~CSList() 141 | { 142 | RemoveAll(); 143 | } 144 | 145 | private: 146 | int EntryCount; 147 | NTSLIST_ENTRY *ListHead; 148 | NTSLIST_ENTRY *ListTail; 149 | NTSLIST_ENTRY *ListCurrent; 150 | 151 | public: 152 | // Get entry count 153 | __inline int GetCount() const 154 | { 155 | return EntryCount; 156 | } 157 | 158 | // Insert to tail 159 | BOOL InsertEntry(ENTRY_TYPE *entry) 160 | { 161 | NTSLIST_ENTRY *le = new NTSLIST_ENTRY; 162 | if (!le) 163 | return FALSE; 164 | 165 | le->Entry = entry; 166 | le->Next = NULL; 167 | 168 | if (ListTail == NULL) 169 | ListHead = le; // Empty list 170 | else 171 | ListTail->Next = le; 172 | 173 | ListTail = le; 174 | 175 | EntryCount++; 176 | return TRUE; 177 | } 178 | 179 | // Remove all entries 180 | void RemoveAll() 181 | { 182 | while (ListHead) 183 | { 184 | ListCurrent = ListHead->Next; 185 | delete ListHead->Entry; 186 | delete ListHead; 187 | 188 | ListHead = ListCurrent; 189 | } 190 | 191 | ListHead = ListTail = NULL; 192 | ListCurrent = NULL; 193 | EntryCount = 0; 194 | } 195 | 196 | // Find first entry 197 | __inline ENTRY_TYPE *FindFirstEntry() const 198 | { 199 | ((CSList*)this)->ListCurrent = ListHead; 200 | 201 | if (ListCurrent) 202 | return ListCurrent->Entry; 203 | else 204 | return NULL; 205 | } 206 | 207 | // Find next entry 208 | __inline ENTRY_TYPE *FindNextEntry() const 209 | { 210 | if (ListCurrent) 211 | ((CSList*)this)->ListCurrent = ListCurrent->Next; 212 | 213 | if (ListCurrent) 214 | return ListCurrent->Entry; 215 | else 216 | return NULL; 217 | } 218 | 219 | // Throw all entries 220 | // Caution! All entries are just thrown without free 221 | __inline void ThrowAll() 222 | { 223 | ListHead = ListTail = NULL; 224 | ListCurrent = NULL; 225 | EntryCount = 0; 226 | } 227 | }; //CSList 228 | 229 | 230 | ////////////////////////////////////// 231 | // Stack implementation 232 | ////////////////////////////////////// 233 | template 234 | class CStack 235 | { 236 | public: 237 | CStack() 238 | { 239 | ListHead = ListTail = NULL; 240 | EntryCount = 0; 241 | } 242 | 243 | virtual ~CStack() 244 | { 245 | RemoveAll(); 246 | } 247 | 248 | private: 249 | int EntryCount; 250 | NTSLIST_ENTRY *ListHead; 251 | NTSLIST_ENTRY *ListTail; 252 | 253 | public: 254 | // Get entry count 255 | __inline int GetCount() const 256 | { 257 | return EntryCount; 258 | } 259 | 260 | // Insert to head 261 | BOOL Push(ENTRY_TYPE *entry) 262 | { 263 | NTSLIST_ENTRY *le = new NTSLIST_ENTRY; 264 | if (!le) 265 | return FALSE; 266 | 267 | le->Entry = entry; 268 | le->Next = ListHead; 269 | 270 | ListHead = le; 271 | 272 | if (ListTail == NULL) 273 | ListTail = le; // Empty list 274 | 275 | EntryCount ++; 276 | return TRUE; 277 | } 278 | 279 | // Remove from head 280 | ENTRY_TYPE* Pop() 281 | { 282 | if (ListHead == NULL) 283 | return NULL; 284 | 285 | NTSLIST_ENTRY *le = ListHead; 286 | ENTRY_TYPE *e = le->Entry; 287 | 288 | if (ListTail == ListHead) 289 | ListTail = ListHead->Next; 290 | ListHead = ListHead->Next; 291 | 292 | delete le; 293 | EntryCount --; 294 | 295 | return e; 296 | } 297 | 298 | // Remove all entries 299 | void RemoveAll() 300 | { 301 | NTSLIST_ENTRY *le; 302 | 303 | while (ListHead) 304 | { 305 | le = ListHead->Next; 306 | delete ListHead->Entry; 307 | delete ListHead; 308 | 309 | ListHead = le; 310 | } 311 | 312 | ListHead = ListTail = NULL; 313 | EntryCount = 0; 314 | } 315 | }; //CStack 316 | 317 | #endif 318 | -------------------------------------------------------------------------------- /NTFSParserDLL/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | DYNAMIC LINK LIBRARY : NTFSParserDLL Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this NTFSParserDLL DLL for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your NTFSParserDLL application. 9 | 10 | 11 | NTFSParserDLL.vcxproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | NTFSParserDLL.vcxproj.filters 18 | This is the filters file for VC++ projects generated using an Application Wizard. 19 | It contains information about the association between the files in your project 20 | and the filters. This association is used in the IDE to show grouping of files with 21 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 22 | "Source Files" filter). 23 | 24 | NTFSParserDLL.cpp 25 | This is the main DLL source file. 26 | 27 | When created, this DLL does not export any symbols. As a result, it 28 | will not produce a .lib file when it is built. If you wish this project 29 | to be a project dependency of some other project, you will either need to 30 | add code to export some symbols from the DLL so that an export library 31 | will be produced, or you can set the Ignore Input Library property to Yes 32 | on the General propert page of the Linker folder in the project's Property 33 | Pages dialog box. 34 | 35 | ///////////////////////////////////////////////////////////////////////////// 36 | Other standard files: 37 | 38 | StdAfx.h, StdAfx.cpp 39 | These files are used to build a precompiled header (PCH) file 40 | named NTFSParserDLL.pch and a precompiled types file named StdAfx.obj. 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | Other notes: 44 | 45 | AppWizard uses "TODO:" comments to indicate parts of the source code you 46 | should add to or customize. 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | -------------------------------------------------------------------------------- /NTFSParserDLL/dllmain.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright(C) 2013 Joe Bialek Twitter:@JosephBialek 4 | * 5 | * This program/include file is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License as published 7 | * by the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program/include file is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | */ 15 | // 16 | // This code uses libraries released under GPLv2(or later) written by cyb70289 17 | 18 | // dllmain.cpp : Defines the entry point for the DLL application. 19 | #include "stdafx.h" 20 | 21 | BOOL APIENTRY DllMain( HMODULE hModule, 22 | DWORD ul_reason_for_call, 23 | LPVOID lpReserved 24 | ) 25 | { 26 | switch (ul_reason_for_call) 27 | { 28 | case DLL_PROCESS_ATTACH: 29 | case DLL_THREAD_ATTACH: 30 | case DLL_THREAD_DETACH: 31 | case DLL_PROCESS_DETACH: 32 | break; 33 | } 34 | return TRUE; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /NTFSParserDLL/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // NTFSParserDLL.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /NTFSParserDLL/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | // Windows Header Files: 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | 18 | // TODO: reference additional headers your program requires here 19 | -------------------------------------------------------------------------------- /NTFSParserDLL/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cdir-collector 2 | 3 | [English](README_en.md) 4 | 5 | cdir-collectorは初動対応時のデータ保全を支援するためのツールです。Windows PC上の以下のデータを取得することが可能です。 6 | 7 | * メモリ 8 | * NTFS 9 | * $MFT 10 | * $SECURE:$SDS 11 | * $UsnJrnl:$J 12 | * プリフェッチ 13 | * イベントログ 14 | * レジストリ 15 | * Amcache.hve 16 | * SAM, SECURITY, SOFTWARE, SYSTEM 17 | * NTUser.dat, UsrClass.dat 18 | * WMI 19 | * SRUM 20 | * Web 21 | * History (Chrome) 22 | * cookies.sqlite, places.sqlite (Firefox) 23 | * WebCacheV01.dat (IE, Edge) 24 | * History (Edge) 25 | * Windows.old フォルダ内の上記データ (フォルダが存在する場合) 26 | 27 | ## ダウンロード 28 | 29 | バイナリ版は以下から入手可能です。 30 | 31 | https://github.com/CyberDefenseInstitute/CDIR/releases 32 | 33 | ## ビルド 34 | 35 | ソースコードはVisual Studio 2022で読み込みビルドすることができます。cdir-collectorの構成ファイルは以下の通りです。 36 | 37 | * cdir.ini 38 | * cdir-collector.exe 39 | * NTFSParserDLL.dll 40 | * libcrypto-41.dll 41 | * libssl-43.dll 42 | * winpmem_x64.exe 43 | * winpmem_x86.exe 44 | 45 | ## 使い方 46 | 47 | cdir-collector.exeを含む関連ファイル一式をUSBメモリやファイルサーバ上に配置してから実行することを想定しています。cdir-collector.exeをダブルクリックして実行してください。実行には管理者権限が必要です。実行場所に"コンピュータ名_年月日時分秒"フォルダを作成し、そのフォルダ配下にデータを保存します。 48 | 49 | cdir.iniファイルを編集することにより、それぞれのデータを取得する、しないを切り替えることができます。 50 | 51 | ## サードパーティ 52 | 53 | cdir-collectorは以下のライブラリ、ツールを活用しています。 54 | 55 | * ライブラリ: NTFSParserDLL, LibreSSL 56 | * ツール: winpmem 57 | 58 | winpmem_x64.exe、winpmem_x86.exeはWinPmemプロジェクト (https://github.com/Velocidex/WinPmem) で提供されているWindows用のメモリ保全プログラムです。 59 | -------------------------------------------------------------------------------- /README_en.md: -------------------------------------------------------------------------------- 1 | # cdir-collector 2 | 3 | [Japanese](README.md) 4 | 5 | cdir-collector is a collection tool for first response. it collects the following data on Windows. 6 | 7 | * RAM 8 | * NTFS 9 | * $MFT 10 | * $SECURE:$SDS 11 | * $UsnJrnl:$J 12 | * Prefetch 13 | * EventLog 14 | * Registry 15 | * Amcache.hve 16 | * SAM, SECURITY, SOFTWARE, SYSTEM 17 | * NTUser.dat, UsrClass.dat 18 | * WMI 19 | * SRUM 20 | * Web 21 | * History (Chrome) 22 | * cookies.sqlite, places.sqlite (Firefox) 23 | * WebCacheV01.dat (IE, Edge) 24 | * History (Edge) 25 | * Windows.old (if this folder exists) 26 | 27 | ## Download 28 | 29 | Binary is available on the following link. 30 | 31 | https://github.com/CyberDefenseInstitute/CDIR/releases 32 | 33 | ## Build 34 | 35 | If you want to customise and build binary from source code, try to use Visual Studio 2022. 36 | 37 | Component of cdir-collector: 38 | * cdir.ini 39 | * cdir-collector.exe 40 | * NTFSParserDLL.dll 41 | * libcrypto-41.dll 42 | * libssl-43.dll 43 | * winpmem_x64.exe 44 | * winpmem_x86.exe 45 | 46 | ## How to use 47 | 48 | All of component files place into USB stick or file server, then double-click cdir-collector.exe. cdir-collector requires administrative privilege. 49 | It creates "COMPUTERNAME_YYYYMMDDhhmmss" folder then collected data are stored on this folder. 50 | 51 | If you edit cdir.ini, you can switch the acquisition of each data type. 52 | 53 | ## Third Party 54 | 55 | cdir-collector depends on the following library/tools. 56 | 57 | * Library: NTFSParserDLL, LibreSSL 58 | * Tool: winpmem 59 | 60 | winpmem_x64.exe and winpmem_x86.exe are parts of winpmem project (https://github.com/Velocidex/WinPmem). 61 | --------------------------------------------------------------------------------