|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--PKIXCommon
Defined in pkixcommon.js
Field Summary | |
<static> Object |
cRLSign
|
<static> Object |
dataEncipherment
|
<static> Object |
decipherOnly
|
<static> Object |
digitalSignature
|
<static> Object |
encipherOnly
|
<static> Object |
keyAgreement
|
<static> Object |
keyCertSign
|
<static> Object |
keyEncipherment
|
<static> Object |
nonRepudiation
|
Constructor Summary | |
PKIXCommon()
Common functions and constants |
Method Summary | |
<static> Date
|
addDays(<Date> d, <Number> days)
Add the specified number of days to a date object |
<static> void
|
addNames(<ASN1> t, <Object> name)
Adds names from the name object to the RDNSequence. |
<static> ByteString
|
bitstringForInteger(<Number> val)
Converts the integer value into a BIT STRING value. |
<static> ByteString
|
convertUnsignedInteger(<ByteString> value)
Removes leading zeros and prepends a single '00' to ByteStrings which have the most significant bit set. |
<static> ASN1
|
createECSubjectPublicKeyInfo(publicKey, encodeECDomainParameter)
Creates the EC Public Key as subjectPublicKeyInfo TLV structure object. |
<static> ASN1
|
createRSASubjectPublicKeyInfo(publicKey)
Creates the RSA Public Key as subjectPublicKeyInfo TLV structure object. |
<static> String
|
dtoUTC(<Date> d)
Convert date and time to UTC string with format YYMMDDHHMMSSZ. |
<static> ASN1
|
encodeName(<Object> name)
Gets the dn as TLV object |
<static> Object
|
makeRDN(<String> name, <String> oid, <ASN1> value)
Creates a relative distinguished name component. |
<static> ByteString
|
readFileFromDisk(<String> filename)
Loads a binary file from disk |
<static> void
|
test()
|
<static> void
|
writeFileToDisk(<String> filename, <ByteString> content)
Writes a byte string object to file |
Field Detail |
<static> Object cRLSign
<static> Object dataEncipherment
<static> Object decipherOnly
<static> Object digitalSignature
<static> Object encipherOnly
<static> Object keyAgreement
<static> Object keyCertSign
<static> Object keyEncipherment
<static> Object nonRepudiation
Constructor Detail |
PKIXCommon()
Method Detail |
<static> Date addDays(<Date> d, <Number> days)
d
- the date object
days
- the number of days to add, may be negative
<static> void addNames(<ASN1> t, <Object> name)
t
- the sequence object
name
- the name object
<static> ByteString bitstringForInteger(<Number> val)
The function interprets the integer value as bitmap, where bit 0 is the most significant bit of the least significant byte.
The function adds the minimum number of bytes to the final bit string and encodes the "number of unused bits at the beginning.
val
- the value to convert
<static> ByteString convertUnsignedInteger(<ByteString> value)
value
- the value to convert
<static> ASN1 createECSubjectPublicKeyInfo(publicKey, encodeECDomainParameter)
The structure is defined as:
SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, subjectPublicKey BIT STRING } AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } id-ecPublicKey OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 } ECParameters ::= CHOICE { namedCurve OBJECT IDENTIFIER, implicitCurve NULL, specifiedCurve SpecifiedECDomain }
<static> ASN1 createRSASubjectPublicKeyInfo(publicKey)
The structure is defined as:
SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, subjectPublicKey BIT STRING } AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } pkcs-1 OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 } rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1} RSAPublicKey ::= SEQUENCE { modulus INTEGER, -- n publicExponent INTEGER } -- e
<static> String dtoUTC(<Date> d)
d
- the date object.
<static> ASN1 encodeName(<Object> name)
This function support two format for names
var issuer = { C:"UT", O:"ACME Corporation", CN:"Test-CA" }; or var issuer = [ { C:"UT"}, { O:"ACME Corporation" }, { CN:"Test-CA"} ];
It supports the following RDNs:
The first format sorts the RDS in the sequence C,O,OU,S,L,T,G,SN,CN,SERIALNUMBER
name
- the name object
<static> Object makeRDN(<String> name, <String> oid, <ASN1> value)
The structure is defined as:
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY -- DEFINED BY AttributeType DirectoryString ::= CHOICE { teletexString TeletexString (SIZE (1..MAX)), printableString PrintableString (SIZE (1..MAX)), universalString UniversalString (SIZE (1..MAX)), utf8String UTF8String (SIZE (1..MAX)), bmpString BMPString (SIZE (1..MAX)) }
name
- the components name
oid
- the oid for the RDN
value
- the value object
<static> ByteString readFileFromDisk(<String> filename)
filename
- the fully qualified file name
<static> void test()
<static> void writeFileToDisk(<String> filename, <ByteString> content)
The filename is mapped to the workspace location.
filename
- the fully qualified name of the file
content
- the content to write
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |