@Override public void encodeImplicit(int number) { encodeImplicit(CONTEXT_SPECIFIC_MASK, number); }
/** * Encode a {@code CertificationRequestInfo} using the given DER encoder. The ASN.1 definition of {@code CertificationRequestInfo} is: * * <pre> * CertificationRequestInfo ::= SEQUENCE { * version INTEGER { v1(0) } (v1,...), * subject Name, * subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, * attributes [0] Attributes{{ CRIAttributes }} * } * </pre> * * @param encoder the DER encoder */ private void encodeCertificationRequestInfo(final DEREncoder encoder) { encoder.startSequence(); encoder.encodeInteger(VERSION); encoder.writeEncoded(subjectDn.getEncoded()); encoder.writeEncoded(publicKey.getEncoded()); // subjectPKInfo encoder.encodeImplicit(0); encodeAttributes(encoder); encoder.endSequence(); }
/** * Recompute and restore the initial context token header for the given token. * * @param token the initial context token without the token header * @return the initial context token with the token header restored * @throws ASN1Exception if the mechanism OID cannot be DER encoded */ private byte[] restoreTokenHeader(byte[] token) throws ASN1Exception { final DEREncoder encoder = new DEREncoder(); encoder.encodeImplicit(APPLICATION_SPECIFIC_MASK, 0); encoder.startSequence(); try { encoder.writeEncoded(mechanism.getDER()); } catch (GSSException e) { throw new ASN1Exception(e); } encoder.writeEncoded(token); encoder.endSequence(); return encoder.getEncoded(); }
derEncoder.encodeImplicit(1); derEncoder.encodeBitString(issuerUniqueId); derEncoder.encodeImplicit(2); derEncoder.encodeBitString(subjectUniqueId);
encoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(encoder, new DNSName(serverName)); List<TrustedAuthority> trustedAuthorities = trustedAuthoritiesCallback.getTrustedAuthorities(); if ((trustedAuthorities != null) && (! trustedAuthorities.isEmpty())) { encoder.encodeImplicit(1); EntityUtil.encodeTrustedAuthorities(encoder, trustedAuthorities); tbsEncoder.encodeOctetString(randomB); if (entityB != null) { tbsEncoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(tbsEncoder, entityB); tbsEncoder.encodeImplicit(1); EntityUtil.encodeGeneralNames(tbsEncoder, authID); encoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(encoder, clientName, clientSubjectAltNames);
encoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(encoder, entityB); List<GeneralName> authId = null; if (authorizationId != null) { encoder.encodeImplicit(2); tbsEncoder.encodeOctetString(randomB); if (entityB != null) { tbsEncoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(tbsEncoder, entityB); tbsEncoder.encodeImplicit(1); EntityUtil.encodeGeneralNames(tbsEncoder, authId);
@Override public void encodeImplicit(int number) { encodeImplicit(CONTEXT_SPECIFIC_MASK, number); }
@Override public void encodeImplicit(int number) { encodeImplicit(CONTEXT_SPECIFIC_MASK, number); }
@Override public void encodeImplicit(int number) { encodeImplicit(CONTEXT_SPECIFIC_MASK, number); }
/** * Encode a {@code CertificationRequestInfo} using the given DER encoder. The ASN.1 definition of {@code CertificationRequestInfo} is: * * <pre> * CertificationRequestInfo ::= SEQUENCE { * version INTEGER { v1(0) } (v1,...), * subject Name, * subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, * attributes [0] Attributes{{ CRIAttributes }} * } * </pre> * * @param encoder the DER encoder */ private void encodeCertificationRequestInfo(final DEREncoder encoder) { encoder.startSequence(); encoder.encodeInteger(VERSION); encoder.writeEncoded(subjectDn.getEncoded()); encoder.writeEncoded(publicKey.getEncoded()); // subjectPKInfo encoder.encodeImplicit(0); encodeAttributes(encoder); encoder.endSequence(); }
/** * Encode a {@code CertificationRequestInfo} using the given DER encoder. The ASN.1 definition of {@code CertificationRequestInfo} is: * * <pre> * CertificationRequestInfo ::= SEQUENCE { * version INTEGER { v1(0) } (v1,...), * subject Name, * subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, * attributes [0] Attributes{{ CRIAttributes }} * } * </pre> * * @param encoder the DER encoder */ private void encodeCertificationRequestInfo(final DEREncoder encoder) { encoder.startSequence(); encoder.encodeInteger(VERSION); encoder.writeEncoded(subjectDn.getEncoded()); encoder.writeEncoded(publicKey.getEncoded()); // subjectPKInfo encoder.encodeImplicit(0); encodeAttributes(encoder); encoder.endSequence(); }
/** * Encode a {@code CertificationRequestInfo} using the given DER encoder. The ASN.1 definition of {@code CertificationRequestInfo} is: * * <pre> * CertificationRequestInfo ::= SEQUENCE { * version INTEGER { v1(0) } (v1,...), * subject Name, * subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, * attributes [0] Attributes{{ CRIAttributes }} * } * </pre> * * @param encoder the DER encoder */ private void encodeCertificationRequestInfo(final DEREncoder encoder) { encoder.startSequence(); encoder.encodeInteger(VERSION); encoder.writeEncoded(subjectDn.getEncoded()); encoder.writeEncoded(publicKey.getEncoded()); // subjectPKInfo encoder.encodeImplicit(0); encodeAttributes(encoder); encoder.endSequence(); }
/** * Recompute and restore the initial context token header for the given token. * * @param token the initial context token without the token header * @return the initial context token with the token header restored * @throws ASN1Exception if the mechanism OID cannot be DER encoded */ private byte[] restoreTokenHeader(byte[] token) throws ASN1Exception { final DEREncoder encoder = new DEREncoder(); encoder.encodeImplicit(APPLICATION_SPECIFIC_MASK, 0); encoder.startSequence(); try { encoder.writeEncoded(mechanism.getDER()); } catch (GSSException e) { throw new ASN1Exception(e); } encoder.writeEncoded(token); encoder.endSequence(); return encoder.getEncoded(); }
/** * Recompute and restore the initial context token header for the given token. * * @param token the initial context token without the token header * @return the initial context token with the token header restored * @throws ASN1Exception if the mechanism OID cannot be DER encoded */ private byte[] restoreTokenHeader(byte[] token) throws ASN1Exception { final DEREncoder encoder = new DEREncoder(); encoder.encodeImplicit(APPLICATION_SPECIFIC_MASK, 0); encoder.startSequence(); try { encoder.writeEncoded(mechanism.getDER()); } catch (GSSException e) { throw new ASN1Exception(e); } encoder.writeEncoded(token); encoder.endSequence(); return encoder.getEncoded(); }
/** * Recompute and restore the initial context token header for the given token. * * @param token the initial context token without the token header * @return the initial context token with the token header restored * @throws ASN1Exception if the mechanism OID cannot be DER encoded */ private byte[] restoreTokenHeader(byte[] token) throws ASN1Exception { final DEREncoder encoder = new DEREncoder(); encoder.encodeImplicit(APPLICATION_SPECIFIC_MASK, 0); encoder.startSequence(); try { encoder.writeEncoded(mechanism.getDER()); } catch (GSSException e) { throw new ASN1Exception(e); } encoder.writeEncoded(token); encoder.endSequence(); return encoder.getEncoded(); }
derEncoder.encodeImplicit(1); derEncoder.encodeBitString(issuerUniqueId); derEncoder.encodeImplicit(2); derEncoder.encodeBitString(subjectUniqueId);
derEncoder.encodeImplicit(1); derEncoder.encodeBitString(issuerUniqueId); derEncoder.encodeImplicit(2); derEncoder.encodeBitString(subjectUniqueId);
derEncoder.encodeImplicit(1); derEncoder.encodeBitString(issuerUniqueId); derEncoder.encodeImplicit(2); derEncoder.encodeBitString(subjectUniqueId);
encoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(encoder, new DNSName(serverName)); List<TrustedAuthority> trustedAuthorities = trustedAuthoritiesCallback.getTrustedAuthorities(); if ((trustedAuthorities != null) && (! trustedAuthorities.isEmpty())) { encoder.encodeImplicit(1); EntityUtil.encodeTrustedAuthorities(encoder, trustedAuthorities); tbsEncoder.encodeOctetString(randomB); if (entityB != null) { tbsEncoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(tbsEncoder, entityB); tbsEncoder.encodeImplicit(1); EntityUtil.encodeGeneralNames(tbsEncoder, authID); encoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(encoder, clientName, clientSubjectAltNames);
encoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(encoder, entityB); List<GeneralName> authId = null; if (authorizationId != null) { encoder.encodeImplicit(2); tbsEncoder.encodeOctetString(randomB); if (entityB != null) { tbsEncoder.encodeImplicit(0); EntityUtil.encodeGeneralNames(tbsEncoder, entityB); tbsEncoder.encodeImplicit(1); EntityUtil.encodeGeneralNames(tbsEncoder, authId);