diff options
author | Brian Carlstrom <bdc@google.com> | 2012-09-17 16:04:47 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2012-09-19 14:26:13 -0700 |
commit | e6bf3e8dfa2804891a82075cb469b736321b4827 (patch) | |
tree | 8d78ebadb9c33191a0490537dbd50da4e6c85b49 /bcprov/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java | |
parent | 517da5b1cf8927b100e5e1d9df870854b09aa2ce (diff) | |
download | android_external_bouncycastle-e6bf3e8dfa2804891a82075cb469b736321b4827.tar.gz android_external_bouncycastle-e6bf3e8dfa2804891a82075cb469b736321b4827.tar.bz2 android_external_bouncycastle-e6bf3e8dfa2804891a82075cb469b736321b4827.zip |
Make existing bouncycastle bcprov build on host and add host-only bcpkix build
- Move existing provider source to bcprov
- Added bcpkix host build to support built/tooks/signapk
sha1sum of sources:
- 10bfea344842fe8e065c80e399c93f8651dc87d8 bcprov-jdk15on-147.tar.gz
- 913828c7ae36e030508e97e07b3c213fb1db1e9c bcpkix-jdk15on-147.tar.gz
Bug: 7056297
Change-Id: Id4f957f300a39aa34b4c3c679b2312631d3f1639
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java')
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java b/bcprov/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java new file mode 100644 index 0000000..7a7c837 --- /dev/null +++ b/bcprov/src/main/java/org/bouncycastle/asn1/x500/X500NameStyle.java @@ -0,0 +1,34 @@ +package org.bouncycastle.asn1.x500; + +import org.bouncycastle.asn1.ASN1Encodable; +import org.bouncycastle.asn1.ASN1ObjectIdentifier; + +/** + * It turns out that the number of standard ways the fields in a DN should be + * encoded into their ASN.1 counterparts is rapidly approaching the + * number of machines on the internet. By default the X500Name class + * will produce UTF8Strings in line with the current recommendations (RFC 3280). + * <p> + */ +public interface X500NameStyle +{ + /** + * Convert the passed in String value into the appropriate ASN.1 + * encoded object. + * + * @param oid the oid associated with the value in the DN. + * @param value the value of the particular DN component. + * @return the ASN.1 equivalent for the value. + */ + ASN1Encodable stringToValue(ASN1ObjectIdentifier oid, String value); + + ASN1ObjectIdentifier attrNameToOID(String attrName); + + boolean areEqual(X500Name name1, X500Name name2); + + RDN[] fromString(String dirName); + + int calculateHashCode(X500Name name); + + String toString(X500Name name); +} |