public String toString() { return id.toString(); } }
/** * return the object identifier for the mac algorithm. */ public String getMacAlgOID() { return macAlg.getAlgorithm().toString(); }
/** * Recupera el tipo de contenido. * @return Tipo de contenido. */ public String getContentType() { return this.contentInfo.getContentType().toString(); }
/** * return the object identifier for the mac algorithm. */ public String getMacAlgOID() { return macAlg.getAlgorithm().toString(); }
/** * return the object identifier for the content encryption algorithm. */ public String getEncryptionAlgOID() { return encAlg.getAlgorithm().toString(); }
/** * return the object identifier for the content encryption algorithm. */ public String getEncryptionAlgOID() { return encAlg.getAlgorithm().toString(); }
/** * Recupera el algoritmo de huella digital configurada para los empaquetados. * @return Algoritmo. */ public String getDigestAlgorithm() { return this.digestAlgorithm.getAlgorithm().toString(); }
/** * Add an attribute with multiple values to the certification request we are building. * Removed existing attributes with the same attrType. * * @param attrType the OID giving the type of the attribute. * @param attrValue the ASN.1 structure that forms the value of the attribute. * @return this builder object. */ public PKCS10CertificationRequestBuilder setAttribute(ASN1ObjectIdentifier attrType, ASN1Encodable[] attrValue) { // Remove existing copies of the attribute. for (Iterator it = attributes.iterator(); it.hasNext(); ) { if (((Attribute)it.next()).getAttrType().equals(attrType)) { throw new IllegalStateException("Attribute " + attrType.toString() + " is already set"); } } addAttribute(attrType, attrValue); return this; }
continue; identifier = ident.toString();
/** * Set an attribute to the certification request we are building. * Removed existing attributes with the same attrType. * * @param attrType the OID giving the type of the attribute. * @param attrValue the ASN.1 structure that forms the value of the attribute. * @return this builder object. */ public PKCS10CertificationRequestBuilder setAttribute(ASN1ObjectIdentifier attrType, ASN1Encodable attrValue) { // Remove existing copies of the attribute. for (Iterator it = attributes.iterator(); it.hasNext(); ) { if (((Attribute)it.next()).getAttrType().equals(attrType)) { throw new IllegalStateException("Attribute " + attrType.toString() + " is already set"); } } addAttribute(attrType, attrValue); return this; }
private static List<String> getCertificatePolicyIds(final X509Certificate cert) { final byte[] certificatePoliciesBytes = cert.getExtensionValue("2.5.29.32"); //$NON-NLS-1$ if (certificatePoliciesBytes == null || certificatePoliciesBytes.length < 1) { return new ArrayList<>(0); } final CertificatePolicies certificatePolicies = CertificatePolicies.getInstance( ASN1Sequence.getInstance( ASN1OctetString.getInstance(certificatePoliciesBytes).getOctets() ) ); final PolicyInformation[] pis = certificatePolicies.getPolicyInformation(); final List<String> policyOids = new ArrayList<>(pis.length); for (final PolicyInformation pi : pis) { policyOids.add(pi.getPolicyIdentifier().toString()); } return policyOids; }
if (algo.getOid().equals(algClave.getAlgorithm().toString())) { algorithm = algo; break;
final SignerInfo si = SignerInfo.getInstance(signerInfosSd.getObjectAt(i)); final AlgorithmIdentifier algHash = si.getDigestAlgorithm(); if (algHash.getAlgorithm().toString().equals(AOAlgorithmID.getOID(digestAlgorithm))) { final ASN1Set signedAttrib = si.getAuthenticatedAttributes(); for (int s = 0; s < signedAttrib.size(); s++) { final ASN1Sequence elemento = (ASN1Sequence) signedAttrib.getObjectAt(s); final ASN1ObjectIdentifier oids = (ASN1ObjectIdentifier) elemento.getObjectAt(0); if (CMSAttributes.messageDigest.getId().equals(oids.toString())) { final DERSet derSetHash = (DERSet) elemento.getObjectAt(1); final DEROctetString derHash = (DEROctetString) derSetHash.getObjectAt(0);
final String algoritmoOid = alg.getAlgorithm().toString();
final AlgorithmIdentifier algHash = si.getDigestAlgorithm(); if (algHash.getAlgorithm().toString().equals(AOAlgorithmID.getOID(digestAlgorithm))) { final ASN1Set signedAttrib = si.getAuthenticatedAttributes(); for (int s = 0; s < signedAttrib.size(); s++) { final ASN1Sequence elemento = (ASN1Sequence) signedAttrib.getObjectAt(s); final ASN1ObjectIdentifier oids = (ASN1ObjectIdentifier) elemento.getObjectAt(0); if (CMSAttributes.messageDigest.getId().toString().equals(oids.toString())) { final DERSet derSetHash = (DERSet) elemento.getObjectAt(1); final DEROctetString derHash = (DEROctetString) derSetHash.getObjectAt(0);