diff --git a/.gitignore b/.gitignore
index 4387b74..c1421ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,10 +9,10 @@ __history
*.stat
TestData/.rnd
*.pem
-*.txt
*.certcry
*.keycry
.rnd
TestData/*.cnf
TestData/*.p7m
TestData/TestPKCS7-out.pdf
+Packages/12.0AthensAndAbove/37.0
diff --git a/Packages/10.3Rio/OpenSSL.dpk b/Packages/10.3Rio/OpenSSL.dpk
index 91d5c55..fcb4bc6 100644
--- a/Packages/10.3Rio/OpenSSL.dpk
+++ b/Packages/10.3Rio/OpenSSL.dpk
@@ -41,6 +41,7 @@ contains
OpenSSL.libeay32 in '..\..\Source\OpenSSL.libeay32.pas',
OpenSSL.RandUtils in '..\..\Source\OpenSSL.RandUtils.pas',
OpenSSL.RSAUtils in '..\..\Source\OpenSSL.RSAUtils.pas',
- OpenSSL.SMIMEUtils in '..\..\Source\OpenSSL.SMIMEUtils.pas';
+ OpenSSL.SMIMEUtils in '..\..\Source\OpenSSL.SMIMEUtils.pas',
+ OpenSSL.CMSHeaders in '..\..\Source\OpenSSL.CMSHeaders.pas';
end.
diff --git a/Packages/10.3Rio/OpenSSL.dproj b/Packages/10.3Rio/OpenSSL.dproj
index 7f7e3e7..ceae955 100644
--- a/Packages/10.3Rio/OpenSSL.dproj
+++ b/Packages/10.3Rio/OpenSSL.dproj
@@ -2,7 +2,7 @@
{4D944443-DB16-471B-BCD5-AE06947E67E3}
OpenSSL.dpk
- 18.5
+ 18.8
None
True
Debug
@@ -92,6 +92,7 @@
+
Cfg_2
Base
@@ -119,7 +120,7 @@
-
+
OpenSSL.bpl
true
@@ -174,12 +175,20 @@
classes
1
+
+ classes
+ 1
+
res\xml
1
+
+ res\xml
+ 1
+
@@ -192,12 +201,26 @@
library\lib\armeabi
1
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
library\lib\mips
1
+
+ library\lib\mips
+ 1
+
@@ -205,84 +228,216 @@
library\lib\armeabi-v7a
1
+
+ library\lib\arm64-v8a
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
res\drawable
1
+
+ res\drawable
+ 1
+
res\values
1
+
+ res\values
+ 1
+
res\values-v21
1
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
res\drawable
1
+
+ res\drawable
+ 1
+
res\drawable-xxhdpi
1
+
+ res\drawable-xxhdpi
+ 1
+
res\drawable-ldpi
1
+
+ res\drawable-ldpi
+ 1
+
res\drawable-mdpi
1
+
+ res\drawable-mdpi
+ 1
+
res\drawable-hdpi
1
+
+ res\drawable-hdpi
+ 1
+
res\drawable-xhdpi
1
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
res\drawable-small
1
+
+ res\drawable-small
+ 1
+
res\drawable-normal
1
+
+ res\drawable-normal
+ 1
+
res\drawable-large
1
+
+ res\drawable-large
+ 1
+
res\drawable-xlarge
1
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
@@ -352,6 +507,9 @@
0
+
+ 0
+
0
@@ -382,6 +540,17 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -393,6 +562,39 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -404,6 +606,61 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -415,6 +672,116 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -448,10 +815,35 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
+
+ 1
+
@@ -495,6 +887,10 @@
library\lib\armeabi-v7a
1
+
+ library\lib\arm64-v8a
+ 1
+
1
@@ -517,6 +913,12 @@
0
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
1
@@ -554,6 +956,7 @@
+
True
diff --git a/Packages/10.4Sydney/OpenSSL.dpk b/Packages/10.4Sydney/OpenSSL.dpk
new file mode 100644
index 0000000..fac9b73
--- /dev/null
+++ b/Packages/10.4Sydney/OpenSSL.dpk
@@ -0,0 +1,47 @@
+package OpenSSL;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'Delphi OpenSSL Wrapper'}
+{$LIBSUFFIX '270'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ IndySystem,
+ IndyProtocols,
+ IndyCore;
+
+contains
+ OpenSSL.Core in '..\..\Source\OpenSSL.Core.pas',
+ OpenSSL.EncUtils in '..\..\Source\OpenSSL.EncUtils.pas',
+ OpenSSL.libeay32 in '..\..\Source\OpenSSL.libeay32.pas',
+ OpenSSL.RandUtils in '..\..\Source\OpenSSL.RandUtils.pas',
+ OpenSSL.RSAUtils in '..\..\Source\OpenSSL.RSAUtils.pas',
+ OpenSSL.SMIMEUtils in '..\..\Source\OpenSSL.SMIMEUtils.pas',
+ OpenSSL.CMSHeaders in '..\..\Source\OpenSSL.CMSHeaders.pas';
+
+end.
diff --git a/Packages/10.4Sydney/OpenSSL.dproj b/Packages/10.4Sydney/OpenSSL.dproj
new file mode 100644
index 0000000..8c5b45b
--- /dev/null
+++ b/Packages/10.4Sydney/OpenSSL.dproj
@@ -0,0 +1,954 @@
+
+
+ {4D944443-DB16-471B-BCD5-AE06947E67E3}
+ OpenSSL.dpk
+ 19.2
+ None
+ True
+ Debug
+ Win32
+ 1
+ Package
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_1
+ true
+ true
+
+
+ true
+ Base
+ true
+
+
+ Delphi OpenSSL Wrapper
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ 1040
+ OpenSSL
+ 270
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ true
+ true
+ ../../Lib/$(DLLSUFFIX)/$(Platform)/$(Config)
+ .\$(Platform)\$(Config)
+ false
+ false
+ false
+ false
+ false
+ true
+
+
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ rtl;IndySystem;IndyProtocols;IndyCore;$(DCC_UsePackage)
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)
+ Debug
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
+ 1033
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+ true
+ true
+ true
+
+
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)
+ 1033
+ true
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ 0
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ OpenSSL.dpk
+
+
+ DBExpress Enterprise Data Explorer Integration
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+
+
+
+ true
+
+
+
+
+ OpenSSL.bpl
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 1
+
+
+ classes
+ 1
+
+
+
+
+ res\xml
+ 1
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+ library\lib\mips
+ 1
+
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ False
+
+
+ 12
+
+
+
+
+
diff --git a/Packages/10.4Sydney/OpenSSL.res b/Packages/10.4Sydney/OpenSSL.res
new file mode 100644
index 0000000..d65fdc7
Binary files /dev/null and b/Packages/10.4Sydney/OpenSSL.res differ
diff --git a/Packages/11.0Alexandria/OpenSSL.dpk b/Packages/11.0Alexandria/OpenSSL.dpk
new file mode 100644
index 0000000..ed0ea43
--- /dev/null
+++ b/Packages/11.0Alexandria/OpenSSL.dpk
@@ -0,0 +1,47 @@
+package OpenSSL;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'Delphi OpenSSL Wrapper'}
+{$LIBSUFFIX '280'}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ IndySystem,
+ IndyProtocols,
+ IndyCore;
+
+contains
+ OpenSSL.Core in '..\..\Source\OpenSSL.Core.pas',
+ OpenSSL.EncUtils in '..\..\Source\OpenSSL.EncUtils.pas',
+ OpenSSL.libeay32 in '..\..\Source\OpenSSL.libeay32.pas',
+ OpenSSL.RandUtils in '..\..\Source\OpenSSL.RandUtils.pas',
+ OpenSSL.RSAUtils in '..\..\Source\OpenSSL.RSAUtils.pas',
+ OpenSSL.SMIMEUtils in '..\..\Source\OpenSSL.SMIMEUtils.pas',
+ OpenSSL.CMSHeaders in '..\..\Source\OpenSSL.CMSHeaders.pas';
+
+end.
diff --git a/Packages/11.0Alexandria/OpenSSL.dproj b/Packages/11.0Alexandria/OpenSSL.dproj
new file mode 100644
index 0000000..ce26cd5
--- /dev/null
+++ b/Packages/11.0Alexandria/OpenSSL.dproj
@@ -0,0 +1,987 @@
+
+
+ {4D944443-DB16-471B-BCD5-AE06947E67E3}
+ OpenSSL.dpk
+ 19.3
+ None
+ True
+ Debug
+ Win32
+ 1
+ Package
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_1
+ true
+ true
+
+
+ true
+ Base
+ true
+
+
+ Delphi OpenSSL Wrapper
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ 1040
+ OpenSSL
+ 280
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ true
+ true
+ ../../Lib/$(DLLSUFFIX)/$(Platform)/$(Config)
+ .\$(Platform)\$(Config)
+ false
+ false
+ false
+ false
+ false
+ true
+
+
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ rtl;IndySystem;IndyProtocols;IndyCore;$(DCC_UsePackage)
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)
+ Debug
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
+ 1033
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+ true
+ true
+ true
+
+
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)
+ 1033
+ true
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ 0
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+ Cfg_2
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ OpenSSL.dpk
+
+
+ DBExpress Enterprise Data Explorer Integration
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ OpenSSL.bpl
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 64
+
+
+ classes
+ 64
+
+
+
+
+ classes
+ 1
+
+
+ classes
+ 1
+
+
+
+
+ res\xml
+ 1
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+ library\lib\mips
+ 1
+
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ False
+
+
+ 12
+
+
+
+
+
diff --git a/Packages/11.0Alexandria/OpenSSL.res b/Packages/11.0Alexandria/OpenSSL.res
new file mode 100644
index 0000000..d65fdc7
Binary files /dev/null and b/Packages/11.0Alexandria/OpenSSL.res differ
diff --git a/Packages/12.0AthensAndAbove/OpenSSL.dpk b/Packages/12.0AthensAndAbove/OpenSSL.dpk
new file mode 100644
index 0000000..79c1fe4
--- /dev/null
+++ b/Packages/12.0AthensAndAbove/OpenSSL.dpk
@@ -0,0 +1,47 @@
+package OpenSSL;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO OFF}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'Delphi OpenSSL Wrapper'}
+{$LIBSUFFIX AUTO}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ IndySystem,
+ IndyProtocols,
+ IndyCore;
+
+contains
+ OpenSSL.Core in '..\..\Source\OpenSSL.Core.pas',
+ OpenSSL.EncUtils in '..\..\Source\OpenSSL.EncUtils.pas',
+ OpenSSL.libeay32 in '..\..\Source\OpenSSL.libeay32.pas',
+ OpenSSL.RandUtils in '..\..\Source\OpenSSL.RandUtils.pas',
+ OpenSSL.RSAUtils in '..\..\Source\OpenSSL.RSAUtils.pas',
+ OpenSSL.SMIMEUtils in '..\..\Source\OpenSSL.SMIMEUtils.pas',
+ OpenSSL.CMSHeaders in '..\..\Source\OpenSSL.CMSHeaders.pas';
+
+end.
diff --git a/Packages/12.0AthensAndAbove/OpenSSL.dproj b/Packages/12.0AthensAndAbove/OpenSSL.dproj
new file mode 100644
index 0000000..c885507
--- /dev/null
+++ b/Packages/12.0AthensAndAbove/OpenSSL.dproj
@@ -0,0 +1,1032 @@
+
+
+ {4D944443-DB16-471B-BCD5-AE06947E67E3}
+ OpenSSL.dpk
+ 20.3
+ None
+ True
+ Debug
+ Win32
+ 1
+ Package
+ OpenSSL
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_1
+ true
+ true
+
+
+ true
+ Base
+ true
+
+
+ Delphi OpenSSL Wrapper
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ 1040
+ OpenSSL
+ $(Auto)
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ true
+ true
+ ../../Lib/$(DLLSUFFIX)/$(Platform)/$(Config)
+ .\$(Platform)\$(Config)
+ false
+ false
+ false
+ false
+ false
+ true
+
+
+ 1033
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ rtl;IndySystem;IndyProtocols;IndyCore;$(DCC_UsePackage)
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)
+ Debug
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
+ 1033
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)
+ Debug
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
+ 1033
+ true
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+ true
+ true
+ true
+
+
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)
+ 1033
+ true
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ 0
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+ Cfg_2
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ OpenSSL.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ res\xml
+ 1
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-anydpi-v21
+ 1
+
+
+ res\drawable-anydpi-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values-v31
+ 1
+
+
+ res\values-v31
+ 1
+
+
+
+
+ res\values-v35
+ 1
+
+
+ res\values-v35
+ 1
+
+
+
+
+ res\drawable-anydpi-v26
+ 1
+
+
+ res\drawable-anydpi-v26
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-anydpi-v33
+ 1
+
+
+ res\drawable-anydpi-v33
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-night-v21
+ 1
+
+
+ res\values-night-v21
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable-anydpi-v24
+ 1
+
+
+ res\drawable-anydpi-v24
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-night-anydpi-v21
+ 1
+
+
+ res\drawable-night-anydpi-v21
+ 1
+
+
+
+
+ res\drawable-anydpi-v31
+ 1
+
+
+ res\drawable-anydpi-v31
+ 1
+
+
+
+
+ res\drawable-night-anydpi-v31
+ 1
+
+
+ res\drawable-night-anydpi-v31
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ False
+ False
+
+
+ 12
+
+
+
+
+
diff --git a/Packages/12.0AthensAndAbove/OpenSSL.res b/Packages/12.0AthensAndAbove/OpenSSL.res
new file mode 100644
index 0000000..22f419c
Binary files /dev/null and b/Packages/12.0AthensAndAbove/OpenSSL.res differ
diff --git a/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.dfm b/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.dfm
index 5bb2c7b..51dc70f 100644
--- a/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.dfm
+++ b/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.dfm
@@ -22,10 +22,18 @@ object UnpackPKCS7Frame: TUnpackPKCS7Frame
Anchors = [akLeft, akTop, akRight]
Caption = 'Output file:'
end
+ object lblCertFile: TLabel
+ Left = 5
+ Top = 73
+ Width = 35
+ Height = 13
+ Anchors = [akLeft, akTop, akRight]
+ Caption = 'CA file:'
+ end
object edtInputFileName: TEdit
Left = 60
Top = 16
- Width = 380
+ Width = 374
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
@@ -34,16 +42,16 @@ object UnpackPKCS7Frame: TUnpackPKCS7Frame
object edtOutputFileName: TEdit
Left = 60
Top = 43
- Width = 380
+ Width = 374
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
- Text = 'edtInputFileName'
+ Text = 'edtOutputFileName'
end
object btnUnpack: TButton
AlignWithMargins = True
Left = 3
- Top = 70
+ Top = 102
Width = 431
Height = 25
Caption = 'Unpack'
@@ -52,7 +60,7 @@ object UnpackPKCS7Frame: TUnpackPKCS7Frame
end
object chkVerify: TCheckBox
Left = 3
- Top = 120
+ Top = 152
Width = 182
Height = 17
Caption = 'Verify (no output data provided)'
@@ -62,7 +70,7 @@ object UnpackPKCS7Frame: TUnpackPKCS7Frame
end
object chkNoVerify: TCheckBox
Left = 221
- Top = 112
+ Top = 144
Width = 213
Height = 33
Caption =
@@ -73,4 +81,13 @@ object UnpackPKCS7Frame: TUnpackPKCS7Frame
TabOrder = 4
WordWrap = True
end
+ object edtCertFileName: TEdit
+ Left = 60
+ Top = 70
+ Width = 374
+ Height = 21
+ Anchors = [akLeft, akTop, akRight]
+ TabOrder = 5
+ Text = 'edtCertFileName'
+ end
end
diff --git a/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.pas b/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.pas
index b96057b..1888037 100644
--- a/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.pas
+++ b/Samples/SSLDemo/SSLDemo.UnpackPKCS7Frame.pas
@@ -15,6 +15,8 @@ TUnpackPKCS7Frame = class(TFrame)
btnUnpack: TButton;
chkVerify: TCheckBox;
chkNoVerify: TCheckBox;
+ edtCertFileName: TEdit;
+ lblCertFile: TLabel;
procedure btnUnpackClick(Sender: TObject);
private
{ Private declarations }
@@ -33,7 +35,6 @@ implementation
procedure TUnpackPKCS7Frame.btnUnpackClick(Sender: TObject);
var
SMIME: TSMIMEUtil;
- Verify: Integer;
InputStream, OutputStream: TMemoryStream;
begin
SMIME := TSMIMEUtil.Create;
@@ -41,17 +42,20 @@ procedure TUnpackPKCS7Frame.btnUnpackClick(Sender: TObject);
OutputStream := TMemoryStream.Create;
try
InputStream.LoadFromFile(edtInputFileName.Text);
- Verify := SMIME.Decrypt(InputStream, OutputStream, chkVerify.Checked, chkNoVerify.Checked);
-
- if chkVerify.Checked then
+ if not SMIME.Decrypt(InputStream, OutputStream, AnsiString(edtCertFileName.Text), chkVerify.Checked, chkNoVerify.Checked) then
begin
- if Verify = 1 then
- ShowMessage('Verification Successfull')
- else
- ShowMessage('Verification Failure')
+ if chkVerify.Checked
+ then ShowMessage('Verification Failure')
+ else ShowMessage('Extraction Failure');
+ Exit;
end;
OutputStream.SaveToFile(edtOutputFileName.Text);
+
+ if chkVerify.Checked
+ then ShowMessage('Verification Successfull')
+ else ShowMessage('Extraction Successfull');
+
ShellExecute(Handle, 'open', PChar(edtOutputFileName.Text), '', '', SW_SHOWDEFAULT);
finally
InputStream.Free;
@@ -68,6 +72,7 @@ constructor TUnpackPKCS7Frame.Create(AOwner: TComponent);
TestFolder := StringReplace(ExtractFilePath(ParamStr(0)), 'Samples\SSLDemo', 'TestData', [rfReplaceAll, rfIgnoreCase]);
edtInputFileName.Text := TestFolder + 'TestPKCS7.pdf.p7m';
edtOutputFileName.Text := TestFolder + 'TestPKCS7-out.pdf';
+ edtCertFileName.Text := TestFolder + 'TestPKCS7-cert.pem';
end;
end.
diff --git a/Samples/SSLDemo/SSLDemo.dpr b/Samples/SSLDemo/SSLDemo.dpr
index 8db6c8f..50b1d1a 100644
--- a/Samples/SSLDemo/SSLDemo.dpr
+++ b/Samples/SSLDemo/SSLDemo.dpr
@@ -35,7 +35,8 @@ uses
SSLDemo.RandFrame in 'SSLDemo.RandFrame.pas' {RandomFrame: TFrame},
SSLDemo.UnpackPKCS7Frame in 'SSLDemo.UnpackPKCS7Frame.pas' {UnpackPKCS7Frame: TFrame},
OpenSSL.RandUtils in '..\..\Source\OpenSSL.RandUtils.pas',
- SSLDemo.KeyPairFrame in 'SSLDemo.KeyPairFrame.pas' {KeyPairFrame: TFrame};
+ SSLDemo.KeyPairFrame in 'SSLDemo.KeyPairFrame.pas' {KeyPairFrame: TFrame},
+ OpenSSL.CMSHeaders in '..\..\Source\OpenSSL.CMSHeaders.pas';
{$R *.res}
diff --git a/Samples/SSLDemo/SSLDemo.dproj b/Samples/SSLDemo/SSLDemo.dproj
index dd3e519..5a646f6 100644
--- a/Samples/SSLDemo/SSLDemo.dproj
+++ b/Samples/SSLDemo/SSLDemo.dproj
@@ -7,7 +7,7 @@
1
Application
VCL
- 18.5
+ 18.8
Win32
@@ -115,6 +115,7 @@
dfm
TFrame
+
Cfg_2
Base
@@ -159,7 +160,6 @@
1
- Contents\MacOS
0
@@ -168,12 +168,20 @@
classes
1
+
+ classes
+ 1
+
res\xml
1
+
+ res\xml
+ 1
+
@@ -186,12 +194,26 @@
library\lib\armeabi
1
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
library\lib\mips
1
+
+ library\lib\mips
+ 1
+
@@ -199,84 +221,216 @@
library\lib\armeabi-v7a
1
+
+ library\lib\arm64-v8a
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
res\drawable
1
+
+ res\drawable
+ 1
+
res\values
1
+
+ res\values
+ 1
+
res\values-v21
1
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
res\drawable
1
+
+ res\drawable
+ 1
+
res\drawable-xxhdpi
1
+
+ res\drawable-xxhdpi
+ 1
+
res\drawable-ldpi
1
+
+ res\drawable-ldpi
+ 1
+
res\drawable-mdpi
1
+
+ res\drawable-mdpi
+ 1
+
res\drawable-hdpi
1
+
+ res\drawable-hdpi
+ 1
+
res\drawable-xhdpi
1
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
res\drawable-small
1
+
+ res\drawable-small
+ 1
+
res\drawable-normal
1
+
+ res\drawable-normal
+ 1
+
res\drawable-large
1
+
+ res\drawable-large
+ 1
+
res\drawable-xlarge
1
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
@@ -296,6 +450,11 @@
1
.framework
+
+ Contents\MacOS
+ 1
+ .framework
+
0
@@ -318,6 +477,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.dll;.bpl
@@ -341,6 +505,11 @@
1
.dylib
+
+ Contents\MacOS
+ 1
+ .dylib
+
0
.bpl
@@ -350,6 +519,9 @@
0
+
+ 0
+
0
@@ -363,6 +535,10 @@
Contents\Resources\StartUp\
0
+
+ Contents\Resources\StartUp\
+ 0
+
0
@@ -378,6 +554,17 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -389,6 +576,39 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -400,6 +620,61 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -411,6 +686,116 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
@@ -444,10 +829,35 @@
1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
1
+
+ 1
+
@@ -510,24 +920,40 @@
..\
1
+
+ ..\
+ 1
+
Contents
1
+
+ Contents
+ 1
+
Contents\Resources
1
+
+ Contents\Resources
+ 1
+
library\lib\armeabi-v7a
1
+
+ library\lib\arm64-v8a
+ 1
+
1
@@ -544,10 +970,20 @@
Contents\MacOS
1
+
+ Contents\MacOS
+ 1
+
0
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
1
@@ -585,6 +1021,7 @@
+
12
diff --git a/Samples/SSLDemo/SSLDemo.res b/Samples/SSLDemo/SSLDemo.res
index e918c5f..e81b523 100644
Binary files a/Samples/SSLDemo/SSLDemo.res and b/Samples/SSLDemo/SSLDemo.res differ
diff --git a/Source/OpenSSL.CMSHeaders.pas b/Source/OpenSSL.CMSHeaders.pas
new file mode 100644
index 0000000..0c38e68
--- /dev/null
+++ b/Source/OpenSSL.CMSHeaders.pas
@@ -0,0 +1,165 @@
+unit OpenSSL.CMSHeaders;
+
+interface
+
+uses
+ IdSSLOpenSSLHeaders, idCTypes;
+
+type
+ {$IFDEF DEBUG_SAFESTACK}
+ {$EXTERNALSYM STACK_OF_CMS_CertificateChoices}
+ STACK_OF_CMS_CertificateChoices = record
+ _stack: STACK;
+ end;
+ {$EXTERNALSYM PSTACK_OF_CMS_CertificateChoices}
+ PSTACK_OF_CMS_CertificateChoices = ^STACK_OF_CMS_CertificateChoices;
+
+ {$EXTERNALSYM PSTACK_OF_CMS_RevocationInfoChoice}
+ PSTACK_OF_CMS_RevocationInfoChoice = ^STACK_OF_CMS_RevocationInfoChoice;
+ {$EXTERNALSYM STACK_OF_CMS_RevocationInfoChoice}
+ STACK_OF_CMS_RevocationInfoChoice = record
+ _stack: STACK;
+ end;
+
+ {$EXTERNALSYM PSTACK_OF_CMS_RecipientInfo}
+ PSTACK_OF_CMS_RecipientInfo = ^STACK_OF_CMS_RecipientInfo;
+ {$EXTERNALSYM STACK_OF_CMS_RecipientInfo}
+ STACK_OF_CMS_RecipientInfo = record
+ _stack: STACK;
+ end;
+ {$ELSE}
+ {$EXTERNALSYM PSTACK_OF_CMS_CertificateChoices}
+ PSTACK_OF_CMS_CertificateChoices = PSTACK;
+ {$EXTERNALSYM PSTACK_OF_CMS_RevocationInfoChoice}
+ PSTACK_OF_CMS_RevocationInfoChoice = PSTACK;
+ {$EXTERNALSYM PSTACK_OF_CMS_RecipientInfo}
+ PSTACK_OF_CMS_RecipientInfo = PSTACK;
+ {$ENDIF}
+
+ {$EXTERNALSYM PCMS_EncapsulatedContentInfo}
+ PCMS_EncapsulatedContentInfo = ^CMS_EncapsulatedContentInfo;
+ {$EXTERNALSYM CMS_EncapsulatedContentInfo}
+ CMS_EncapsulatedContentInfo = record
+ eContentType: PASN1_OBJECT;
+ eContent: PASN1_OCTET_STRING;
+ // Set to 1 if incomplete structure only part set up
+ partial: TIdC_INT;
+ end;
+
+ {$EXTERNALSYM PCMS_SignedData}
+ PCMS_SignedData = ^CMS_SignedData;
+ {$EXTERNALSYM CMS_SignedData}
+ CMS_SignedData = record
+ version: TIdC_INT32;
+ digestAlgorithms: PSTACK_OF_X509_ALGOR;
+ encapContentInfo: PCMS_EncapsulatedContentInfo;
+ certificates: PSTACK_OF_CMS_CertificateChoices;
+ crls: PSTACK_OF_CMS_RevocationInfoChoice;
+ signerInfos: PSTACK_OF_CMS_SignerInfo;
+ end;
+
+ {$EXTERNALSYM PCMS_OriginatorInfo}
+ PCMS_OriginatorInfo = ^CMS_OriginatorInfo;
+ {$EXTERNALSYM CMS_OriginatorInfo}
+ CMS_OriginatorInfo = record
+ certificates: PSTACK_OF_CMS_CertificateChoices;
+ crls: PSTACK_OF_CMS_RevocationInfoChoice;
+ end;
+
+ {$EXTERNALSYM PCMS_EncryptedContentInfo}
+ PCMS_EncryptedContentInfo = ^CMS_EncryptedContentInfo;
+ {$EXTERNALSYM CMS_EncryptedContentInfo}
+ CMS_EncryptedContentInfo = record
+ contentType: PASN1_OBJECT;
+ contentEncryptionAlgorithm: PX509_ALGOR;
+ encryptedContent: PASN1_OCTET_STRING;
+ // Content encryption algorithm and key
+ cipher: PEVP_CIPHER; //const ?
+ key: PAnsiChar;
+ keylen: NativeUInt; //size_t in C
+ //Set to 1 if we are debugging decrypt and don't fake keys for MMA
+ debug: TIdC_INT;
+ // Set to 1 if we have no cert and need extra safety measures for MMA
+ havenocert: TIdC_INT;
+ end;
+
+ {$EXTERNALSYM PCMS_EnvelopedData}
+ PCMS_EnvelopedData = ^CMS_EnvelopedData;
+ {$EXTERNALSYM CMS_EnvelopedData}
+ CMS_EnvelopedData = record
+ version: TIdC_INT32;
+ originatorInfo: PCMS_OriginatorInfo;
+ recipientInfos: PSTACK_OF_CMS_RecipientInfo;
+ encryptedContentInfo: PCMS_EncryptedContentInfo;
+ unprotectedAttrs: PSTACK_OF_X509_ATTRIBUTE;
+ end;
+
+ {$EXTERNALSYM PCMS_DigestedData}
+ PCMS_DigestedData = ^CMS_DigestedData;
+ {$EXTERNALSYM CMS_DigestedData}
+ CMS_DigestedData = record
+ version: TIdC_INT32;
+ digestAlgorithm: PX509_ALGOR;
+ encapContentInfo: PCMS_EncapsulatedContentInfo;
+ digest: PASN1_OCTET_STRING;
+ end;
+
+ {$EXTERNALSYM PCMS_EncryptedData}
+ PCMS_EncryptedData = ^CMS_EncryptedData;
+ {$EXTERNALSYM CMS_EncryptedData}
+ CMS_EncryptedData = record
+ version: TIdC_INT32;
+ encryptedContentInfo: PCMS_EncryptedContentInfo;
+ unprotectedAttrs: PSTACK_OF_X509_ATTRIBUTE;
+ end;
+
+ {$EXTERNALSYM PCMS_AuthenticatedData}
+ PCMS_AuthenticatedData = ^CMS_AuthenticatedData;
+ {$EXTERNALSYM CMS_AuthenticatedData}
+ CMS_AuthenticatedData = record
+ version: TIdC_INT32;
+ originatorInfo: PCMS_OriginatorInfo;
+ recipientInfos: PSTACK_OF_CMS_RecipientInfo;
+ macAlgorithm: PX509_ALGOR;
+ digestAlgorithm: PX509_ALGOR;
+ encapContentInfo: PCMS_EncapsulatedContentInfo;
+ authAttrs: PSTACK_OF_X509_ATTRIBUTE;
+ mac: PASN1_OCTET_STRING;
+ unauthAttrs: PSTACK_OF_X509_ATTRIBUTE;
+ end;
+
+ {$EXTERNALSYM PCMS_CompressedData}
+ PCMS_CompressedData = ^CMS_CompressedData;
+ {$EXTERNALSYM CMS_CompressedData}
+ CMS_CompressedData = record
+ version: TIdC_INT32;
+ compressionAlgorithm: PX509_ALGOR;
+ recipientInfos: PSTACK_OF_CMS_RecipientInfo;
+ encapContentInfo: PCMS_EncapsulatedContentInfo;
+ end;
+
+ {$EXTERNALSYM CMS_ContentInfo_union}
+ CMS_ContentInfo_union = record
+ case Integer of
+ 0 : (data: PASN1_OCTET_STRING);
+ 1 : (signedData: PCMS_SignedData);
+ 2 : (envelopedData: PCMS_EnvelopedData);
+ 3 : (digestedData: PCMS_DigestedData);
+ 4 : (encryptedData: PCMS_EncryptedData);
+ 5 : (authenticatedData: PCMS_AuthenticatedData);
+ 6 : (compressedData: PCMS_CompressedData);
+ 7 : (other: PASN1_TYPE);
+ 8 : (otherData: Pointer);
+ end;
+
+ {$EXTERNALSYM PCMS_ContentInfo}
+ PCMS_ContentInfo = ^CMS_ContentInfo;
+ {$EXTERNALSYM CMS_ContentInfo}
+ CMS_ContentInfo = record
+ contentType: PASN1_OBJECT;
+ d: CMS_ContentInfo_union;
+ end;
+
+implementation
+
+end.
diff --git a/Source/OpenSSL.Core.pas b/Source/OpenSSL.Core.pas
index bba9246..7a1cf70 100644
--- a/Source/OpenSSL.Core.pas
+++ b/Source/OpenSSL.Core.pas
@@ -2,7 +2,7 @@
{ }
{ Delphi OPENSSL Library }
{ Copyright (c) 2016 Luca Minuti }
-{ https://bitbucket.org/lminuti/delphi-openssl }
+{ https://github.com/lminuti/Delphi-OpenSSL }
{ }
{******************************************************************************}
{ }
diff --git a/Source/OpenSSL.EncUtils.pas b/Source/OpenSSL.EncUtils.pas
index 517fc14..f3f241f 100644
--- a/Source/OpenSSL.EncUtils.pas
+++ b/Source/OpenSSL.EncUtils.pas
@@ -2,7 +2,7 @@
{ }
{ Delphi OPENSSL Library }
{ Copyright (c) 2016 Luca Minuti }
-{ https://bitbucket.org/lminuti/delphi-openssl }
+{ https://github.com/lminuti/Delphi-OpenSSL }
{ }
{******************************************************************************}
{ }
diff --git a/Source/OpenSSL.RSAUtils.pas b/Source/OpenSSL.RSAUtils.pas
index a2be13c..7bb400a 100644
--- a/Source/OpenSSL.RSAUtils.pas
+++ b/Source/OpenSSL.RSAUtils.pas
@@ -2,7 +2,7 @@
{ }
{ Delphi OPENSSL Library }
{ Copyright (c) 2016 Luca Minuti }
-{ https://bitbucket.org/lminuti/delphi-openssl }
+{ https://github.com/lminuti/Delphi-OpenSSL }
{ }
{******************************************************************************}
{ }
diff --git a/Source/OpenSSL.RandUtils.pas b/Source/OpenSSL.RandUtils.pas
index 61a4e38..fd8899d 100644
--- a/Source/OpenSSL.RandUtils.pas
+++ b/Source/OpenSSL.RandUtils.pas
@@ -2,7 +2,7 @@
{ }
{ Delphi OPENSSL Library }
{ Copyright (c) 2018 Luca Minuti }
-{ https://bitbucket.org/lminuti/delphi-openssl }
+{ https://github.com/lminuti/Delphi-OpenSSL }
{ }
{******************************************************************************}
{ }
diff --git a/Source/OpenSSL.SMIMEUtils.pas b/Source/OpenSSL.SMIMEUtils.pas
index 2a97537..5ab26d8 100644
--- a/Source/OpenSSL.SMIMEUtils.pas
+++ b/Source/OpenSSL.SMIMEUtils.pas
@@ -2,7 +2,7 @@
{ }
{ Delphi OPENSSL Library }
{ Copyright (c) 2016 Luca Minuti }
-{ https://bitbucket.org/lminuti/delphi-openssl }
+{ https://github.com/lminuti/Delphi-OpenSSL }
{ }
{******************************************************************************}
{ }
@@ -29,37 +29,45 @@ interface
uses
System.Classes, System.SysUtils,
- OpenSSL.libeay32, OpenSSL.Core, IdSSLOpenSSLHeaders;
+ OpenSSL.libeay32, OpenSSL.Core, OpenSSL.CMSHeaders, IdSSLOpenSSLHeaders;
type
TSMIMEUtil = class(TOpenSLLBase)
public
- function Decrypt(InputStream, OutputStream :TStream; Verify, NoVerify: Boolean): Integer;
+ function Decrypt(InputStream, OutputStream: TStream; const CAfile: AnsiString; Verify, NoVerify: Boolean): Boolean;
+ class function Extract(InputStream, OutputStream: TStream): Boolean;
+ class function Verify(InputStream, OutputStream: TStream; const CAfile: AnsiString = ''): Boolean;
end;
implementation
{ TSMIMEUtil }
-function TSMIMEUtil.Decrypt(InputStream, OutputStream: TStream; Verify, NoVerify: Boolean): Integer;
+function TSMIMEUtil.Decrypt(InputStream, OutputStream: TStream;
+ const CAfile: AnsiString; Verify, NoVerify: Boolean): Boolean;
+const
+ BSIZE = 1024*8;
var
LInput, LOutput, LContent: PBIO;
- LPKCS7: PPKCS7;
+ LCMS_ContentInfo: PCMS_ContentInfo;
LStore: PX509_STORE;
LCerts: PSTACK_OF_X509;
LFlags, LOutputLen: Integer;
LOutputBuffer, LInputBuffer: TBytes;
begin
+ Result := False;
+
+ if not Assigned(InputStream)
+ then Exit; //raise?
- Result := 0;
LFlags := 0;
- if NoVerify then
- LFlags := PKCS7_NOVERIFY;
+ if NoVerify
+ then LFlags := CMS_NOVERIFY;
LContent := nil;
LCerts := nil;
LInput := nil;
LOutput := nil;
- LStore := X509_STORE_new();
+ LStore := nil;
try
SetLength(LInputBuffer, InputStream.Size);
InputStream.ReadBuffer(LInputBuffer[0], InputStream.Size);
@@ -68,10 +76,10 @@ function TSMIMEUtil.Decrypt(InputStream, OutputStream: TStream; Verify, NoVerify
if not Assigned(LInput) then
RaiseOpenSSLError('BIO_new_file');
- LPKCS7 := nil;
- LPKCS7 := d2i_PKCS7_bio(LInput, LPKCS7);
+ LCMS_ContentInfo := nil;
+ LCMS_ContentInfo := d2i_CMS_bio(LInput, LCMS_ContentInfo);
- if not Assigned(LPKCS7) then
+ if not Assigned(LCMS_ContentInfo) then
RaiseOpenSSLError('FSMIME_read_PKCS7');
LOutput := BIO_new(BIO_s_mem());
@@ -80,21 +88,80 @@ function TSMIMEUtil.Decrypt(InputStream, OutputStream: TStream; Verify, NoVerify
if Verify then
begin
- Result := PKCS7_verify(LPKCS7, LCerts, LStore, LContent, LOutput, LFlags);
+ LStore := X509_STORE_new();
+ if (not NoVerify)and(CAfile <> '') then
+ begin
+ if X509_STORE_load_locations(LStore, PAnsiChar(CAfile), nil) = 0
+ then RaiseOpenSSLError('X509_STORE_load_locations');
+ end;
- if Assigned(LOutput) and Assigned(OutputStream) then
+ if CMS_verify(LCMS_ContentInfo, LCerts, LStore, LContent, LOutput, LFlags) > 0 then
begin
LOutputLen := LOutput.num_write;
+ if LOutputLen < 0
+ then RaiseOpenSSLError('CMS_verify');
+ if LOutputLen = 0
+ then Exit;
SetLength(LOutputBuffer, LOutputLen);
BIO_read(LOutput, LOutputBuffer, LOutputLen);
-
- OutputStream.WriteBuffer(LOutputBuffer, LOutputLen);
+ if Assigned(OutputStream)
+ then OutputStream.WriteBuffer(LOutputBuffer, LOutputLen);
+ Result := True;
+ end;
+ end else
+ begin
+ LContent := CMS_dataInit(LCMS_ContentInfo, nil);
+ if Assigned(LContent) then
+ begin
+ SetLength(LOutputBuffer, BSIZE);
+ while ((BIO_pending(LContent) > 0)or(BIO_eof(LContent) = 0)) do
+ begin
+ LOutputLen := BIO_read(LContent, LOutputBuffer, BSIZE);
+ if LOutputLen < 0
+ then RaiseOpenSSLError('BIO_read');
+ if LOutputLen = 0
+ then Break;
+ if Assigned(OutputStream)
+ then OutputStream.WriteBuffer(LOutputBuffer, LOutputLen);
+ Result := True;
+ end;
end;
end;
finally
BIO_free(LInput);
BIO_free(LOutput);
BIO_free(LContent);
+ CMS_free(LCMS_ContentInfo);
+ X509_STORE_free(LStore);
+ end;
+end;
+
+class function TSMIMEUtil.Extract(InputStream, OutputStream: TStream): Boolean;
+begin
+ try
+ with TSMIMEUtil.Create do
+ try
+ Result := Decrypt(InputStream, OutputStream, '', False, False);
+ finally
+ Free;
+ end;
+ except
+ Result := False;
+ end;
+end;
+
+class function TSMIMEUtil.Verify(InputStream, OutputStream: TStream;
+ const CAfile: AnsiString): Boolean;
+begin
+ try
+ with TSMIMEUtil.Create do
+ try
+ Result := Decrypt(InputStream, OutputStream, CAfile, True, CAfile = '');
+ finally
+ Free;
+ end;
+ except
+ Result := False;
end;
end;
diff --git a/Source/OpenSSL.libeay32.pas b/Source/OpenSSL.libeay32.pas
index 752588f..df203e5 100644
--- a/Source/OpenSSL.libeay32.pas
+++ b/Source/OpenSSL.libeay32.pas
@@ -2,7 +2,7 @@
{ }
{ Delphi OPENSSL Library }
{ Copyright (c) 2016 Luca Minuti }
-{ https://bitbucket.org/lminuti/delphi-openssl }
+{ https://github.com/lminuti/Delphi-OpenSSL }
{ }
{******************************************************************************}
{ }
@@ -24,10 +24,34 @@
interface
uses
- System.Classes, System.SysUtils, IdSSLOpenSSLHeaders, IdSSLOpenSSL;
+ System.Classes, System.SysUtils, OpenSSL.CMSHeaders, IdSSLOpenSSLHeaders, IdSSLOpenSSL;
const
{ S/MIME related flags }
+ CMS_TEXT = $1;
+ CMS_NOCERTS = $2;
+ CMS_NO_CONTENT_VERIFY = $4;
+ CMS_NO_ATTR_VERIFY = $8;
+ CMS_NOSIGS = CMS_NO_CONTENT_VERIFY or CMS_NO_ATTR_VERIFY;
+ CMS_NOINTERN = $10;
+ CMS_NO_SIGNER_CERT_VERIFY = $20;
+ CMS_NOVERIFY = $20;
+ CMS_DETACHED = $40;
+ CMS_BINARY = $80;
+ CMS_NOATTR = $100;
+ CMS_NOSMIMECAP = $200;
+ CMS_NOOLDMIMETYPE = $400;
+ CMS_CRLFEOL = $800;
+ CMS_STREAM = $1000;
+ CMS_NOCRL = $2000;
+ CMS_PARTIAL = $4000;
+ CMS_REUSE_DIGEST = $8000;
+ CMS_USE_KEYID = $10000;
+ CMS_DEBUG_DECRYPT = $20000;
+ CMS_KEY_PARAM = $40000;
+ CMS_ASCIICRLF = $80000;
+ CMS_CADES = $100000;
+
PKCS7_TEXT = $1;
PKCS7_NOCERTS = $2;
PKCS7_NOSIGS = $4;
@@ -78,7 +102,12 @@ interface
d2i_PKCS7_bio: function(bp: PBIO; var pkcs7: PPKCS7): PPKCS7; cdecl;
PKCS7_verify: function(p7: PPKCS7; certs: PSTACK_OF_X509; store: PX509_STORE; indata, outdata: PBIO; flags: Integer): Integer cdecl;
+ d2i_CMS_bio: function(bp: PBIO; var cms: PCMS_ContentInfo): PCMS_ContentInfo; cdecl;
+ CMS_verify: function(cms: PCMS_ContentInfo; certs: PSTACK_OF_X509; store: PX509_STORE; indata, outdata: PBIO; flags: Integer): Integer cdecl;
+ CMS_dataInit: function(cms: PCMS_ContentInfo; bp: PBIO): PBIO cdecl;
+ CMS_free: procedure(cms: PCMS_ContentInfo) cdecl;
X509_STORE_new: function(): PX509_STORE; cdecl;
+ X509_STORE_free: procedure(v: PX509_STORE); cdecl;
RAND_bytes : function (buf: PAnsiChar; num: Integer): Integer cdecl;
RAND_pseudo_bytes : function (buf: PAnsiChar; num: Integer): Integer cdecl;
@@ -161,7 +190,12 @@ procedure ResetFuncPointers;
d2i_PKCS7_bio := nil;
PKCS7_verify := nil;
+ d2i_CMS_bio := nil;
+ CMS_verify := nil;
+ CMS_dataInit := nil;
+ CMS_free := nil;
X509_STORE_new := nil;
+ X509_STORE_free := nil;
RAND_bytes := nil;
RAND_pseudo_bytes := nil;
RAND_status := nil;
@@ -198,7 +232,13 @@ function LoadOpenSSLLibraryEx :Boolean;
d2i_PKCS7_bio := GetProcAddress(hSSL, 'd2i_PKCS7_bio');
PKCS7_verify := GetProcAddress(hSSL, 'PKCS7_verify');
+ d2i_CMS_bio := GetProcAddress(hSSL, 'd2i_CMS_bio');
+ CMS_verify := GetProcAddress(hSSL, 'CMS_verify');
+ CMS_dataInit := GetProcAddress(hSSL, 'CMS_dataInit');
+ CMS_free := GetProcAddress(hSSL, 'CMS_ContentInfo_free');
X509_STORE_new := GetProcAddress(hSSL, 'X509_STORE_new');
+ X509_STORE_free := GetProcAddress(hSSL, 'X509_STORE_free');
+
RAND_bytes := GetProcAddress(hSSL, 'RAND_bytes');
RAND_pseudo_bytes := GetProcAddress(hSSL, 'RAND_pseudo_bytes');
RAND_status := GetProcAddress(hSSL, 'RAND_status');
diff --git a/version.txt b/version.txt
new file mode 100644
index 0000000..d052810
--- /dev/null
+++ b/version.txt
@@ -0,0 +1,2 @@
+DelphiOpenSSL: 1.0.39
+2025-09-23
\ No newline at end of file