~andersk/ubuntu/oneiric/openssl/spurious-reboot

« back to all changes in this revision

Viewing changes to crypto/asn1/a_utctm.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-05-01 23:51:53 UTC
  • mfrom: (11.1.20 sid)
  • Revision ID: james.westby@ubuntu.com-20110501235153-bjcxitndquaezb68
Tags: 1.0.0d-2ubuntu1
* Resynchronise with Debian (LP: #675566).  Remaining changes:
  - debian/libssl1.0.0.postinst:
    + Display a system restart required notification bubble on libssl1.0.0
      upgrade.
    + Use a different priority for libssl1.0.0/restart-services depending
      on whether a desktop, or server dist-upgrade is being performed.
  - debian/{libssl1.0.0-udeb.dirs, control, rules}: Create
    libssl1.0.0-udeb, for the benefit of wget-udeb (no wget-udeb package
    in Debian).
  - debian/{libcrypto1.0.0-udeb.dirs, libssl1.0.0.dirs, libssl1.0.0.files,
    rules}: Move runtime libraries to /lib, for the benefit of
    wpasupplicant.
  - debian/patches/aesni.patch: Backport Intel AES-NI support, now from
    http://rt.openssl.org/Ticket/Display.html?id=2065 rather than the
    0.9.8 variant.
  - debian/patches/Bsymbolic-functions.patch: Link using
    -Bsymbolic-functions.
  - debian/patches/perlpath-quilt.patch: Don't change perl #! paths under
    .pc.
  - debian/rules:
    + Don't run 'make test' when cross-building.
    + Use host compiler when cross-building.  Patch from Neil Williams.
    + Don't build for processors no longer supported: i486, i586 (on
      i386), v8 (on sparc).
    + Fix Makefile to properly clean up libs/ dirs in clean target.
    + Replace duplicate files in the doc directory with symlinks.
* Update architectures affected by Bsymbolic-functions.patch.
* Drop debian/patches/no-sslv2.patch; Debian now adds the 'no-ssl2'
  configure option, which compiles out SSLv2 support entirely, so this is
  no longer needed.
* Drop openssl-doc in favour of the libssl-doc package introduced by
  Debian.  Add Conflicts/Replaces until the next LTS release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
 
115
115
int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
116
116
        {
117
 
        static int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
118
 
        static int max[8]={99,12,31,23,59,59,12,59};
 
117
        static const int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
 
118
        static const int max[8]={99,12,31,23,59,59,12,59};
119
119
        char *a;
120
120
        int n,i,l,o;
121
121
 
186
186
 
187
187
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
188
188
        {
 
189
        return ASN1_UTCTIME_adj(s, t, 0, 0);
 
190
        }
 
191
 
 
192
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
 
193
                                int offset_day, long offset_sec)
 
194
        {
189
195
        char *p;
190
196
        struct tm *ts;
191
197
        struct tm data;
200
206
        if (ts == NULL)
201
207
                return(NULL);
202
208
 
 
209
        if (offset_day || offset_sec)
 
210
                { 
 
211
                if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec))
 
212
                        return NULL;
 
213
                }
 
214
 
 
215
        if((ts->tm_year < 50) || (ts->tm_year >= 150))
 
216
                return NULL;
 
217
 
203
218
        p=(char *)s->data;
204
219
        if ((p == NULL) || ((size_t)s->length < len))
205
220
                {
206
221
                p=OPENSSL_malloc(len);
207
222
                if (p == NULL)
208
223
                        {
209
 
                        ASN1err(ASN1_F_ASN1_UTCTIME_SET,ERR_R_MALLOC_FAILURE);
 
224
                        ASN1err(ASN1_F_ASN1_UTCTIME_ADJ,ERR_R_MALLOC_FAILURE);
210
225
                        return(NULL);
211
226
                        }
212
227
                if (s->data != NULL)