OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2017 The Netty Project |
| 3 * |
| 4 * The Netty Project licenses this file to you under the Apache License, |
| 5 * version 2.0 (the "License"); you may not use this file except in compliance |
| 6 * with the License. You may obtain a copy of the License at: |
| 7 * |
| 8 * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 * |
| 10 * Unless required by applicable law or agreed to in writing, software |
| 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 * License for the specific language governing permissions and limitations |
| 14 * under the License. |
| 15 */ |
| 16 package io.netty.internal.tcnative; |
| 17 |
| 18 /** |
| 19 * This class is necessary to break the following cyclic dependency: |
| 20 * <ol> |
| 21 * <li>JNI_OnLoad</li> |
| 22 * <li>JNI Calls FindClass because RegisterNatives (used to register JNI methods
) requires a class</li> |
| 23 * <li>FindClass loads the class, but static members variables of that class att
empt to call a JNI method which has not |
| 24 * yet been registered.</li> |
| 25 * <li>{@link java.lang.UnsatisfiedLinkError} is thrown because native method ha
s not yet been registered.</li> |
| 26 * </ol> |
| 27 * <strong>Static members which call JNI methods must not be declared in this cl
ass!</strong> |
| 28 */ |
| 29 final class NativeStaticallyReferencedJniMethods { |
| 30 private NativeStaticallyReferencedJniMethods() { |
| 31 } |
| 32 |
| 33 /** |
| 34 * Options that may impact security and may be set by default as defined in: |
| 35 * <a href="https://www.openssl.org/docs/man1.0.1/ssl/SSL_CTX_set_options.ht
ml">SSL Docs</a>. |
| 36 */ |
| 37 static native int sslOpCipherServerPreference(); |
| 38 static native int sslOpNoSSLv2(); |
| 39 static native int sslOpNoSSLv3(); |
| 40 static native int sslOpNoTLSv1(); |
| 41 static native int sslOpNoTLSv11(); |
| 42 static native int sslOpNoTLSv12(); |
| 43 static native int sslOpNoTicket(); |
| 44 |
| 45 /** |
| 46 * Options not defined in the OpenSSL docs but may impact security. |
| 47 */ |
| 48 static native int sslOpNoCompression(); |
| 49 |
| 50 /* Only support OFF and SERVER for now */ |
| 51 static native int sslSessCacheOff(); |
| 52 static native int sslSessCacheServer(); |
| 53 |
| 54 static native int sslStConnect(); |
| 55 static native int sslStAccept(); |
| 56 |
| 57 static native int sslModeEnablePartialWrite(); |
| 58 static native int sslModeAcceptMovingWriteBuffer(); |
| 59 static native int sslModeReleaseBuffers(); |
| 60 |
| 61 static native int sslSendShutdown(); |
| 62 static native int sslReceivedShutdown(); |
| 63 static native int sslErrorNone(); |
| 64 static native int sslErrorSSL(); |
| 65 static native int sslErrorWantRead(); |
| 66 static native int sslErrorWantWrite(); |
| 67 static native int sslErrorWantX509Lookup(); |
| 68 static native int sslErrorSyscall(); |
| 69 static native int sslErrorZeroReturn(); |
| 70 static native int sslErrorWantConnect(); |
| 71 static native int sslErrorWantAccept(); |
| 72 |
| 73 static native int x509CheckFlagAlwaysCheckSubject(); |
| 74 static native int x509CheckFlagDisableWildCards(); |
| 75 static native int x509CheckFlagNoPartialWildCards(); |
| 76 static native int x509CheckFlagMultiLabelWildCards(); |
| 77 |
| 78 /* x509 certificate verification errors */ |
| 79 static native int x509vOK(); |
| 80 static native int x509vErrUnspecified(); |
| 81 static native int x509vErrUnableToGetIssuerCert(); |
| 82 static native int x509vErrUnableToGetCrl(); |
| 83 static native int x509vErrUnableToDecryptCertSignature(); |
| 84 static native int x509vErrUnableToDecryptCrlSignature(); |
| 85 static native int x509vErrUnableToDecodeIssuerPublicKey(); |
| 86 static native int x509vErrCertSignatureFailure(); |
| 87 static native int x509vErrCrlSignatureFailure(); |
| 88 static native int x509vErrCertNotYetValid(); |
| 89 static native int x509vErrCertHasExpired(); |
| 90 static native int x509vErrCrlNotYetValid(); |
| 91 static native int x509vErrCrlHasExpired(); |
| 92 static native int x509vErrErrorInCertNotBeforeField(); |
| 93 static native int x509vErrErrorInCertNotAfterField(); |
| 94 static native int x509vErrErrorInCrlLastUpdateField(); |
| 95 static native int x509vErrErrorInCrlNextUpdateField(); |
| 96 static native int x509vErrOutOfMem(); |
| 97 static native int x509vErrDepthZeroSelfSignedCert(); |
| 98 static native int x509vErrSelfSignedCertInChain(); |
| 99 static native int x509vErrUnableToGetIssuerCertLocally(); |
| 100 static native int x509vErrUnableToVerifyLeafSignature(); |
| 101 static native int x509vErrCertChainTooLong(); |
| 102 static native int x509vErrCertRevoked(); |
| 103 static native int x509vErrInvalidCa(); |
| 104 static native int x509vErrPathLengthExceeded(); |
| 105 static native int x509vErrInvalidPurpose(); |
| 106 static native int x509vErrCertUntrusted(); |
| 107 static native int x509vErrCertRejected(); |
| 108 static native int x509vErrSubjectIssuerMismatch(); |
| 109 static native int x509vErrAkidSkidMismatch(); |
| 110 static native int x509vErrAkidIssuerSerialMismatch(); |
| 111 static native int x509vErrKeyUsageNoCertSign(); |
| 112 static native int x509vErrUnableToGetCrlIssuer(); |
| 113 static native int x509vErrUnhandledCriticalExtension(); |
| 114 static native int x509vErrKeyUsageNoCrlSign(); |
| 115 static native int x509vErrUnhandledCriticalCrlExtension(); |
| 116 static native int x509vErrInvalidNonCa(); |
| 117 static native int x509vErrProxyPathLengthExceeded(); |
| 118 static native int x509vErrKeyUsageNoDigitalSignature(); |
| 119 static native int x509vErrProxyCertificatesNotAllowed(); |
| 120 static native int x509vErrInvalidExtension(); |
| 121 static native int x509vErrInvalidPolicyExtension(); |
| 122 static native int x509vErrNoExplicitPolicy(); |
| 123 static native int x509vErrDifferntCrlScope(); |
| 124 static native int x509vErrUnsupportedExtensionFeature(); |
| 125 static native int x509vErrUnnestedResource(); |
| 126 static native int x509vErrPermittedViolation(); |
| 127 static native int x509vErrExcludedViolation(); |
| 128 static native int x509vErrSubtreeMinMax(); |
| 129 static native int x509vErrApplicationVerification(); |
| 130 static native int x509vErrUnsupportedConstraintType(); |
| 131 static native int x509vErrUnsupportedConstraintSyntax(); |
| 132 static native int x509vErrUnsupportedNameSyntax(); |
| 133 static native int x509vErrCrlPathValidationError(); |
| 134 static native int x509vErrPathLoop(); |
| 135 static native int x509vErrSuiteBInvalidVersion(); |
| 136 static native int x509vErrSuiteBInvalidAlgorithm(); |
| 137 static native int x509vErrSuiteBInvalidCurve(); |
| 138 static native int x509vErrSuiteBInvalidSignatureAlgorithm(); |
| 139 static native int x509vErrSuiteBLosNotAllowed(); |
| 140 static native int x509vErrSuiteBCannotSignP384WithP256(); |
| 141 static native int x509vErrHostnameMismatch(); |
| 142 static native int x509vErrEmailMismatch(); |
| 143 static native int x509vErrIpAddressMismatch(); |
| 144 static native int x509vErrDaneNoMatch(); |
| 145 } |
OLD | NEW |