/openjdk9/jdk/test/sun/security/provider/SeedGenerator/ |
H A D | SeedGeneratorChoice.java | 47 for (String mech : new String[]{"SHA1PRNG", "Hash_DRBG", "HMAC_DRBG", 51 if (!mech.contains("_DRBG")) { 52 prng = SecureRandom.getInstance(mech); 54 Security.setProperty("securerandom.drbg.config", mech);
|
/openjdk9/jdk/src/java.security.jgss/share/classes/org/ietf/jgss/ |
H A D | GSSCredential.java | 162 * @param mech the Oid of the mechanism for which the Mechanism Name 172 public GSSName getName(Oid mech) throws GSSException; argument 206 * @param mech the Oid of the mechanism whose initiator credential element 214 public int getRemainingInitLifetime(Oid mech) throws GSSException; argument 228 * @param mech the Oid of the mechanism whose acceptor credential element 236 public int getRemainingAcceptLifetime(Oid mech) throws GSSException; argument 264 * @param mech the Oid of the mechanism whose credentials usage mode is 272 public int getUsage(Oid mech) throws GSSException; argument 330 * @param mech the mechanism over which the credential is to be acquired. 350 Oid mech, in 349 add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage) argument [all...] |
H A D | GSSManager.java | 178 * @param mech the Oid of the mechanism to query 187 public abstract Oid[] getNamesForMech(Oid mech) argument 293 * @param mech Oid specifying the mechanism for which the name should be 308 Oid mech) throws GSSException; 323 * @param mech Oid specifying the mechanism for which the name should be 337 public abstract GSSName createName(byte name[], Oid nameType, Oid mech) argument 400 * @param mech the Oid of the desired mechanism. Use <code>(Oid) null 423 int lifetime, Oid mech, int usage) 498 * @param mech the Oid of the desired mechanism. Use <code>null</code> 521 public abstract GSSContext createContext(GSSName peer, Oid mech, argument 307 createName(String nameStr, Oid nameType, Oid mech) argument 422 createCredential(GSSName name, int lifetime, Oid mech, int usage) argument 660 addProviderAtFront(Provider p, Oid mech) argument 727 addProviderAtEnd(Provider p, Oid mech) argument [all...] |
/openjdk9/jdk/test/java/security/SecureRandom/ |
H A D | GetInstanceTest.java | 88 for (String mech : new String[]{ 90 System.out.printf("%nTest SecureRandom mechanism: '%s'", mech); 92 if (isDRBG(mech)) { 93 Security.setProperty(DRBG_CONFIG, mech); 95 verifyInstance(mech); 108 private static void verifyInstance(String mech) throws Exception { argument 110 String srAlgo = isDRBG(mech) ? "DRBG" : mech; 118 matchExc(() -> SecureRandom.getInstance(srAlgo), !(nsa(mech)), 122 + " is null or invalid.", mech)), mec 239 nsa(String mech) argument 248 isDRBG(String mech) argument 259 getExcType(String mech, SecureRandomParameters param) argument 304 checkAttributes(SecureRandom sr, String mech) argument [all...] |
H A D | SerializedSeedTest.java | 54 for (String mech : new String[]{ 57 "%nRunning test for SecureRandom mechanism: '%s'", mech); 61 SecureRandom orig = getSRInstance(mech); 65 check(orig, copy, false, mech); 69 orig = getSRInstance(mech); 74 check(orig, copy, !isDRBG(mech), mech); 78 orig = getSRInstance(mech); 83 check(orig, copy, !isDRBG(mech), mech); 143 isDRBG(String mech) argument 151 check(SecureRandom orig, SecureRandom copy, boolean equal, String mech) argument 204 getSRInstance(String mech) argument [all...] |
H A D | ApiTest.java | 61 String mech 67 if (!isDRBG(mech)) { 68 SecureRandom random = SecureRandom.getInstance(mech); 69 verifyAPI(random, mech); 71 } else if (mech.equals("CTR_DRBG")) { 74 } else if (mech.equals("Hash_DRBG") || mech.equals("HMAC_DRBG")) { 79 String.format("Not a valid mechanism '%s'", mech)); 81 runForEachMech(mech, algs); 95 * @param mech DRB 99 runForEachMech(String mech, String[] algs) argument 106 runForEachAlg(String mech, String alg) argument 121 runForEachParam(String mech, String alg, SecureRandomParameters param) argument 148 getDefaultAlg(String mech, String alg) argument 216 isDRBG(String mech) argument 238 verifyAPI(SecureRandom random, String mech) argument 327 isSupportPR(String mech, SecureRandom random) argument [all...] |
H A D | EnoughSeedTest.java | 46 for (String mech : new String[]{ 48 System.out.printf("%nTest for SecureRandom algorithm: '%s'", mech); 51 if (!mech.contains("_DRBG")) { 52 sr = SecureRandom.getInstance(mech); 54 Security.setProperty(DRBG_CONFIG, mech); 60 + "mechanism: '%s'", mech);
|
H A D | GetAlgorithm.java | 49 for (String mech : new String[]{supportedNativeAlgo(), "SHA1PRNG", 51 if (!mech.contains("_DRBG")) { 52 check(mech, SecureRandom.getInstance(mech)); 55 Security.setProperty(DRBG_CONFIG, mech);
|
H A D | MultiThreadTest.java | 63 for (String mech : new String[]{ 66 forEachMech(mech, byteLen, reSeed); 85 * @param mech Mechanism name 92 private static void forEachMech(String mech, int byteLen, SEED reSeed) argument 96 if ("SHA1PRNG".equals(mech) && SEED.RESEED.equals(reSeed)) { 98 "%nreseed() api is not supported for '%s'", mech); 102 + " reseed: '%s'", mech, reSeed); 122 if (!mech.contains("_DRBG")) { 123 rnd = SecureRandom.getInstance(mech); 125 Security.setProperty(DRBG_CONFIG, mech); [all...] |
/openjdk9/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/ |
H A D | NativeDigestMD.java | 52 private final int mech; field in class:NativeDigestMD 70 private final int mech; field in class:NativeDigestMD.DigestContextRef 80 DigestContextRef(NativeDigestMD nc, long id, int mech) { argument 83 this.mech = mech; 102 NativeDigestMD.nativeFree(mech, id); 110 NativeDigestMD(int mech, int digestLen) { argument 112 this.mech = mech; 156 pCtxt = new DigestContextRef(this, nativeInit(mech), mec 204 nativeInit(int mech) argument 206 nativeUpdate(int mech, long pCtxt, byte[] in, int ofs, int inLen) argument 208 nativeDigest(int mech, long pCtxt, byte[] out, int ofs, int digestLen) argument 210 nativeClone(int mech, long pCtxt) argument 212 nativeFree(int mech, long id) argument [all...] |
H A D | NativeDigest.java | 96 private final UcryptoMech mech; field in class:NativeDigest 113 private final UcryptoMech mech; field in class:NativeDigest.DigestContextRef 123 DigestContextRef(NativeDigest nc, long id, UcryptoMech mech) { argument 126 this.mech = mech; 146 NativeDigest.nativeFree(mech.value(), id); 157 NativeDigest(UcryptoMech mech, int digestLen) { argument 158 this.mech = mech; 203 pCtxt = new DigestContextRef(this, nativeInit(mech 246 nativeInit(int mech) argument 248 nativeUpdate(int mech, long pCtxt, byte[] in, int ofs, int inLen) argument 250 nativeDigest(int mech, long pCtxt, byte[] out, int ofs, int digestLen) argument 252 nativeFree(int mech, long id) argument [all...] |
/openjdk9/jdk/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/ |
H A D | GSSLibStub.java | 45 private Oid mech; field in class:GSSLibStub 100 static GSSLibStub getInstance(Oid mech) throws GSSException { argument 101 GSSLibStub s = table.get(mech); 103 s = new GSSLibStub(mech); 104 table.put(mech, s); 108 private GSSLibStub(Oid mech) throws GSSException { argument 109 SunNativeProvider.debug("Created GSSLibStub for mech " + mech); 110 this.mech = mech; [all...] |
/openjdk9/jdk/src/java.security.jgss/share/classes/sun/security/jgss/ |
H A D | GSSManagerImpl.java | 82 public Oid[] getNamesForMech(Oid mech) argument 84 MechanismFactory factory = list.getMechFactory(mech); 100 // what nametypes does this mech support? 101 Oid mech = mechs[i]; 103 Oid[] namesForMech = getNamesForMech(mech); 106 retVal[pos++] = mech; 110 GSSUtil.debug("Skip " + mech + 137 Oid mech) throws GSSException { 138 return new GSSNameImpl(this, nameStr, nameType, mech); 141 public GSSName createName(byte[] name, Oid nameType, Oid mech) argument 136 createName(String nameStr, Oid nameType, Oid mech) argument 151 createCredential(GSSName aName, int lifetime, Oid mech, int usage) argument 163 createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime) argument 179 addProviderAtFront(Provider p, Oid mech) argument 184 addProviderAtEnd(Provider p, Oid mech) argument 189 getCredentialElement(GSSNameSpi name, int initLifetime, int acceptLifetime, Oid mech, int usage) argument 198 getNameElement(String name, Oid nameType, Oid mech) argument 207 getNameElement(byte[] name, Oid nameType, Oid mech) argument 215 getMechanismContext(GSSNameSpi peer, GSSCredentialSpi myInitiatorCred, int lifetime, Oid mech) argument 227 getMechanismContext(GSSCredentialSpi myAcceptorCred, Oid mech) argument [all...] |
H A D | GSSExceptionImpl.java | 42 * A constructor that takes the majorCode as well as the mech oid that 45 GSSExceptionImpl(int majorCode, Oid mech) { argument 47 this.majorMessage = super.getMajorString() + ": " + mech;
|
H A D | GSSCredentialImpl.java | 47 // XXX Optimization for single mech usage 69 int lifetime, Oid mech, int usage) 71 if (mech == null) mech = ProviderList.DEFAULT_MECH_OID; 74 add(name, lifetime, lifetime, mech, usage); 103 // Wrap a mech cred into a GSS cred 150 Oid mech = tempCred.getMechanism(); 152 ((GSSNameImpl)name).getElement(mech)); 166 public GSSName getName(Oid mech) throws GSSException { argument 176 if (mech 68 GSSCredentialImpl(GSSManagerImpl gssManager, GSSName name, int lifetime, Oid mech, int usage) argument 239 getRemainingInitLifetime(Oid mech) argument 279 getRemainingAcceptLifetime(Oid mech) argument 355 getUsage(Oid mech) argument 418 add(GSSName name, int initLifetime, int acceptLifetime, Oid mech, int usage) argument [all...] |
/openjdk9/jdk/test/sun/security/krb5/auto/ |
H A D | S4U2proxy.java | 43 Oid mech; 45 mech = GSSUtil.GSS_SPNEGO_MECH_OID; 47 mech = GSSUtil.GSS_KRB5_MECH_OID; 49 throw new Exception("Unknown mech"); 65 c.startAsClient(OneKDC.SERVER, mech); 66 s.startAsServer(null, mech, false); 71 p.startAsClient(OneKDC.BACKEND, mech); 76 b.startAsServer(mech); 79 p.startAsClient(OneKDC.BACKEND, mech); 80 b.startAsServer(mech); [all...] |
H A D | S4U2selfAsServer.java | 43 Oid mech; 45 mech = GSSUtil.GSS_SPNEGO_MECH_OID; 47 mech = GSSUtil.GSS_KRB5_MECH_OID; 49 throw new Exception("Unknown mech"); 66 s.startAsServer(null, mech, false); 70 p.startAsClient(OneKDC.BACKEND, mech); 71 b.startAsServer(mech); 74 p.startAsClient(OneKDC.BACKEND, mech); 75 b.startAsServer(mech);
|
H A D | S4U2proxyGSS.java | 46 Oid mech; 48 mech = GSSUtil.GSS_SPNEGO_MECH_OID; 50 mech = GSSUtil.GSS_KRB5_MECH_OID; 52 throw new Exception("Unknown mech"); 82 c.startAsClient(OneKDC.SERVER, mech); 84 s.startAsServer(mech); 88 p.startAsClient(OneKDC.SERVER, mech); 89 b.startAsServer(mech);
|
H A D | S4U2selfGSS.java | 43 Oid mech; 45 mech = GSSUtil.GSS_SPNEGO_MECH_OID; 47 mech = GSSUtil.GSS_KRB5_MECH_OID; 49 throw new Exception("Unknown mech"); 68 c.startAsClient(OneKDC.SERVER, mech); 69 s.startAsServer(mech);
|
H A D | S4U2selfAsServerGSS.java | 46 Oid mech; 48 mech = GSSUtil.GSS_SPNEGO_MECH_OID; 50 mech = GSSUtil.GSS_KRB5_MECH_OID; 52 throw new Exception("Unknown mech"); 81 s.startAsServer(mech); 85 p.startAsClient(OneKDC.SERVER, mech); 86 b.startAsServer(mech);
|
/openjdk9/jdk/test/sun/security/provider/SecureRandom/ |
H A D | AutoReseed.java | 38 for (String mech : new String[]{"Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) { 40 System.out.println("Testing " + mech + "..."); 41 Security.setProperty("securerandom.drbg.config", mech);
|
/openjdk9/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/ |
H A D | nativeCryptoMD.c | 41 jlong JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeInit(jint mech) { argument 44 switch (mech) { 76 if (J2UC_DEBUG) printf("ERROR: Unsupported mech %i\n", mech); 82 (jint mech, jlong pContext, int notUsed, unsigned char* in, jint ofs, jint len) { 83 if (mech == com_oracle_security_ucrypto_NativeDigestMD_MECH_SHA1) { 85 } else if (mech == com_oracle_security_ucrypto_NativeDigestMD_MECH_MD5) { 95 (jint mech, jlong pContext, int notUsed, unsigned char* out, jint ofs, jint digestLen) { 97 if (mech == com_oracle_security_ucrypto_NativeDigestMD_MECH_SHA1) { 100 } else if (mech 81 JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate(jint mech, jlong pContext, int notUsed, unsigned char* in, jint ofs, jint len) argument 94 JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest(jint mech, jlong pContext, int notUsed, unsigned char* out, jint ofs, jint digestLen) argument 110 JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeClone(jint mech, jlong pContext) argument 129 JavaCritical_com_oracle_security_ucrypto_NativeDigestMD_nativeFree(jint mech, jlong pContext) argument 146 Java_com_oracle_security_ucrypto_NativeDigestMD_nativeInit(JNIEnv *env, jclass jcls, jint mech) argument 160 Java_com_oracle_security_ucrypto_NativeDigestMD_nativeUpdate(JNIEnv *env, jclass jcls, jint mech, jlong pContext, jbyteArray jIn, jint jOfs, jint jLen) argument 177 Java_com_oracle_security_ucrypto_NativeDigestMD_nativeDigest(JNIEnv *env, jclass jcls, jint mech, jlong pContext, jbyteArray jOut, jint jOutOfs, jint digestLen) argument 199 Java_com_oracle_security_ucrypto_NativeDigestMD_nativeClone(JNIEnv *env, jclass jcls, jint mech, jlong pContext) argument 209 Java_com_oracle_security_ucrypto_NativeDigestMD_nativeFree(JNIEnv *env, jclass jcls, jint mech, jlong pContext) argument [all...] |
/openjdk9/jdk/src/java.base/share/classes/sun/security/provider/ |
H A D | MoreDrbgParameters.java | 42 final String mech; field in class:MoreDrbgParameters 58 * @param mech mech name. If set to {@code null}, the one in 68 public MoreDrbgParameters(EntropySource es, String mech, argument 71 this.mech = mech; 84 return mech + "," + algorithm + "," + usedf + "," + strength
|
H A D | DRBG.java | 51 * 2. Default mech, cap, usedf set in this class 52 * 3. Default algorithm set in final implementation of each mech 77 String mech = null; 120 checkTwice(mech != null, "mechanism name"); 121 mech = part; 164 if (m.mech != null) { 165 mech = m.mech; 196 if (mech == null) { 197 mech [all...] |
/openjdk9/jdk/src/java.security.sasl/share/classes/com/sun/security/sasl/ |
H A D | ServerFactoryImpl.java | 57 public SaslServer createSaslServer(String mech, argument 63 if (mech.equals(myMechs[CRAMMD5])
|