Changeset 7ba803b in mod_gnutls
- Timestamp:
- Apr 24, 2005, 7:41:15 PM (18 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, msva, proxy-ticket, upstream
- Children:
- 46e3920
- Parents:
- c301152
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
rc301152 r7ba803b 521 521 { 522 522 unsigned char sbuf[GNUTLS_MAX_SESSION_ID]; 523 char buf[ GNUTLS_SESSION_ID_STRING_LEN];523 char buf[AP_IOBUFSIZE]; 524 524 const char* tmp; 525 525 int len; 526 526 mgs_handle_t *ctxt; 527 int rv; 528 527 529 apr_table_t *env = r->subprocess_env; 528 530 … … 557 559 tmp = mgs_session_id2sz(sbuf, len, buf, sizeof(buf)); 558 560 apr_table_setn(env, "SSL_SESSION_ID", tmp); 559 561 562 /* TODO: There are many other env vars that we need to add */ 563 { 564 const gnutls_datum *certs; 565 gnutls_x509_crt cert; 566 567 certs = gnutls_certificate_get_ours(ctxt->session); 568 if (certs) { 569 570 rv = gnutls_x509_crt_init(&cert); 571 if (rv < 0) { 572 goto end_fixups; 573 } 574 575 rv = gnutls_x509_crt_import(cert, &certs[0], GNUTLS_X509_FMT_DER); 576 if (rv < 0) { 577 gnutls_x509_crt_deinit(cert); 578 goto end_fixups; 579 } 580 581 len = sizeof(buf); 582 if (gnutls_x509_crt_get_dn(cert, buf, &len) == 0) { 583 apr_table_setn(env, "SSL_SERVER_S_DN", buf); 584 } 585 586 len = sizeof(buf); 587 if (gnutls_x509_crt_get_issuer_dn(cert, buf, &len) == 0) { 588 apr_table_setn(env, "SSL_SERVER_I_DN", buf); 589 } 590 591 gnutls_x509_crt_deinit(cert); 592 } 593 } 594 595 end_fixups: 560 596 return OK; 561 597 }
Note: See TracChangeset
for help on using the changeset viewer.