gpt4 book ai didi

org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory类的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 07:01:05 34 4
gpt4 key购买 nike

本文整理了Java中org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory类的一些代码示例,展示了X509KeyInfoGeneratorFactory类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509KeyInfoGeneratorFactory类的具体详情如下:
包路径:org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorFactory
类名称:X509KeyInfoGeneratorFactory

X509KeyInfoGeneratorFactory介绍

暂无

代码示例

代码示例来源:origin: line/armeria

final X509KeyInfoGeneratorFactory keyInfoGeneratorFactory = new X509KeyInfoGeneratorFactory();
keyInfoGeneratorFactory.setEmitEntityCertificate(true);
keyInfoGeneratorFactory.setEmitEntityCertificateChain(true);
final KeyInfoGenerator keyInfoGenerator = keyInfoGeneratorFactory.newInstance();

代码示例来源:origin: org.apache.syncope.ext.saml2sp/syncope-ext-saml2sp-logic

public void init() {
  X509KeyInfoGeneratorFactory keyInfoGeneratorFactory = new X509KeyInfoGeneratorFactory();
  keyInfoGeneratorFactory.setEmitEntityCertificate(true);
  keyInfoGenerator = keyInfoGeneratorFactory.newInstance();
  // Try to load a signature algorithm
  if (loader.getSignatureAlgorithm() != null) {
    SignatureAlgorithm loadedSignatureAlgorithm =
        SignatureAlgorithm.valueOf(loader.getSignatureAlgorithm());
    if (loadedSignatureAlgorithm != null) {
      sigAlgo = loadedSignatureAlgorithm.getAlgorithm();
      jceSigAlgo = JCEMapper.translateURItoJCEID(sigAlgo);
    }
    if (jceSigAlgo == null) {
      LOG.warn("Signature algorithm {} is not valid. Using default algorithm instead.",
          loader.getSignatureAlgorithm());
      sigAlgo = null;
    }
  }
  if (sigAlgo == null) {
    sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1;
    String pubKeyAlgo = loader.getCredential().getPublicKey().getAlgorithm();
    if (pubKeyAlgo.equalsIgnoreCase("DSA")) {
      sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_DSA_SHA1;
    } else if (pubKeyAlgo.equalsIgnoreCase("EC")) {
      sigAlgo = SignatureConstants.ALGO_ID_SIGNATURE_ECDSA_SHA1;
    }
    jceSigAlgo = JCEMapper.translateURItoJCEID(sigAlgo);
  }
  callbackHandler = new SAMLSPCallbackHandler(loader.getKeyPass());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common

X509KeyInfoGeneratorFactory kiFactory = new X509KeyInfoGeneratorFactory();
KeyInfoBean.CERT_IDENTIFIER certIdentifier = keyInfo.getCertIdentifer();
switch (certIdentifier) {
  case X509_CERT:
    kiFactory.setEmitEntityCertificate(true);
    break;
  case KEY_VALUE:
    kiFactory.setEmitPublicKeyValue(true);
    break;
  case X509_ISSUER_SERIAL:
    kiFactory.setEmitX509IssuerSerial(true);
return kiFactory.newInstance().generate(keyInfoCredential);

代码示例来源:origin: apache/cxf

X509KeyInfoGeneratorFactory kiFactory = new X509KeyInfoGeneratorFactory();
kiFactory.setEmitEntityCertificate(true);
  KeyInfo keyInfo = kiFactory.newInstance().generate(signingCredential);
  signature.setKeyInfo(keyInfo);
} catch (org.opensaml.security.SecurityException ex) {

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common

X509KeyInfoGeneratorFactory kiFactory = new X509KeyInfoGeneratorFactory();
if (sendKeyValue) {
  kiFactory.setEmitPublicKeyValue(true);
} else {
  kiFactory.setEmitEntityCertificate(true);
  KeyInfo keyInfo = kiFactory.newInstance().generate(signingCredential);
  signature.setKeyInfo(keyInfo);
} catch (org.opensaml.security.SecurityException ex) {

代码示例来源:origin: org.apache.cxf.fediz/fediz-idp-core

X509KeyInfoGeneratorFactory kiFactory = new X509KeyInfoGeneratorFactory();
kiFactory.setEmitEntityCertificate(true);
  KeyInfo keyInfo = kiFactory.newInstance().generate(signingCredential);
  signature.setKeyInfo(keyInfo);
} catch (org.opensaml.security.SecurityException ex) {

代码示例来源:origin: com.linecorp.armeria/armeria-saml

final X509KeyInfoGeneratorFactory keyInfoGeneratorFactory = new X509KeyInfoGeneratorFactory();
keyInfoGeneratorFactory.setEmitEntityCertificate(true);
keyInfoGeneratorFactory.setEmitEntityCertificateChain(true);
final KeyInfoGenerator keyInfoGenerator = keyInfoGeneratorFactory.newInstance();

代码示例来源:origin: codice/ddf

X509KeyInfoGeneratorFactory x509KeyInfoGeneratorFactory = new X509KeyInfoGeneratorFactory();
x509KeyInfoGeneratorFactory.setEmitEntityCertificate(true);
 KeyInfo keyInfo = x509KeyInfoGeneratorFactory.newInstance().generate(signingCredential);
 signature.setKeyInfo(keyInfo);
} catch (org.opensaml.security.SecurityException e) {

代码示例来源:origin: org.apache.syncope.ext.saml2sp/syncope-ext-saml2sp-logic

spSSODescriptor.addSupportedProtocol(SAMLConstants.SAML20P_NS);
X509KeyInfoGeneratorFactory keyInfoGeneratorFactory = new X509KeyInfoGeneratorFactory();
keyInfoGeneratorFactory.setEmitEntityCertificate(true);
KeyInfoGenerator keyInfoGenerator = keyInfoGeneratorFactory.newInstance();
keyInfoGenerator.generate(loader.getCredential());

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com