"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/tlscert-gnu.c" between
exim-4.91.tar.xz and exim-4.92.tar.xz

About: Exim is a message transfer agent (MTA).

tlscert-gnu.c  (exim-4.91.tar.xz):tlscert-gnu.c  (exim-4.92.tar.xz)
skipping to change at line 114 skipping to change at line 114
static uschar * static uschar *
time_copy(time_t t, uschar * mod) time_copy(time_t t, uschar * mod)
{ {
uschar * cp; uschar * cp;
size_t len = 32; size_t len = 32;
if (mod && Ustrcmp(mod, "int") == 0) if (mod && Ustrcmp(mod, "int") == 0)
return string_sprintf("%u", (unsigned)t); return string_sprintf("%u", (unsigned)t);
cp = store_get(len); cp = store_get(len);
if (timestamps_utc) if (f.timestamps_utc)
{ {
uschar * tz = to_tz(US"GMT0"); uschar * tz = to_tz(US"GMT0");
len = strftime(CS cp, len, "%b %e %T %Y %Z", gmtime(&t)); len = strftime(CS cp, len, "%b %e %T %Y %Z", gmtime(&t));
restore_tz(tz); restore_tz(tz);
} }
else else
len = strftime(CS cp, len, "%b %e %T %Y %Z", localtime(&t)); len = strftime(CS cp, len, "%b %e %T %Y %Z", localtime(&t));
return len > 0 ? cp : NULL; return len > 0 ? cp : NULL;
} }
skipping to change at line 255 skipping to change at line 255
tls_cert_ext_by_oid(void * cert, uschar * oid, int idx) tls_cert_ext_by_oid(void * cert, uschar * oid, int idx)
{ {
uschar * cp1 = NULL; uschar * cp1 = NULL;
uschar * cp2; uschar * cp2;
uschar * cp3; uschar * cp3;
size_t siz = 0; size_t siz = 0;
unsigned int crit; unsigned int crit;
int ret; int ret;
ret = gnutls_x509_crt_get_extension_by_oid ((gnutls_x509_crt_t)cert, ret = gnutls_x509_crt_get_extension_by_oid ((gnutls_x509_crt_t)cert,
oid, idx, CS cp1, &siz, &crit); CS oid, idx, CS cp1, &siz, &crit);
if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER) if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER)
return g_err("ge0", __FUNCTION__, ret); return g_err("ge0", __FUNCTION__, ret);
cp1 = store_get(siz*4 + 1); cp1 = store_get(siz*4 + 1);
ret = gnutls_x509_crt_get_extension_by_oid ((gnutls_x509_crt_t)cert, ret = gnutls_x509_crt_get_extension_by_oid ((gnutls_x509_crt_t)cert,
oid, idx, CS cp1, &siz, &crit); CS oid, idx, CS cp1, &siz, &crit);
if (ret < 0) if (ret < 0)
return g_err("ge1", __FUNCTION__, ret); return g_err("ge1", __FUNCTION__, ret);
/* binary data, DER encoded */ /* binary data, DER encoded */
/* just dump for now */ /* just dump for now */
for(cp3 = cp2 = cp1+siz; cp1 < cp2; cp1++) for(cp3 = cp2 = cp1+siz; cp1 < cp2; cp1++)
cp3 += sprintf(CS cp3, "%.2x ", *cp1); cp3 += sprintf(CS cp3, "%.2x ", *cp1);
cp3[-1]= '\0'; cp3[-1]= '\0';
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)