Examples of KeyManager


Examples of client.net.sf.saxon.ce.trans.KeyManager

        }
        DocumentInfo doc = e.getDocumentRoot();
        if (doc == null) {
            return false;
        }
        KeyManager km = context.getController().getExecutable().getKeyManager();
        SequenceIterator iter = expression.iterate(context);
        while (true) {
            Item it = iter.next();
            if (it == null) {
                return false;
            }
            SequenceIterator nodes = km.selectByKey(kds, doc, (AtomicValue)it, context);
            while (true) {
                NodeInfo n = (NodeInfo)nodes.next();
                if (n == null) {
                    break;
                }
View Full Code Here

Examples of client.net.sf.saxon.ce.trans.KeyManager

        int slots = match.allocateSlots(getStaticContext(), stackFrameMap, 0);
        allocatePatternSlots(slots);
        //allocateSlots(new PatternSponsor(match));


        KeyManager km = getExecutable().getKeyManager();
        KeyDefinition keydef = new KeyDefinition(match, use, collationName, collator);
        keydef.setIndexedItemType(useType);
        keydef.setStackFrameMap(stackFrameMap);
        keydef.setSourceLocator(this);
        keydef.setExecutable(getExecutable());
        keydef.setBackwardsCompatible(xPath10ModeIsEnabled());
        try {
            km.addKeyDefinition(keyName, keydef, exec.getConfiguration());
        } catch (XPathException err) {
            compileError(err);
        }
        return null;
    }
View Full Code Here

Examples of client.net.sf.saxon.ce.trans.KeyManager

                            " must be in a tree whose root is a document node", "XTDE1270", context);
            return null;
        }
        DocumentInfo doc = (DocumentInfo)root;

        final KeyManager keyManager = controller.getExecutable().getKeyManager();
        KeyDefinitionSet selectedKeySet = staticKeySet;
        if (selectedKeySet == null) {
            String givenkeyname = argument[0].evaluateItem(context).getStringValue();
            StructuredQName qName = null;
            try {
                qName = StructuredQName.fromLexicalQName(
                            givenkeyname, false,
                            nsContext);
            } catch (XPathException err) {
                dynamicError("Invalid key name: " + err.getMessage(), "XTDE1260", context);
            }
            selectedKeySet = keyManager.getKeyDefinitionSet(qName);
            if (selectedKeySet == null) {
                dynamicError("Key '" + givenkeyname + "' has not been defined", "XTDE1260", context);
                return null;
            }
        }

//        if (internal) {
//            System.err.println("Using key " + fprint + " on doc " + doc);
//        }

        // If the second argument is a singleton, we evaluate the function
        // directly; otherwise we recurse to evaluate it once for each Item
        // in the sequence.

        Expression expression = argument[1];
        SequenceIterator allResults;
        if (Cardinality.allowsMany(expression.getCardinality())) {
            final XPathContext keyContext = context;
            final DocumentInfo document = doc;
            final KeyDefinitionSet keySet = selectedKeySet;
            MappingFunction map = new MappingFunction() {
                // Map a value to the sequence of nodes having that value as a key value
                public SequenceIterator map(Item item) throws XPathException {
                    return keyManager.selectByKey(
                            keySet, document, (AtomicValue)item, keyContext);
                }
            };

            SequenceIterator keys = argument[1].iterate(context);
            SequenceIterator allValues = new MappingIterator(keys, map);
            allResults = new DocumentOrderIterator(allValues, LocalOrderComparer.getInstance());
        } else {
            try {
                AtomicValue keyValue = (AtomicValue)argument[1].evaluateItem(context);
                if (keyValue == null) {
                    return EmptyIterator.getInstance();
                }
                allResults = keyManager.selectByKey(selectedKeySet, doc, keyValue, context);
            } catch (XPathException e) {
                e.maybeSetLocation(getSourceLocator());
                throw e;
            }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.trans.KeyManager

     * @return the KeyManager containing the xsl:key definitions
     */

    public KeyManager getKeyManager() {
        if (keyManager == null) {
            keyManager = new KeyManager();
        }
        return keyManager;
    }
View Full Code Here

Examples of javax.net.ssl.KeyManager

    }

    protected static KeyManager[] getKeyManagersWithCertAlias(TLSClientParameters tlsClientParameters,
                                                      KeyManager[] keyManagers) throws GeneralSecurityException {
        if (tlsClientParameters.getCertAlias() != null) {
            KeyManager ret[] = new KeyManager[keyManagers.length]
            for (int idx = 0; idx < keyManagers.length; idx++) {
                if (keyManagers[idx] instanceof X509KeyManager) {
                    try {
                        ret[idx] = new AliasedX509ExtendedKeyManager(tlsClientParameters.getCertAlias(),
                                                                             (X509KeyManager)keyManagers[idx]);
View Full Code Here

Examples of javax.net.ssl.KeyManager

  public PlatformLayerHttpRequest(PlatformLayerHttpTransport client, HttpMethod method, URI uri,
      List<String> trustKeys) throws PlatformLayerClientException {
    this.client = client;

    KeyManager keyManager = null;
    TrustManager trustManager = null;
    HostnameVerifier hostnameVerifier = null;

    if (trustKeys != null) {
      trustManager = new PublicKeyTrustManager(trustKeys);
View Full Code Here

Examples of javax.net.ssl.KeyManager

    CertificateAndKey certificateAndKey = encryptionStore.getCertificateAndKey(cert);

    HostnameVerifier hostnameVerifier = null;

    KeyManager keyManager = new SimpleClientCertificateKeyManager(certificateAndKey);

    TrustManager trustManager = null;

    String trustKeys = configuration.lookup("auth.system.ssl.keys", null);
View Full Code Here

Examples of javax.net.ssl.KeyManager

    String keystoneUserUrl = configuration.lookup("auth.user.url", "https://127.0.0.1:"
        + PORT_PLATFORMLAYER_AUTH_USER + "/v2.0/");

    HostnameVerifier hostnameVerifier = null;

    KeyManager keyManager = null;

    TrustManager trustManager = null;

    String trustKeys = configuration.lookup("auth.user.ssl.keys", null);
View Full Code Here

Examples of javax.net.ssl.KeyManager

    auth.setCertificateCredentials(certificateCredentials);

    AuthenticateRequest request = new AuthenticateRequest();
    request.setAuth(auth);

    final KeyManager keyManager = new SimpleClientCertificateKeyManager(privateKey, certificateChain);

    for (int i = 0; i < 2; i++) {
      AuthenticateResponse response;
      try {
        RestfulRequest<AuthenticateResponse> httpRequest = httpClient.buildRequest(HttpMethod.POST,
View Full Code Here

Examples of javax.net.ssl.KeyManager

      List<String> trustKeys) {
    this.username = username;
    this.password = password;

    HostnameVerifier hostnameVerifier = null;
    KeyManager keyManager = null;
    TrustManager trustManager = null;

    if (trustKeys != null) {
      trustManager = new PublicKeyTrustManager(trustKeys);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.