jdk/src/java.base/share/classes/sun/security/ssl/StatusRequest.java
author ascarpino
Wed, 08 Feb 2017 12:08:28 -0800
changeset 43701 fe8c324ba97c
parent 32032 22badc53802f
permissions -rw-r--r--
8160655: Fix denyAfter and usage types for security properties Reviewed-by: mullan, xuelei
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32032
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     1
/*
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     4
 *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    10
 *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    15
 * accompanied this code).
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    16
 *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    20
 *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    23
 * questions.
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    24
 */
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    25
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    26
package sun.security.ssl;
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    27
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    28
import java.io.IOException;
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    29
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    30
/*
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    31
 * RFC 6066 defines the TLS extension,"status_request" (type 0x5),
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    32
 * which allows the client to request that the server perform OCSP
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    33
 * on the client's behalf.
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    34
 *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    35
 * This class is an interface for multiple types of StatusRequests
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    36
 * (e.g. OCSPStatusRequest).
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    37
 */
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    38
interface StatusRequest {
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    39
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    40
    /**
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    41
     * Obtain the length of the {@code StatusRequest} object in encoded form
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    42
     *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    43
     * @return the length of the {@code StatusRequest} object in encoded form
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    44
     */
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    45
    int length();
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    46
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    47
    /**
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    48
     * Place the encoded {@code StatusRequest} bytes into the
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    49
     *      {@code HandshakeOutputStream}
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    50
     *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    51
     * @param s the target {@code HandshakeOutputStream}
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    52
     *
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    53
     * @throws IOException if any encoding error occurs
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    54
     */
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    55
    void send(HandshakeOutStream s) throws IOException;
22badc53802f 8046321: OCSP Stapling for TLS
jnimeh
parents:
diff changeset
    56
}