gpt4 book ai didi

org.bitcoinj.crypto.X509Utils类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 17:26:40 34 4
gpt4 key购买 nike

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

X509Utils介绍

[英]X509Utils provides tools for working with X.509 certificates and keystores, as used in the BIP 70 payment protocol. For more details on this, see org.bitcoinj.protocols.payments.PaymentSession, the article "Working with the payment protocol" on the bitcoinj website, or the Bitcoin developer guide.
[中]X509Utils提供了用于处理BIP 70支付协议中使用的X.509证书和密钥库的工具。有关这方面的更多详细信息,请参阅org。比特币。协议。付款。PaymentSession,bitcoinj网站上的文章“使用支付协议”,或《比特币开发者指南》。

代码示例

代码示例来源:origin: fr.acinq/bitcoinj-core

private PkiVerificationData(@Nullable String displayName, PublicKey merchantSigningKey,
              TrustAnchor rootAuthority) throws PaymentProtocolException.PkiVerificationException {
  try {
    this.displayName = displayName;
    this.merchantSigningKey = merchantSigningKey;
    this.rootAuthority = rootAuthority;
    this.rootAuthorityName = X509Utils.getDisplayNameFromCertificate(rootAuthority.getTrustedCert(), true);
  } catch (CertificateParsingException x) {
    throw new PaymentProtocolException.PkiVerificationException(x);
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

@Override
  public KeyStore getKeyStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore(DEFAULT_KEYSTORE_TYPE, DEFAULT_KEYSTORE_PASSWORD, new FileInputStream(path));
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

private PkiVerificationData(@Nullable String displayName, PublicKey merchantSigningKey,
              TrustAnchor rootAuthority) throws PaymentProtocolException.PkiVerificationException {
  try {
    this.displayName = displayName;
    this.merchantSigningKey = merchantSigningKey;
    this.rootAuthority = rootAuthority;
    this.rootAuthorityName = X509Utils.getDisplayNameFromCertificate(rootAuthority.getTrustedCert(), true);
  } catch (CertificateParsingException x) {
    throw new PaymentProtocolException.PkiVerificationException(x);
  }
}

代码示例来源:origin: fr.acinq/bitcoinj-core

@Override
  public KeyStore getKeyStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore(DEFAULT_KEYSTORE_TYPE, DEFAULT_KEYSTORE_PASSWORD, new FileInputStream(path));
  }
}

代码示例来源:origin: greenaddress/GreenBits

private PkiVerificationData(@Nullable String displayName, PublicKey merchantSigningKey,
              TrustAnchor rootAuthority) throws PaymentProtocolException.PkiVerificationException {
  try {
    this.displayName = displayName;
    this.merchantSigningKey = merchantSigningKey;
    this.rootAuthority = rootAuthority;
    this.rootAuthorityName = X509Utils.getDisplayNameFromCertificate(rootAuthority.getTrustedCert(), true);
  } catch (CertificateParsingException x) {
    throw new PaymentProtocolException.PkiVerificationException(x);
  }
}

代码示例来源:origin: HashEngineering/dashj

@Override
  public KeyStore getKeyStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore(DEFAULT_KEYSTORE_TYPE, DEFAULT_KEYSTORE_PASSWORD, new FileInputStream(path));
  }
}

代码示例来源:origin: dogecoin/libdohj

private PkiVerificationData(@Nullable String displayName, PublicKey merchantSigningKey,
              TrustAnchor rootAuthority) throws PaymentProtocolException.PkiVerificationException {
  try {
    this.displayName = displayName;
    this.merchantSigningKey = merchantSigningKey;
    this.rootAuthority = rootAuthority;
    this.rootAuthorityName = X509Utils.getDisplayNameFromCertificate(rootAuthority.getTrustedCert(), true);
  } catch (CertificateParsingException x) {
    throw new PaymentProtocolException.PkiVerificationException(x);
  }
}

代码示例来源:origin: greenaddress/GreenBits

@Override
  public KeyStore getKeyStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore(DEFAULT_KEYSTORE_TYPE, DEFAULT_KEYSTORE_PASSWORD, new FileInputStream(path));
  }
}

代码示例来源:origin: HashEngineering/dashj

private PkiVerificationData(@Nullable String displayName, PublicKey merchantSigningKey,
              TrustAnchor rootAuthority) throws PaymentProtocolException.PkiVerificationException {
  try {
    this.displayName = displayName;
    this.merchantSigningKey = merchantSigningKey;
    this.rootAuthority = rootAuthority;
    this.rootAuthorityName = X509Utils.getDisplayNameFromCertificate(rootAuthority.getTrustedCert(), true);
  } catch (CertificateParsingException x) {
    throw new PaymentProtocolException.PkiVerificationException(x);
  }
}

代码示例来源:origin: greenaddress/GreenBits

private KeyStore loadFallbackStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore("JKS", DEFAULT_KEYSTORE_PASSWORD, getClass().getResourceAsStream("cacerts"));
  }
}

代码示例来源:origin: greenaddress/GreenBits

@Test
  public void testDisplayName() throws Exception {
    CertificateFactory cf = CertificateFactory.getInstance("X.509");

    X509Certificate clientCert = (X509Certificate) cf.generateCertificate(getClass().getResourceAsStream(
        "startssl-client.crt"));
    assertEquals("Andreas Schildbach", X509Utils.getDisplayNameFromCertificate(clientCert, false));

    X509Certificate comodoCert = (X509Certificate) cf.generateCertificate(getClass().getResourceAsStream(
        "comodo-smime.crt"));
    assertEquals("comodo.com@schildbach.de", X509Utils.getDisplayNameFromCertificate(comodoCert, true));
  }
}

代码示例来源:origin: fr.acinq/bitcoinj-core

private KeyStore loadFallbackStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore("JKS", DEFAULT_KEYSTORE_PASSWORD, getClass().getResourceAsStream("cacerts"));
  }
}

代码示例来源:origin: fr.acinq/bitcoinj-core

String displayName = X509Utils.getDisplayNameFromCertificate(cert, true);
if (displayName == null)
  throw new PaymentProtocolException.PkiVerificationException("Could not extract name from certificate");

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

private KeyStore loadFallbackStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore("JKS", DEFAULT_KEYSTORE_PASSWORD, getClass().getResourceAsStream("cacerts"));
  }
}

代码示例来源:origin: HashEngineering/dashj

String displayName = X509Utils.getDisplayNameFromCertificate(cert, true);
if (displayName == null)
  throw new PaymentProtocolException.PkiVerificationException("Could not extract name from certificate");

代码示例来源:origin: HashEngineering/dashj

private KeyStore loadFallbackStore() throws FileNotFoundException, KeyStoreException {
    return X509Utils.loadKeyStore("JKS", DEFAULT_KEYSTORE_PASSWORD, getClass().getResourceAsStream("cacerts"));
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

String displayName = X509Utils.getDisplayNameFromCertificate(cert, true);
if (displayName == null)
  throw new PaymentProtocolException.PkiVerificationException("Could not extract name from certificate");

代码示例来源:origin: fr.acinq/bitcoinj-core

return X509Utils.loadKeyStore(keystoreType, DEFAULT_KEYSTORE_PASSWORD,
      new FileInputStream(keystorePath));
} catch (FileNotFoundException e) {

代码示例来源:origin: dogecoin/libdohj

String displayName = X509Utils.getDisplayNameFromCertificate(cert, true);
if (displayName == null)
  throw new PaymentProtocolException.PkiVerificationException("Could not extract name from certificate");

代码示例来源:origin: HashEngineering/dashj

return X509Utils.loadKeyStore(keystoreType, DEFAULT_KEYSTORE_PASSWORD,
      new FileInputStream(keystorePath));
} catch (FileNotFoundException e) {

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