- Timestamp:
- Jan 11, 2013, 12:57:39 AM (8 years ago)
- Branches:
- debian/master, debian/stretch-backports, jessie-backports, upstream
- Children:
- 4e539d3, 66b608e
- Parents:
- 4ecf14f
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.in
r4ecf14f r52b649e 1 # Makefile.in generated by automake 1.10. 1from Makefile.am.1 # Makefile.in generated by automake 1.10.2 from Makefile.am. 2 2 # @configure_input@ 3 3 … … 161 161 NM = @NM@ 162 162 NMEDIT = @NMEDIT@ 163 OBJDUMP = @OBJDUMP@ 163 164 OBJEXT = @OBJEXT@ 164 165 OOO_MAINTAIN = @OOO_MAINTAIN@ … … 233 234 target_os = @target_os@ 234 235 target_vendor = @target_vendor@ 236 top_build_prefix = @top_build_prefix@ 235 237 top_builddir = @top_builddir@ 236 238 top_srcdir = @top_srcdir@ … … 249 251 case '$(am__configure_deps)' in \ 250 252 *$$dep*) \ 251 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\252 && exit 0; \253 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 254 && { if test -f $@; then exit 0; else break; fi; }; \ 253 255 exit 1;; \ 254 256 esac; \ … … 383 385 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 384 386 done | \ 385 $(AWK) '{ files[$$0] = 1; nonem tpy = 1; } \387 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ 386 388 END { if (nonempty) { for (i in files) print i; }; }'`; \ 387 389 mkid -fID $$unique -
src/gnutls_config.c
r4ecf14f r52b649e 195 195 gnutls_x509_privkey_import(sc->privkey_x509, &data, 196 196 GNUTLS_X509_FMT_PEM); 197 if (ret != 0) { 197 198 if (ret < 0) 199 ret = gnutls_x509_privkey_import_pkcs8 (sc->privkey_x509, &data, GNUTLS_X509_FMT_PEM, 200 NULL, GNUTLS_PKCS_PLAIN); 201 202 if (ret < 0) { 198 203 return apr_psprintf(parms->pool, "GnuTLS: Failed to Import " 199 204 "Private Key '%s': (%d) %s", file, ret, … … 399 404 } 400 405 406 #define INIT_CA_SIZE 128 401 407 const char *mgs_set_client_ca_file(cmd_parms * parms, void *dummy, 402 408 const char *arg) … … 420 426 } 421 427 422 sc->ca_list_size = MAX_CA_CRTS; 428 sc->ca_list_size = INIT_CA_SIZE; 429 sc->ca_list = malloc(sc->ca_list_size * sizeof(*sc->ca_list)); 430 if (sc->ca_list == NULL) { 431 return apr_psprintf(parms->pool, "mod_gnutls: Memory allocation error"); 432 } 433 423 434 rv = gnutls_x509_crt_list_import(sc->ca_list, &sc->ca_list_size, 424 &data, GNUTLS_X509_FMT_PEM, 425 GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED); 426 if (rv < 0) { 427 return apr_psprintf(parms->pool, "GnuTLS: Failed to load " 435 &data, GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED); 436 if (rv < 0 && rv != GNUTLS_E_SHORT_MEMORY_BUFFER) { 437 return apr_psprintf(parms->pool, "GnuTLS: Failed to load " 428 438 "Client CA File '%s': (%d) %s", file, rv, 429 439 gnutls_strerror(rv)); 440 } 441 442 if (INIT_CA_SIZE < sc->ca_list_size) { 443 sc->ca_list = realloc(sc->ca_list, sc->ca_list_size*sizeof(*sc->ca_list)); 444 if (sc->ca_list == NULL) { 445 return apr_psprintf(parms->pool, "mod_gnutls: Memory allocation error"); 446 } 447 448 /* re-read */ 449 rv = gnutls_x509_crt_list_import(sc->ca_list, &sc->ca_list_size, 450 &data, GNUTLS_X509_FMT_PEM, 0); 451 452 if (rv < 0) { 453 return apr_psprintf(parms->pool, "GnuTLS: Failed to load " 454 "Client CA File '%s': (%d) %s", file, rv, 455 gnutls_strerror(rv)); 456 } 430 457 } 431 458 -
src/gnutls_io.c
r4ecf14f r52b649e 588 588 break; 589 589 } 590 591 do { 592 ret = gnutls_record_send(ctxt->session, data, len); 593 } 594 while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); 595 596 if (ret < 0) { 597 /* error sending output */ 598 ap_log_error(APLOG_MARK, APLOG_INFO, ctxt->output_rc, 590 591 if (len > 0) { 592 593 do { 594 ret = gnutls_record_send(ctxt->session, data, len); 595 } 596 while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); 597 598 if (ret < 0) { 599 /* error sending output */ 600 ap_log_error(APLOG_MARK, APLOG_INFO, ctxt->output_rc, 599 601 ctxt->c->base_server, 600 602 "GnuTLS: Error writing data." 601 603 " (%d) '%s'", (int)ret, gnutls_strerror(ret)); 602 if (ctxt->output_rc == APR_SUCCESS) { 603 ctxt->output_rc = APR_EGENERAL; 604 } 605 } 606 else if (ret != len) { 607 /* Not able to send the entire bucket, 608 split it and send it again. */ 609 apr_bucket_split(bucket, ret); 604 if (ctxt->output_rc == APR_SUCCESS) { 605 ctxt->output_rc = APR_EGENERAL; 606 } 607 } 608 else if (ret != len) { 609 /* Not able to send the entire bucket, 610 split it and send it again. */ 611 apr_bucket_split(bucket, ret); 612 } 610 613 } 611 614
Note: See TracChangeset
for help on using the changeset viewer.