(fix) added safety checks in S/MIME (fixes #4745)
parent
0bb24430e0
commit
29f5357a2c
1
NEWS
1
NEWS
|
@ -25,6 +25,7 @@ Bug fixes
|
||||||
- [core] avoid generating broken DTSTART for the freebusy.ifb file (#4289)
|
- [core] avoid generating broken DTSTART for the freebusy.ifb file (#4289)
|
||||||
- [core] consider DAVx5 like Apple Calendar (#4304)
|
- [core] consider DAVx5 like Apple Calendar (#4304)
|
||||||
- [core] improve handling of signer certificate (#4742)
|
- [core] improve handling of signer certificate (#4742)
|
||||||
|
- [core] added safety checks in S/MIME (#4745)
|
||||||
|
|
||||||
4.0.7 (2019-02-27)
|
4.0.7 (2019-02-27)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
//
|
//
|
||||||
- (NSData *) signUsingCertificateAndKey: (NSData *) theData
|
- (NSData *) signUsingCertificateAndKey: (NSData *) theData
|
||||||
{
|
{
|
||||||
NSData *output;
|
NSData *output = NULL;
|
||||||
|
|
||||||
BIO *tbio = NULL, *sbio = NULL, *obio = NULL;
|
BIO *tbio = NULL, *sbio = NULL, *obio = NULL;
|
||||||
X509 *scert = NULL;
|
X509 *scert = NULL;
|
||||||
|
@ -65,7 +65,6 @@
|
||||||
|
|
||||||
OpenSSL_add_all_algorithms();
|
OpenSSL_add_all_algorithms();
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
output = nil;
|
|
||||||
|
|
||||||
bytes = [theData bytes];
|
bytes = [theData bytes];
|
||||||
len = [theData length];
|
len = [theData length];
|
||||||
|
@ -128,7 +127,7 @@
|
||||||
//
|
//
|
||||||
- (NSData *) encryptUsingCertificate: (NSData *) theData
|
- (NSData *) encryptUsingCertificate: (NSData *) theData
|
||||||
{
|
{
|
||||||
NSData *output;
|
NSData *output = NULL;
|
||||||
|
|
||||||
BUF_MEM *bptr = NULL;
|
BUF_MEM *bptr = NULL;
|
||||||
BIO *tbio = NULL, *sbio = NULL, *obio = NULL;
|
BIO *tbio = NULL, *sbio = NULL, *obio = NULL;
|
||||||
|
@ -215,7 +214,7 @@
|
||||||
//
|
//
|
||||||
- (NSData *) decryptUsingCertificate: (NSData *) theData
|
- (NSData *) decryptUsingCertificate: (NSData *) theData
|
||||||
{
|
{
|
||||||
NSData *output;
|
NSData *output = NULL;
|
||||||
|
|
||||||
BIO *tbio, *sbio, *obio;
|
BIO *tbio, *sbio, *obio;
|
||||||
BUF_MEM *bptr;
|
BUF_MEM *bptr;
|
||||||
|
@ -311,7 +310,7 @@
|
||||||
//
|
//
|
||||||
- (NSData *) convertPKCS12ToPEMUsingPassword: (NSString *) thePassword
|
- (NSData *) convertPKCS12ToPEMUsingPassword: (NSString *) thePassword
|
||||||
{
|
{
|
||||||
NSData *output;
|
NSData *output = NULL;
|
||||||
|
|
||||||
BIO *ibio, *obio;
|
BIO *ibio, *obio;
|
||||||
EVP_PKEY *pkey;
|
EVP_PKEY *pkey;
|
||||||
|
@ -326,7 +325,6 @@
|
||||||
|
|
||||||
OpenSSL_add_all_algorithms();
|
OpenSSL_add_all_algorithms();
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
output = nil;
|
|
||||||
|
|
||||||
bytes = [self bytes];
|
bytes = [self bytes];
|
||||||
len = [self length];
|
len = [self length];
|
||||||
|
@ -383,7 +381,7 @@
|
||||||
//
|
//
|
||||||
- (NSData *) signersFromPKCS7
|
- (NSData *) signersFromPKCS7
|
||||||
{
|
{
|
||||||
NSData *output;
|
NSData *output = NULL;
|
||||||
|
|
||||||
STACK_OF(X509) *certs = NULL;
|
STACK_OF(X509) *certs = NULL;
|
||||||
BIO *ibio, *obio;
|
BIO *ibio, *obio;
|
||||||
|
|
Loading…
Reference in New Issue