Home
last modified time | relevance | path

Searched refs:params (Results 1 – 25 of 137) sorted by relevance

123456

/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DAlgorithmParametersTest.java98 AlgorithmParameters params = new DummyAlgorithmParameters(paramSpi, p, in test_getEncoded() local
105 params.getEncoded(); in test_getEncoded()
114 params.init(new MyAlgorithmParameterSpec()); in test_getEncoded()
115 assertSame(enc, params.getEncoded()); in test_getEncoded()
134 AlgorithmParameters params = new DummyAlgorithmParameters(paramSpi, p, in test_getEncodedLjava_lang_String() local
141 params.getEncoded(strFormatParam); in test_getEncodedLjava_lang_String()
150 params.init(new MyAlgorithmParameterSpec()); in test_getEncodedLjava_lang_String()
151 assertSame(enc, params.getEncoded(strFormatParam)); in test_getEncodedLjava_lang_String()
164 params = new DummyAlgorithmParameters(paramSpi, p, "algorithm"); in test_getEncodedLjava_lang_String()
165 params.init(new MyAlgorithmParameterSpec()); in test_getEncodedLjava_lang_String()
[all …]
DKeyPairGenerator4Test.java114 DSAParams params = key.getParams(); in test_initializeLjava_security_spec_AlgorithmParameterSpec() local
117 keyPair.initialize(new DSAParameterSpec(params.getP(), params.getQ(), in test_initializeLjava_security_spec_AlgorithmParameterSpec()
118 params.getG())); in test_initializeLjava_security_spec_AlgorithmParameterSpec()
132 DSAParams params = key.getParams(); in test_initializeLjava_security_spec_AlgorithmParameterSpecLjava_security_SecureRandom() local
135 keyPair.initialize(new DSAParameterSpec(params.getP(), params.getQ(), in test_initializeLjava_security_spec_AlgorithmParameterSpecLjava_security_SecureRandom()
136 params.getG()), new SecureRandom()); in test_initializeLjava_security_spec_AlgorithmParameterSpecLjava_security_SecureRandom()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DPKIX.java52 static ValidatorParams checkParams(CertPath cp, CertPathParameters params) in checkParams() argument
55 if (!(params instanceof PKIXParameters)) { in checkParams()
59 return new ValidatorParams(cp, (PKIXParameters)params); in checkParams()
62 static BuilderParams checkBuilderParams(CertPathParameters params) in checkBuilderParams() argument
65 if (!(params instanceof PKIXBuilderParameters)) { in checkBuilderParams()
69 return new BuilderParams((PKIXBuilderParameters)params); in checkBuilderParams()
78 private final PKIXParameters params; field in PKIX.ValidatorParams
90 ValidatorParams(CertPath cp, PKIXParameters params) in ValidatorParams() argument
93 this(params); in ValidatorParams()
101 ValidatorParams(PKIXParameters params) in ValidatorParams() argument
[all …]
DPKIXCertPathValidator.java75 CertPathParameters params) in engineValidate() argument
78 ValidatorParams valParams = PKIX.checkParams(cp, params); in engineValidate()
82 private static PKIXCertPathValidatorResult validate(ValidatorParams params) in validate() argument
91 List<X509Certificate> certList = params.certificates(); in validate()
117 for (TrustAnchor anchor : params.trustAnchors()) { in validate()
143 return validate(anchor, params); in validate()
162 ValidatorParams params) in validate() argument
165 int certPathLen = params.certificates().size(); in validate()
173 params.targetCertConstraints())); in validate()
179 PolicyChecker pc = new PolicyChecker(params.initialPolicies(), in validate()
[all …]
/libcore/luni/src/test/java/libcore/java/security/spec/
DAlgorithmParametersPSSTest.java69 AlgorithmParameters params = AlgorithmParameters.getInstance("PSS"); in testGetInstance() local
70 assertNotNull(params); in testGetInstance()
74 AlgorithmParameters params = AlgorithmParameters.getInstance("PSS"); in testGetAlgorithm() local
75 assertEquals("PSS", params.getAlgorithm()); in testGetAlgorithm()
79 AlgorithmParameters params = AlgorithmParameters.getInstance("PSS"); in testGetProvider() local
80 params.init(DEFAULT_SPEC); in testGetProvider()
81 assertNotNull(params.getProvider()); in testGetProvider()
85 AlgorithmParameters params = AlgorithmParameters.getInstance("PSS"); in testInitFailsWhenAlreadyInitialized() local
86 params.init(DEFAULT_SPEC); in testInitFailsWhenAlreadyInitialized()
88 params.init(DEFAULT_SPEC); in testInitFailsWhenAlreadyInitialized()
[all …]
/libcore/ojluni/src/main/java/sun/security/ec/
DECParameters.java136 public static NamedCurve getNamedCurve(ECParameterSpec params) { in getNamedCurve() argument
137 if ((params instanceof NamedCurve) || (params == null)) { in getNamedCurve()
138 return (NamedCurve)params; in getNamedCurve()
148 int fieldSize = params.getCurve().getField().getFieldSize(); in getNamedCurve()
156 if (namedCurve.getCurve().equals(params.getCurve()) == false) { in getNamedCurve()
159 if (namedCurve.getGenerator().equals(params.getGenerator()) == false) { in getNamedCurve()
162 if (namedCurve.getOrder().equals(params.getOrder()) == false) { in getNamedCurve()
165 if (namedCurve.getCofactor() != params.getCofactor()) { in getNamedCurve()
176 public static String getCurveName(ECParameterSpec params) { in getCurveName() argument
177 NamedCurve curve = getNamedCurve(params); in getCurveName()
[all …]
DECPublicKeyImpl.java48 private ECParameterSpec params; field in ECPublicKeyImpl
54 public ECPublicKeyImpl(ECPoint w, ECParameterSpec params) in ECPublicKeyImpl() argument
57 this.params = params; in ECPublicKeyImpl()
60 (AlgorithmId.EC_oid, ECParameters.getAlgorithmParameters(params)); in ECPublicKeyImpl()
61 key = ECParameters.encodePoint(w, params.getCurve()); in ECPublicKeyImpl()
83 return params; in getParams()
98 params = algParams.getParameterSpec(ECParameterSpec.class); in parseKeyBits()
99 w = ECParameters.decodePoint(key, params.getCurve()); in parseKeyBits()
109 return "Sun EC public key, " + params.getCurve().getField().getFieldSize() in toString()
112 + "\n parameters: " + params; in toString()
DECPrivateKeyImpl.java67 private ECParameterSpec params; field in ECPrivateKeyImpl
81 public ECPrivateKeyImpl(BigInteger s, ECParameterSpec params) in ECPrivateKeyImpl() argument
84 this.params = params; in ECPrivateKeyImpl()
87 (AlgorithmId.EC_oid, ECParameters.getAlgorithmParameters(params)); in ECPrivateKeyImpl()
114 return params; in getParams()
149 params = algParams.getParameterSpec(ECParameterSpec.class); in parseKeyBits()
159 return "Sun EC private key, " + params.getCurve().getField().getFieldSize() in toString()
161 + s + "\n parameters: " + params; in toString()
/libcore/ojluni/src/main/java/java/security/cert/
DCertStore.java113 private CertStoreParameters params; field in CertStore
125 String type, CertStoreParameters params) { in CertStore() argument
129 if (params != null) in CertStore()
130 this.params = (CertStoreParameters) params.clone(); in CertStore()
233 public static CertStore getInstance(String type, CertStoreParameters params) in getInstance() argument
238 CertStoreSpi.class, type, params); in getInstance()
240 instance.provider, type, params); in getInstance()
303 CertStoreParameters params, String provider) in getInstance() argument
308 CertStoreSpi.class, type, params, provider); in getInstance()
310 instance.provider, type, params); in getInstance()
[all …]
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLSocket.java1345 SSLParameters params = new SSLParameters(); in getSSLParameters() local
1346 params.setCipherSuites(getEnabledCipherSuites()); in getSSLParameters()
1347 params.setProtocols(getEnabledProtocols()); in getSSLParameters()
1349 params.setNeedClientAuth(true); in getSSLParameters()
1351 params.setWantClientAuth(true); in getSSLParameters()
1353 return params; in getSSLParameters()
1377 public void setSSLParameters(SSLParameters params) { in setSSLParameters() argument
1379 s = params.getCipherSuites(); in setSSLParameters()
1383 s = params.getProtocols(); in setSSLParameters()
1387 if (params.getNeedClientAuth()) { in setSSLParameters()
[all …]
DSSLEngine.java1847 SSLParameters params = new SSLParameters(); in getSSLParameters() local
1848 params.setCipherSuites(getEnabledCipherSuites()); in getSSLParameters()
1849 params.setProtocols(getEnabledProtocols()); in getSSLParameters()
1851 params.setNeedClientAuth(true); in getSSLParameters()
1853 params.setWantClientAuth(true); in getSSLParameters()
1855 return params; in getSSLParameters()
1879 public void setSSLParameters(SSLParameters params) { in setSSLParameters() argument
1881 s = params.getCipherSuites(); in setSSLParameters()
1885 s = params.getProtocols(); in setSSLParameters()
1889 if (params.getNeedClientAuth()) { in setSSLParameters()
[all …]
DSSLServerSocket.java506 public void setSSLParameters(SSLParameters params) { in setSSLParameters() argument
508 s = params.getCipherSuites(); in setSSLParameters()
513 s = params.getProtocols(); in setSSLParameters()
518 if (params.getNeedClientAuth()) { in setSSLParameters()
520 } else if (params.getWantClientAuth()) { in setSSLParameters()
DSSLContextSpi.java194 SSLParameters params = new SSLParameters(); in engineGetSupportedSSLParameters() local
195 params.setCipherSuites(socket.getSupportedCipherSuites()); in engineGetSupportedSSLParameters()
196 params.setProtocols(socket.getSupportedProtocols()); in engineGetSupportedSSLParameters()
197 return params; in engineGetSupportedSSLParameters()
/libcore/ojluni/src/main/java/java/security/spec/
DECPrivateKeySpec.java43 private ECParameterSpec params; field in ECPrivateKeySpec
54 public ECPrivateKeySpec(BigInteger s, ECParameterSpec params) { in ECPrivateKeySpec() argument
58 if (params == null) { in ECPrivateKeySpec()
62 this.params = params; in ECPrivateKeySpec()
79 return params; in getParams()
DECPublicKeySpec.java42 private ECParameterSpec params; field in ECPublicKeySpec
55 public ECPublicKeySpec(ECPoint w, ECParameterSpec params) { in ECPublicKeySpec() argument
59 if (params == null) { in ECPublicKeySpec()
66 this.params = params; in ECPublicKeySpec()
83 return params; in getParams()
/libcore/ojluni/src/main/java/sun/net/www/protocol/http/
DDigestAuthentication.java170 Parameters params; field in DigestAuthentication
177 Parameters params) { in DigestAuthentication() argument
184 this.params = params; in DigestAuthentication()
189 Parameters params) { in DigestAuthentication() argument
197 this.params = params; in DigestAuthentication()
263 params.setNonce (newNonce); in isAuthorizationStale()
276 params.setNonce (p.findValue("nonce")); in setHeaders()
277 params.setOpaque (p.findValue("opaque")); in setHeaders()
278 params.setQop (p.findValue("qop")); in setHeaders()
293 if (params.nonce == null || authMethod == null || pw == null || realm == null) { in setHeaders()
[all …]
/libcore/luni/src/test/java/tests/targets/security/cert/
DCertificateTest.java630 PKIXParameters params = createPKIXParams(); in testVerifyMD2_chain() local
632 CertPathValidatorResult res = certPathValidator.validate(path, params); in testVerifyMD2_chain()
638 params.getTrustAnchors().contains(r.getTrustAnchor())); in testVerifyMD2_chain()
644 params = createPKIXParams(); in testVerifyMD2_chain()
647 res = certPathValidator.validate(path, params); in testVerifyMD2_chain()
652 params.getTrustAnchors().contains(r.getTrustAnchor())); in testVerifyMD2_chain()
655 certPathValidator.validate(path, params); in testVerifyMD2_chain()
669 PKIXParameters params = createPKIXParams(); in testVerifyMD5_chain() local
671 CertPathValidatorResult res = certPathValidator.validate(path, params); in testVerifyMD5_chain()
677 params.getTrustAnchors().contains(r.getTrustAnchor())); in testVerifyMD5_chain()
[all …]
/libcore/luni/src/test/java/tests/security/interfaces/
DDSAParamsTest.java35 DSAParams params = new DSAParameterSpec(p, q, g); in test_getG() local
36 assertEquals("Invalid G", g, params.getG()); in test_getG()
44 DSAParams params = new DSAParameterSpec(p, q, g); in test_getP() local
45 assertEquals("Invalid P", p, params.getP()); in test_getP()
53 DSAParams params = new DSAParameterSpec(p, q, g); in test_getQ() local
54 assertEquals("Invalid Q", q, params.getQ()); in test_getQ()
/libcore/luni/src/test/java/tests/security/spec/
DECPublicKeySpecTest.java31 ECParameterSpec params; field in ECPublicKeySpecTest
43 params = new ECParameterSpec(curve, ecpoint, BigInteger.valueOf(1), 1); in setUp()
44 ecpks = new ECPublicKeySpec(w, params); in setUp()
49 params = null; in tearDown()
64 assertEquals("wrong params value", params, ecpks.getParams()); in test_constructorLjava_security_spec_ECPointLjava_security_spec_ECParameterSpec()
69 new ECPublicKeySpec(null, params); in test_constructorLjava_security_spec_ECPointLjava_security_spec_ECParameterSpec()
95 assertEquals("wrong params value", params, ecpks.getParams()); in testGetParams()
/libcore/ojluni/src/main/java/sun/security/ssl/
DECDHCrypt.java61 ECGenParameterSpec params = new ECGenParameterSpec(curveName); in ECDHCrypt() local
62 kpg.initialize(params, random); in ECDHCrypt()
72 ECDHCrypt(ECParameterSpec params, SecureRandom random) { in ECDHCrypt() argument
75 kpg.initialize(params, random); in ECDHCrypt()
106 ECParameterSpec params = publicKey.getParams(); in getAgreedSecret() local
107 ECPoint point = JsseJce.decodePoint(encodedPoint, params.getCurve()); in getAgreedSecret()
109 ECPublicKeySpec spec = new ECPublicKeySpec(point, params); in getAgreedSecret()
DSSLServerSocketImpl.java287 SSLParameters params = super.getSSLParameters(); in getSSLParameters() local
290 params.setEndpointIdentificationAlgorithm(identificationProtocol); in getSSLParameters()
291 params.setAlgorithmConstraints(algorithmConstraints); in getSSLParameters()
293 return params; in getSSLParameters()
299 synchronized public void setSSLParameters(SSLParameters params) { in setSSLParameters() argument
300 super.setSSLParameters(params); in setSSLParameters()
303 identificationProtocol = params.getEndpointIdentificationAlgorithm(); in setSSLParameters()
304 algorithmConstraints = params.getAlgorithmConstraints(); in setSSLParameters()
/libcore/luni/src/test/java/libcore/javax/crypto/
DMockCipherSpi.java110 protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, in engineInit() argument
116 protected void engineInit(int opmode, Key key, AlgorithmParameters params, in engineInit() argument
130 protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, in engineInit() argument
136 protected void engineInit(int opmode, Key key, AlgorithmParameters params, in engineInit() argument
150 protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, in engineInit() argument
156 protected void engineInit(int opmode, Key key, AlgorithmParameters params, in engineInit() argument
172 protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, in engineInit() argument
180 protected void engineInit(int opmode, Key key, AlgorithmParameters params, in engineInit() argument
240 protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, in engineInit() argument
243 checkAlgorithmParameterSpec(params); in engineInit()
[all …]
/libcore/ojluni/src/main/java/sun/security/x509/
DAlgorithmId.java78 protected DerValue params; field in AlgorithmId
110 private AlgorithmId(ObjectIdentifier oid, DerValue params) in AlgorithmId() argument
113 this.params = params; in AlgorithmId()
114 if (this.params != null) { in AlgorithmId()
140 algParams.init(params.toByteArray()); in decodeParams()
167 params = new DerValue(algParams.getEncoded()); in derEncode()
169 params = null; in derEncode()
172 if (params == null) { in derEncode()
200 bytes.putDerValue(params); in derEncode()
240 if ((params != null) && algid.equals(specifiedWithECDSA_oid)) { in getName()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DExemptionMechanismSpiTest.java72 …protected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, Inva… in engineInit() argument
73 super.engineInit(key, params); in engineInit()
78 …protected void engineInit(Key key, AlgorithmParameters params) throws InvalidKeyException, Invalid… in engineInit() argument
79 super.engineInit(key, params); in engineInit()
99 AlgorithmParameters params = null; in testExemptionMechanismSpi01() local
107 emSpi.engineInit(key, params); in testExemptionMechanismSpi01()
123 emSpi.engineInit(key, params); in testExemptionMechanismSpi01()
/libcore/ojluni/src/main/java/java/lang/reflect/
DConstructor.java271 Class<?>[] params = getParameterTypes(); in toString() local
272 for (int j = 0; j < params.length; j++) { in toString()
273 sb.append(Field.getTypeName(params[j])); in toString()
274 if (j < (params.length - 1)) in toString()
349 Type[] params = getGenericParameterTypes(); in toGenericString() local
350 for (int j = 0; j < params.length; j++) { in toGenericString()
351 String param = (params[j] instanceof Class<?>)? in toGenericString()
352 Field.getTypeName((Class<?>)params[j]): in toGenericString()
353 (params[j].toString()); in toGenericString()
354 if (isVarArgs() && (j == params.length - 1)) // replace T[] with T... in toGenericString()
[all …]

123456