Commit d36f1ec8 authored by Harin Vadodaria's avatar Harin Vadodaria

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.
parent ab8bd02b
/* /*
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 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 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, ...@@ -790,7 +790,10 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
strncpy(name, path, MAX_PATH - 1 - HALF_PATH); strncpy(name, path, MAX_PATH - 1 - HALF_PATH);
strncat(name, "/", 1); strncat(name, "/", 1);
strncat(name, entry->d_name, HALF_PATH); 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)) if (S_ISREG(buf.st_mode))
ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA); ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
......
/* /*
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 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 it under the terms of the GNU General Public License as published by
...@@ -294,8 +294,8 @@ private: ...@@ -294,8 +294,8 @@ private:
byte* signature_; byte* signature_;
char issuer_[ASN_NAME_MAX]; // Names char issuer_[ASN_NAME_MAX]; // Names
char subject_[ASN_NAME_MAX]; // Names char subject_[ASN_NAME_MAX]; // Names
char beforeDate_[MAX_DATE_SZ]; // valid before date char beforeDate_[MAX_DATE_SZ+1]; // valid before date, +null term
char afterDate_[MAX_DATE_SZ]; // valid after date char afterDate_[MAX_DATE_SZ+1]; // valid after date, +null term
bool verify_; // Default to yes, but could be off bool verify_; // Default to yes, but could be off
void ReadHeader(); void ReadHeader();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment