summaryrefslogtreecommitdiff
path: root/gnu/java/security/Registry.java
diff options
context:
space:
mode:
authorRaif S. Naffah <raif@swiftdsl.com.au>2006-02-06 18:42:51 +0000
committerRaif S. Naffah <raif@swiftdsl.com.au>2006-02-06 18:42:51 +0000
commit584ed25bf4cb96121dc890861fd2a23ef2fafa29 (patch)
treeaf46b6255c73739b25f37d578a59b622449ffe12 /gnu/java/security/Registry.java
parent16e654a218106994b86efd578535e3d9c55bd7a6 (diff)
downloadclasspath-584ed25bf4cb96121dc890861fd2a23ef2fafa29.tar.gz
2006-02-07 Raif S. Naffah <raif@swiftdsl.com.au>
* gnu/java/security/provider/GnuDSAPublicKey.java (getEncoded): Use Registry constant. * gnu/java/security/provider/GnuDSAPrivateKey.java (getEncoded): Likewise. * gnu/java/security/provider/GnuRSAPrivateKey.java (getEncoded): Likewise. * gnu/java/security/provider/GnuRSAPublicKey.java (getEncoded): Likewise. * gnu/java/security/provider/EncodedKeyFactory.java (ID_DSA): Redefined in terms of Registry constant. (ID_DSA): Redefined in terms of Registry constant. (ID_DH): Redefined in terms of Registry constant. * gnu/java/security/Registry.java (X509_ENCODING): New constant. (PKCS8_ENCODING): Likewise. (ASN1_ENCODING): Likewise. (RAW_ENCODING_SHORT_NAME): Likewise. (X509_ENCODING_SORT_NAME): Likewise. (PKCS8_ENCODING_SHORT_NAME): Likewise. (ASN1_ENCODING_SHORT_NAME): Likewise. (X509_ENCODING_ID): Likewise. (PKCS8_ENCODING_ID): Likewise. (ASN1_ENCODING_ID): Likewise. (DSA_OID_STRING): Likewise. (RSA_OID_STRING): Likewise. (DH_OID_STRING): Likewise.
Diffstat (limited to 'gnu/java/security/Registry.java')
-rw-r--r--gnu/java/security/Registry.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/java/security/Registry.java b/gnu/java/security/Registry.java
index 030477a92..49be4be99 100644
--- a/gnu/java/security/Registry.java
+++ b/gnu/java/security/Registry.java
@@ -263,9 +263,28 @@ public interface Registry
// String TMMH32 = "tmmh32";
// Format IDs used to identify how we externalise asymmetric keys ..........
+ // fully-qualified names of the supported codecs
String RAW_ENCODING = "gnu.crypto.raw.format";
+ String X509_ENCODING = "gnu.crypto.x509.format";
+ String PKCS8_ENCODING = "gnu.crypto.pkcs8.format";
+ String ASN1_ENCODING = "gnu.crypto.asn1.format";
+ // short names of the same. used by JCE adapters
+ String RAW_ENCODING_SHORT_NAME = "RAW";
+ String X509_ENCODING_SORT_NAME = "X.509";
+ String PKCS8_ENCODING_SHORT_NAME = "PKCS#8";
+ String ASN1_ENCODING_SHORT_NAME = "ASN.1";
+
+ // unique identifiers of the same
int RAW_ENCODING_ID = 1;
+ int X509_ENCODING_ID = 2;
+ int PKCS8_ENCODING_ID = 3;
+ int ASN1_ENCODING_ID = 4;
+
+ // OID strings used in encoding/decoding keys
+ String DSA_OID_STRING = "1.2.840.10040.4.1";
+ String RSA_OID_STRING = "1.2.840.113549.1.1.1";
+ String DH_OID_STRING = "1.2.840.10046.2.1";
// Magic bytes we generate/expect in externalised asymmetric keys ..........
// the four bytes represent G (0x47) for GNU, 1 (0x01) for Raw format,