|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.provider.revocation.ocsp.OCSPutil
This class contains static utility routes for OCSP.java
Copyright © RSA Security Inc., 2001. All rights reserved.
Constructor Summary |
|
OCSPutil()
|
Method Summary |
|
static byte[] |
extractKeyDER(byte[] ber,
int offset)
Returns the value of the given key in BER, ber beginning at offset. |
static String |
getAIALocation(X509Certificate cert)
Gets the location of the first
|
static byte[] |
makeDataDigest(CertJ certJ,
String digestAlg,
byte[] data,
int offset,
int len)
Makes a data digest for cert using the algorithm contained in digestAlg and updates the digest object specified in data at the location given by offset and len. |
static int |
selectCertificateByKeyHash(CertJ certJ,
DatabaseService db,
byte[] hash,
int hashOffset,
int hashLen,
Vector certs)
Find the certificate in the database with the
specified SHA1 keyHash and add it to
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OCSPutil()
Method Detail |
public static String getAIALocation(X509Certificate cert)
AuthorityInfoAccess
that is a URL.
Any subsequent AIAs are ignored.Parameters
cert | An |
Returns
null
.public static byte[] makeDataDigest(CertJ certJ, String digestAlg, byte[] data, int offset, int len) throws InvalidParameterException
Parameters
certJ | A | ||
digestAlg | A | ||
data | A | ||
offset | The offset into date. | ||
len | The length of digest. |
Returns
Throws
InvalidParameterException
- If there is any error
in any of the parameters.public static byte[] extractKeyDER(byte[] ber, int offset) throws com.rsa.asn1.ASN_Exception
SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, subjectPublicKey BIT STRING } |
Parameters
ber | The ber encoding where the key is located. | ||
offset | The offset into ber where the value begins. |
Throws
com.rsa.asn1.ASN_Exception
- If an error occurs during processing.public static int selectCertificateByKeyHash(CertJ certJ, DatabaseService db, byte[] hash, int hashOffset, int hashLen, Vector certs) throws DatabaseException, NoServiceException, CertificateException, InvalidParameterException
certList
.
This form of certificate identification is rare. Very few
OCSP responders use this form of certificate identification.Parameters
certJ | A | ||
db | The database to search. | ||
hash | The SHA1 | ||
hashOffset | The offset of hash. | ||
hashLen | The length of hash. | ||
certs | A |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |