mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 08:45:33 +02:00
Bug#17201924 and Bug#18178997 : YASSL:MISSING CLOSEDIR()
IN
SSL_CTX_LOAD_VERIFY_
LOCATIONS()
and
OFF-BY-ONE PROBLEM IN
VOID CERTDECODER::
GETDATE(DATETYPE DT)
IN ASN.CPP
Description : Fixes corner cases in yassl code.
Refer to bug page for details.
This commit is contained in:
parent
9ffebd765a
commit
a4d12749df
2 changed files with 9 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -790,7 +790,10 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
|
|||
strncpy(name, path, MAX_PATH - 1 - HALF_PATH);
|
||||
strncat(name, "/", 1);
|
||||
strncat(name, entry->d_name, HALF_PATH);
|
||||
if (stat(name, &buf) < 0) return SSL_BAD_STAT;
|
||||
if (stat(name, &buf) < 0) {
|
||||
closedir(dir);
|
||||
return SSL_BAD_STAT;
|
||||
}
|
||||
|
||||
if (S_ISREG(buf.st_mode))
|
||||
ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -294,9 +294,9 @@ private:
|
|||
byte* signature_;
|
||||
char issuer_[ASN_NAME_MAX]; // Names
|
||||
char subject_[ASN_NAME_MAX]; // Names
|
||||
char beforeDate_[MAX_DATE_SZ]; // valid before date
|
||||
char afterDate_[MAX_DATE_SZ]; // valid after date
|
||||
bool verify_; // Default to yes, but could be off
|
||||
char beforeDate_[MAX_DATE_SZ+1]; // valid before date, +null term
|
||||
char afterDate_[MAX_DATE_SZ+1]; // valid after date, +null term
|
||||
bool verify_; // Default to yes, but could be off
|
||||
|
||||
void ReadHeader();
|
||||
void Decode(SignerList*, CertType);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue