/** * @return the bits corresponding the authorizations contained in the certificate * See Iso7816CertificateHolderAuthorization static int for values * @throws IOException */ public Flags getHolderAuthorizationRights() throws IOException { return new Flags(certificateBody.getCertificateHolderAuthorization().getAccessRights() & 0x1F); } }
/** * @return the Holder authorization and role (CVCA, DV, IS). */ public ASN1ObjectIdentifier getHolderAuthorization() throws IOException { CertificateHolderAuthorization cha = certificateBody.getCertificateHolderAuthorization(); return cha.getOid(); }
/** * @return the bits corresponding to the role intented for the certificate * See Iso7816CertificateHolderAuthorization static int for values * @throws IOException */ public int getHolderAuthorizationRole() throws IOException { int rights = certificateBody.getCertificateHolderAuthorization().getAccessRights(); return rights & 0xC0; }
/** * Return the public key data object carried in the request * @return the public key */ public PublicKeyDataObject getPublicKey() { return certificateBody.getPublicKey(); }
/** * Create an iso7816Certificate structure from a ASN1ApplicationSpecific. * * @param appSpe the ASN1ApplicationSpecific object. * @return the Iso7816CertificateStructure represented by the ASN1ApplicationSpecific object. * @throws IOException if there is a problem parsing the data. */ private CVCertificate(ASN1ApplicationSpecific appSpe) throws IOException { setPrivateData(appSpe); }
public static int getTag(int encodedTag) { /* int i; for (i = 24; i>=0; i-=8) { if (((0xFF<<i) & tag) != 0) return (((0xFF<<i) & tag) >> i); } return 0; */ return decodeTag(encodedTag); }
/** * Create an iso7816Certificate structure from an ASN1InputStream. * * @param aIS the byte stream to parse. * @throws IOException if there is a problem parsing the data. */ public CVCertificate(ASN1InputStream aIS) throws IOException { initFrom(aIS); }
/** * @return the Authority Reference field of the certificate * @throws IOException */ public CertificationAuthorityReference getAuthorityReference() throws IOException { return certificateBody.getCertificationAuthorityReference(); }
public PackedDate( String time) { this.time = convert(time); }
/** * @return the date of the certificate generation */ public PackedDate getEffectiveDate() throws IOException { return certificateBody.getCertificateEffectiveDate(); }
/** * set the public Key * * @param publicKey : the ASN1ApplicationSpecific containing the public key * @throws java.io.IOException */ private void setPublicKey(PublicKeyDataObject publicKey) { this.publicKey = PublicKeyDataObject.getInstance(publicKey); this.certificateType |= PK; }
/** * @return the type of certificate (request or profile) * value is either Iso7816CertificateBody.profileType * or Iso7816CertificateBody.requestType. Any other value * is not valid. */ public int getCertificateType() { return this.certificateBody.getCertificateType(); }
/** * builds an Iso7816CertificateBody with an ASN1InputStream. * * @param obj DERApplicationSpecific containing the whole body. * @throws IOException if the body is not valid. */ private CertificateBody(DERApplicationSpecific obj) throws IOException { setIso7816CertificateBody(obj); }
/** * @return the bits corresponding the authorizations contained in the certificate * See Iso7816CertificateHolderAuthorization static int for values * @throws IOException */ public Flags getHolderAuthorizationRights() throws IOException { return new Flags(certificateBody.getCertificateHolderAuthorization().getAccessRights() & 0x1F); } }
/** * @return the bits corresponding to the role intented for the certificate * See Iso7816CertificateHolderAuthorization static int for values * @throws IOException */ public int getHolderAuthorizationRole() throws IOException { int rights = certificateBody.getCertificateHolderAuthorization().getAccessRights(); return rights & 0xC0; }
/** * @return the Holder authorization and role (CVCA, DV, IS). */ public ASN1ObjectIdentifier getHolderAuthorization() throws IOException { CertificateHolderAuthorization cha = certificateBody.getCertificateHolderAuthorization(); return cha.getOid(); }
/** * Return the public key data object carried in the request * @return the public key */ public PublicKeyDataObject getPublicKey() { return certificateBody.getPublicKey(); }
/** * Create an iso7816Certificate structure from a DERApplicationSpecific. * * @param appSpe the DERApplicationSpecific object. * @return the Iso7816CertificateStructure represented by the DERApplicationSpecific object. * @throws IOException if there is a problem parsing the data. */ private CVCertificate(DERApplicationSpecific appSpe) throws IOException { setPrivateData(appSpe); }
/** * return a bits field coded on one byte. For signification of the * several bit see Iso7816CertificateHolderAuthorization * * @return role and access rigth * @throws IOException * @see CertificateHolderAuthorization */ public int getRole() throws IOException { CertificateHolderAuthorization cha = certificateBody.getCertificateHolderAuthorization(); return cha.getAccessRights(); }
/** * return a bits field coded on one byte. For signification of the * several bit see Iso7816CertificateHolderAuthorization * * @return role and access rigth * @throws IOException * @see CertificateHolderAuthorization */ public int getRole() throws IOException { CertificateHolderAuthorization cha = certificateBody.getCertificateHolderAuthorization(); return cha.getAccessRights(); }