diff options
| -rw-r--r-- | src/lib/libtls/tls_init.3 | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/src/lib/libtls/tls_init.3 b/src/lib/libtls/tls_init.3 index 2f6ca3d802..75c37e641b 100644 --- a/src/lib/libtls/tls_init.3 +++ b/src/lib/libtls/tls_init.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: tls_init.3,v 1.73 2016/11/02 15:18:42 beck Exp $ | 1 | .\" $OpenBSD: tls_init.3,v 1.74 2016/11/02 17:32:42 jmc Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | 3 | .\" Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -50,7 +50,7 @@ | |||
| 50 | .Nm tls_config_verify , | 50 | .Nm tls_config_verify , |
| 51 | .Nm tls_config_verify_client , | 51 | .Nm tls_config_verify_client , |
| 52 | .Nm tls_config_verify_client_optional , | 52 | .Nm tls_config_verify_client_optional , |
| 53 | .Nm tls_ocsp_process_response, | 53 | .Nm tls_ocsp_process_response , |
| 54 | .Nm tls_peer_cert_provided , | 54 | .Nm tls_peer_cert_provided , |
| 55 | .Nm tls_peer_cert_contains_name , | 55 | .Nm tls_peer_cert_contains_name , |
| 56 | .Nm tls_peer_cert_issuer , | 56 | .Nm tls_peer_cert_issuer , |
| @@ -58,14 +58,14 @@ | |||
| 58 | .Nm tls_peer_cert_hash , | 58 | .Nm tls_peer_cert_hash , |
| 59 | .Nm tls_peer_cert_notbefore , | 59 | .Nm tls_peer_cert_notbefore , |
| 60 | .Nm tls_peer_cert_notafter , | 60 | .Nm tls_peer_cert_notafter , |
| 61 | .Nm tls_peer_ocsp_cert_status, | 61 | .Nm tls_peer_ocsp_cert_status , |
| 62 | .Nm tls_peer_ocsp_crl_reason, | 62 | .Nm tls_peer_ocsp_crl_reason , |
| 63 | .Nm tls_peer_ocsp_next_update, | 63 | .Nm tls_peer_ocsp_next_update , |
| 64 | .Nm tls_peer_ocsp_response_status, | 64 | .Nm tls_peer_ocsp_response_status , |
| 65 | .Nm tls_peer_ocsp_result_msg, | 65 | .Nm tls_peer_ocsp_result_msg , |
| 66 | .Nm tls_peer_ocsp_revocation_time, | 66 | .Nm tls_peer_ocsp_revocation_time , |
| 67 | .Nm tls_peer_ocsp_this_update, | 67 | .Nm tls_peer_ocsp_this_update , |
| 68 | .Nm tls_peer_ocsp_url, | 68 | .Nm tls_peer_ocsp_url , |
| 69 | .Nm tls_conn_alpn_selected , | 69 | .Nm tls_conn_alpn_selected , |
| 70 | .Nm tls_conn_cipher , | 70 | .Nm tls_conn_cipher , |
| 71 | .Nm tls_conn_servername , | 71 | .Nm tls_conn_servername , |
| @@ -540,50 +540,44 @@ the peer certificate from | |||
| 540 | returns the time corresponding to the end of the validity period of | 540 | returns the time corresponding to the end of the validity period of |
| 541 | the peer certificate from | 541 | the peer certificate from |
| 542 | .Ar ctx . | 542 | .Ar ctx . |
| 543 | .Ed | ||
| 544 | .It | 543 | .It |
| 545 | .Fn tls_ocsp_process_response | 544 | .Fn tls_ocsp_process_response |
| 546 | processes a raw ocsp response in | 545 | processes a raw OCSP response in |
| 547 | .Ar response | 546 | .Ar response |
| 548 | of size | 547 | of size |
| 549 | .Ar size | 548 | .Ar size |
| 550 | to check the revocation status of the peer certificate from | 549 | to check the revocation status of the peer certificate from |
| 551 | .Ar ctx . | 550 | .Ar ctx . |
| 552 | A successful return code of 0 indicates that the certificate has not been revoked. | 551 | A successful return code of 0 indicates that the certificate |
| 553 | .Ed | 552 | has not been revoked. |
| 554 | .It | 553 | .It |
| 555 | .Fn tls_peer_ocsp_url | 554 | .Fn tls_peer_ocsp_url |
| 556 | returns the URL for OCSP validation of the peer certificate from | 555 | returns the URL for OCSP validation of the peer certificate from |
| 557 | .Ar ctx | 556 | .Ar ctx |
| 558 | .El | 557 | .El |
| 559 | .Pp | 558 | .Pp |
| 560 | The following functions return informaiton about the peer certificate from | 559 | The following functions return information about the peer certificate from |
| 561 | .Ar ctx | 560 | .Ar ctx |
| 562 | tha was obtained by validating a stapled OCSP response during the handshake, or | 561 | that was obtained by validating a stapled OCSP response during the handshake, |
| 563 | via a previous call to | 562 | or via a previous call to |
| 564 | .Xr tls_ocsp_process_response | 563 | .Fn tls_ocsp_process_response |
| 565 | .Bl -bullet -offset four | 564 | .Bl -bullet -offset four |
| 566 | .It | 565 | .It |
| 567 | .Fn tls_peer_ocsp_cert_status | 566 | .Fn tls_peer_ocsp_cert_status |
| 568 | returns the OCSP certificate status code as per RFC 6960 section 2.2 | 567 | returns the OCSP certificate status code as per RFC 6960 section 2.2 |
| 569 | .Ed | ||
| 570 | .It | 568 | .It |
| 571 | .Fn tls_peer_ocsp_crl_reason | 569 | .Fn tls_peer_ocsp_crl_reason |
| 572 | returns the OCSP certificate revocation reason status code as per RFC 5280 | 570 | returns the OCSP certificate revocation reason status code as per RFC 5280 |
| 573 | section 5.3.1 | 571 | section 5.3.1 |
| 574 | .Ed | ||
| 575 | .It | 572 | .It |
| 576 | .Fn tls_peer_ocsp_next_update | 573 | .Fn tls_peer_ocsp_next_update |
| 577 | returns the OCSP next update time | 574 | returns the OCSP next update time |
| 578 | .Ed | ||
| 579 | .It | 575 | .It |
| 580 | .Fn tls_peer_ocsp_response_status | 576 | .Fn tls_peer_ocsp_response_status |
| 581 | returns the OCSP response status as per RFC 6960 section 2.3 | 577 | returns the OCSP response status as per RFC 6960 section 2.3 |
| 582 | .Ed | ||
| 583 | .It | 578 | .It |
| 584 | .Fn tls_peer_ocsp_revocation_time | 579 | .Fn tls_peer_ocsp_revocation_time |
| 585 | returns the OCSP revocation time | 580 | returns the OCSP revocation time |
| 586 | .Ed | ||
| 587 | .It | 581 | .It |
| 588 | .Fn tls_peer_ocsp_this_update | 582 | .Fn tls_peer_ocsp_this_update |
| 589 | returns the OCSP this update time | 583 | returns the OCSP this update time |
| @@ -699,40 +693,40 @@ Functions that return a | |||
| 699 | .Vt ssize_t | 693 | .Vt ssize_t |
| 700 | will return a size on success, and -1 on error. | 694 | will return a size on success, and -1 on error. |
| 701 | .Pp | 695 | .Pp |
| 702 | The | 696 | The |
| 703 | .Fn tls_peer_ocsp_response_status | 697 | .Fn tls_peer_ocsp_response_status |
| 704 | function returns one of | 698 | function returns one of |
| 705 | .Ar TLS_OCSP_RESPONSE_SUCCESSFUL , | 699 | .Ar TLS_OCSP_RESPONSE_SUCCESSFUL , |
| 706 | .Ar TLS_OCSP_RESPONSE_MALFORMED , | 700 | .Ar TLS_OCSP_RESPONSE_MALFORMED , |
| 707 | .Ar TLS_OCSP_RESPONSE_INTERNALERROR , | 701 | .Ar TLS_OCSP_RESPONSE_INTERNALERROR , |
| 708 | .Ar TLS_OCSP_RESPONSE_TRYLATER , | 702 | .Ar TLS_OCSP_RESPONSE_TRYLATER , |
| 709 | .Ar TLS_OCSP_RESPONSE_SIGREQUIRED , | 703 | .Ar TLS_OCSP_RESPONSE_SIGREQUIRED , |
| 710 | or | 704 | or |
| 711 | .AR TLS_OCSP_RESPONSE_UNAUTHORIZED | 705 | .Ar TLS_OCSP_RESPONSE_UNAUTHORIZED |
| 712 | on success, and -1 on error. | 706 | on success, and -1 on error. |
| 713 | .Pp | 707 | .Pp |
| 714 | The | 708 | The |
| 715 | .Fn tls_peer_ocsp_cert_status | 709 | .Fn tls_peer_ocsp_cert_status |
| 716 | function returns one of | 710 | function returns one of |
| 717 | .Ar TLS_OCSP_CERT_GOOD , | 711 | .Ar TLS_OCSP_CERT_GOOD , |
| 718 | .Ar TLS_OCSP_CERT_REVOKED , | 712 | .Ar TLS_OCSP_CERT_REVOKED , |
| 719 | or | 713 | or |
| 720 | .Ar TLS_OCSP_CERT_UNKNOWN | 714 | .Ar TLS_OCSP_CERT_UNKNOWN |
| 721 | on success, and -1 on error. | 715 | on success, and -1 on error. |
| 722 | .Pp | 716 | .Pp |
| 723 | The | 717 | The |
| 724 | .Fn tls_peer_ocsp_crl_reason | 718 | .Fn tls_peer_ocsp_crl_reason |
| 725 | function returns one of | 719 | function returns one of |
| 726 | .Ar TLS_CRL_REASON_UNSPECIFIED , | 720 | .Ar TLS_CRL_REASON_UNSPECIFIED , |
| 727 | .Ar TLS_CRL_REASON_KEY_COMPROMISE , | 721 | .Ar TLS_CRL_REASON_KEY_COMPROMISE , |
| 728 | .Ar TLS_CRL_REASON_CA_COMPROMISE , | 722 | .Ar TLS_CRL_REASON_CA_COMPROMISE , |
| 729 | .Ar TLS_CRL_REASON_AFFILIATION_CHANGED , | 723 | .Ar TLS_CRL_REASON_AFFILIATION_CHANGED , |
| 730 | .Ar TLS_CRL_REASON_SUPERSEDED , | 724 | .Ar TLS_CRL_REASON_SUPERSEDED , |
| 731 | .Ar TLS_CRL_REASON_CESSATION_OF_OPERATION , | 725 | .Ar TLS_CRL_REASON_CESSATION_OF_OPERATION , |
| 732 | .Ar TLS_CRL_REASON_CERTIFICATE_HOLD , | 726 | .Ar TLS_CRL_REASON_CERTIFICATE_HOLD , |
| 733 | .Ar TLS_CRL_REASON_REMOVE_FROM_CRL , | 727 | .Ar TLS_CRL_REASON_REMOVE_FROM_CRL , |
| 734 | .Ar TLS_CRL_REASON_PRIVILEGE_WITHDRAWN , | 728 | .Ar TLS_CRL_REASON_PRIVILEGE_WITHDRAWN , |
| 735 | or | 729 | or |
| 736 | .Ar TLS_CRL_REASON_AA_COMPROMISE | 730 | .Ar TLS_CRL_REASON_AA_COMPROMISE |
| 737 | on success, and -1 on error. | 731 | on success, and -1 on error. |
| 738 | .Pp | 732 | .Pp |
