Tabnine Logo
ApRep.getEncRepPart
Code IndexAdd Tabnine to your IDE (free)

How to use
getEncRepPart
method
in
org.apache.kerby.kerberos.kerb.type.ap.ApRep

Best Java code snippets using org.apache.kerby.kerberos.kerb.type.ap.ApRep.getEncRepPart (Showing top 3 results out of 315)

origin: apache/directory-kerby

EncryptionKey key = apRep.getEncRepPart().getSubkey();
if (key != null) {
  setSessionKey(key, ACCEPTOR_SUBKEY);
int seqNum = apRep.getEncRepPart().getSeqNumber();
setPeerSequenceNumber(seqNum == -1 ? 0 : seqNum);
origin: com.redhat.red.build/kojiji

public static ApRep readRep( byte[] buf, EncryptionKey key, long allowableClockSkew, ApReq apReq, InetAddress initiator )
    throws KrbException
{
  ApRep apRep = KrbCodec.decode( buf, ApRep.class );
  if ( apRep.getPvno() != KrbConstant.KRB_V5 )
  {
    throw new KrbException( KrbErrorCode.KRB_AP_ERR_BADVERSION );
  }
  if ( !apRep.getMsgType().equals( KrbMessageType.AP_REP ) )
  {
    throw new KrbException( KrbErrorCode.KRB_AP_ERR_MSG_TYPE );
  }
  try {
    ApRequest.validate( key, apReq, initiator, allowableClockSkew * 1000 );
  } catch (KrbException e) {
    // XXX: The checksum verification fails, but we can continue, so just log the error
    logger.debug("Ap Request validation error: code={}, message={}", e.getKrbErrorCode(), e.getMessage(), e );
  }
  EncAPRepPart encRepPart = EncryptionUtil.unseal( apRep.getEncryptedEncPart(), key, KeyUsage.AP_REP_ENCPART, EncAPRepPart.class );
  apRep.setEncRepPart( encRepPart );
  ApRequest.unsealAuthenticator( key, apReq );
  EncAPRepPart encAPRepPart = apRep.getEncRepPart();
  Authenticator authenticator = apReq.getAuthenticator();
  if ( !encAPRepPart.getCtime().equals( authenticator.getCtime() ) || encAPRepPart.getCusec() != authenticator.getCusec() )
  {
    throw new KrbException( KrbErrorCode.KRB_AP_ERR_MODIFIED );
  }
  return apRep;
}
origin: com.redhat.red.build/kojiji

if ( sessionInfoPriv.getEncPart().getSeqNumber() != apRep.getEncRepPart().getSeqNumber() )
org.apache.kerby.kerberos.kerb.type.apApRepgetEncRepPart

Popular methods of ApRep

  • <init>
    Creates an instance of ApRep
  • getEncryptedEncPart
  • getMsgType
  • getPvno
  • setEncRepPart
    Set the decrypted EncRepPart into the message
  • decode
  • encode
  • encodingLength
  • getFieldAs
  • setEncryptedEncPart
    Set the encrypted part into the message
  • setFieldAs
  • setFieldAs

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now