geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vamsavardhana Reddy" <c1vams...@gmail.com>
Subject Re: svn commit: r617610 [1/13] - in /geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto: ./ asn1/ asn1/cryptopro/ asn1/misc/ asn1/oiw/ asn1/pkcs/ asn1/sec/ asn1/util/ asn1/x509/ asn1/x9/ crypto/ crypto/di
Date Fri, 01 Feb 2008 22:30:21 GMT
svn revision history is lost for these files :(

++Vamsi

On Feb 2, 2008 12:32 AM, <kevan@apache.org> wrote:

> Author: kevan
> Date: Fri Feb  1 11:01:39 2008
> New Revision: 617610
>
> URL: http://svn.apache.org/viewvc?rev=617610&view=rev
> Log:
> GERONIMO-1761 the svn mv util crypto got lost from my commit. this is
> adding the directory and files back. there only changes to the files were
> updates to the package name
>
> Added:
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1InputStream.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Null.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1OctetString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1OutputStream.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Sequence.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Set.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1TaggedObject.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERConstructedOctetString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERConstructedSequence.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERInputStream.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERNull.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BEROutputStream.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERSequence.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERSet.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/BERTaggedObject.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERApplicationSpecific.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERBMPString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERBitString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERBoolean.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERConstructedSequence.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERConstructedSet.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DEREncodable.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DEREncodableVector.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DEREnumerated.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERGeneralString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERGeneralizedTime.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERIA5String.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERInputStream.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERInteger.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERNull.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERNumericString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERObject.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERObjectIdentifier.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DEROctetString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DEROutputStream.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERPrintableString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERSequence.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERSet.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERT61String.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERTaggedObject.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERTags.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERUTCTime.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERUTF8String.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERUniversalString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERUnknownTag.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/DERVisibleString.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/OIDTokenizer.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/cryptopro/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/cryptopro/CryptoProObjectIdentifiers.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/misc/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/misc/MiscObjectIdentifiers.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/misc/NetscapeCertType.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/misc/NetscapeRevocationURL.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/misc/VerisignCzagExtension.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/oiw/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/oiw/OIWObjectIdentifiers.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/CertificationRequest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/CertificationRequestInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/DHParameter.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/PKCSObjectIdentifiers.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/PrivateKeyInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/pkcs/RSAPrivateKeyStructure.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/sec/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/sec/ECPrivateKeyStructure.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/util/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/util/ASN1Dump.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/util/DERDump.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/util/Dump.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AccessDescription.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AlgorithmIdentifier.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AttCertIssuer.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AttCertValidityPeriod.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/Attribute.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AttributeCertificate.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AttributeCertificateInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/AuthorityInformationAccess.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/BasicConstraints.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/CRLDistPoint.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/CRLNumber.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/CRLReason.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/CertPolicyId.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/CertificateList.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/CertificatePolicies.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/DSAParameter.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/DigestInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/DisplayText.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/DistributionPoint.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/DistributionPointName.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/ExtendedKeyUsage.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/GeneralName.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/GeneralNames.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/GeneralSubtree.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/Holder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/IetfAttrSyntax.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/IssuerSerial.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/IssuingDistributionPoint.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/KeyPurposeId.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/KeyUsage.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/NameConstraints.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/NoticeReference.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/ObjectDigestInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/PolicyInformation.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/PolicyMappings.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/PolicyQualifierId.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/PolicyQualifierInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/RSAPublicKeyStructure.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/ReasonFlags.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/SubjectPublicKeyInfo.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/TBSCertList.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/TBSCertificateStructure.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/Time.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/UserNotice.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/V1TBSCertificateGenerator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/V2AttributeCertificateInfoGenerator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/V2Form.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/V2TBSCertListGenerator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/V3TBSCertificateGenerator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509CertificateStructure.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509DefaultEntryConverter.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509Extension.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509Extensions.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509Name.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509NameEntryConverter.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509NameTokenizer.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x509/X509ObjectIdentifiers.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x9/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/x9/X9ObjectIdentifiers.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/BlockCipher.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/CipherParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/DSA.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/DataLengthException.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/Digest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/ExtendedDigest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/RuntimeCryptoException.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/digests/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/digests/GeneralDigest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/digests/MD4Digest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/digests/MD5Digest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/digests/SHA1Digest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/modes/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/modes/CBCBlockCipher.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/AsymmetricKeyParameter.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DESParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DESedeParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DHKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DHParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DHPrivateKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DHPublicKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DHValidationParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DSAKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DSAParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DSAPrivateKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DSAPublicKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/DSAValidationParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/KeyParameter.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/ParametersWithIV.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/ParametersWithSBox.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/RSAKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/crypto/params/RSAPrivateCrtKeyParameters.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/Base64.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/Base64Encoder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/BufferedDecoder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/BufferedEncoder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/Encoder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/Hex.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/HexEncoder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/HexTranslator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/Translator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/UrlBase64.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/encoders/UrlBase64Encoder.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/PKCS10CertificationRequest.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/X509Principal.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/X509V1CertificateGenerator.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/interfaces/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/interfaces/PKCS12BagAttributeCarrier.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JCEDHPrivateKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JCEDHPublicKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JCERSAPrivateCrtKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JCERSAPrivateKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JCERSAPublicKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JDKDSAPrivateKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JDKDSAPublicKey.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/JDKKeyFactory.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/X509CRLEntryObject.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/X509CRLObject.java
>   (with props)
>
>  geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/jce/provider/X509CertificateObject.java
>   (with props)
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,86 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *  http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +
> +package org.apache.geronimo.crypto;
> +
> +import java.io.Serializable;
> +import java.io.ByteArrayOutputStream;
> +import java.io.ObjectOutputStream;
> +import java.io.ObjectInputStream;
> +import java.io.ByteArrayInputStream;
> +
> +import javax.crypto.spec.SecretKeySpec;
> +import javax.crypto.Cipher;
> +import javax.crypto.SealedObject;
> +
> +import org.apache.geronimo.crypto.encoders.Base64;
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +public abstract class AbstractEncryption implements Encryption {
> +    private final static Log log = LogFactory.getLog(
> SimpleEncryption.class);
> +
> +    /**
> +     * Gets a String which contains the Base64-encoded form of the
> source,
> +     * encrypted with the key from getSecretKeySpec().
> +     */
> +    public String encrypt(Serializable source) {
> +        SecretKeySpec spec = getSecretKeySpec();
> +        try {
> +            Cipher c = Cipher.getInstance(spec.getAlgorithm());
> +            c.init(Cipher.ENCRYPT_MODE, spec);
> +            SealedObject so = new SealedObject(source, c);
> +            ByteArrayOutputStream store = new ByteArrayOutputStream();
> +            ObjectOutputStream out = new ObjectOutputStream(store);
> +            out.writeObject(so);
> +            out.close();
> +            byte[] data = store.toByteArray();
> +            byte[] textData = Base64.encode(data);
> +            return new String(textData, "US-ASCII");
> +        } catch (Exception e) {
> +            log.error("Unable to encrypt", e);
> +            return null;
> +        }
> +    }
> +
> +    /**
> +     * Given a String which is the Base64-encoded encrypted data,
> retrieve
> +     * the original Object.
> +     */
> +    public Serializable decrypt(String source) {
> +        SecretKeySpec spec = getSecretKeySpec();
> +        try {
> +            byte[] data = Base64.decode(source);
> +            Cipher c = Cipher.getInstance(spec.getAlgorithm());
> +            c.init(Cipher.DECRYPT_MODE, spec);
> +            ObjectInputStream in = new ObjectInputStream(new
> ByteArrayInputStream(data));
> +            SealedObject so = (SealedObject) in.readObject();
> +            return (Serializable) so.getObject(c);
> +        } catch (Exception e) {
> +            log.error("Unable to decrypt", e);
> +            return null;
> +        }
> +    }
> +
> +    protected abstract SecretKeySpec getSecretKeySpec();
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/AbstractEncryption.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,293 @@
> +/**
> + *
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +package org.apache.geronimo.crypto;
> +
> +import java.io.BufferedReader;
> +import java.io.ByteArrayInputStream;
> +import java.io.ByteArrayOutputStream;
> +import java.io.FileOutputStream;
> +import java.io.IOException;
> +import java.io.InputStreamReader;
> +import java.io.OutputStream;
> +import java.io.PrintWriter;
> +import java.security.InvalidKeyException;
> +import java.security.KeyFactory;
> +import java.security.NoSuchAlgorithmException;
> +import java.security.NoSuchProviderException;
> +import java.security.PublicKey;
> +import java.security.Signature;
> +import java.security.SignatureException;
> +import java.security.cert.Certificate;
> +import java.security.cert.CertificateEncodingException;
> +import java.security.spec.RSAPublicKeySpec;
> +import java.util.HashMap;
> +import java.util.Hashtable;
> +import java.util.Map;
> +import java.util.Vector;
> +
> +import javax.security.auth.x500.X500Principal;
> +
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +import org.apache.geronimo.crypto.asn1.ASN1InputStream;
> +import org.apache.geronimo.crypto.asn1.ASN1Sequence;
> +import org.apache.geronimo.crypto.asn1.DERBitString;
> +import org.apache.geronimo.crypto.asn1.DERObject;
> +import org.apache.geronimo.crypto.asn1.DERSequence;
> +import org.apache.geronimo.crypto.asn1.DERString;
> +import org.apache.geronimo.crypto.asn1.pkcs.CertificationRequestInfo;
> +import org.apache.geronimo.crypto.asn1.pkcs.PKCSObjectIdentifiers;
> +import org.apache.geronimo.crypto.asn1.x509.RSAPublicKeyStructure;
> +import org.apache.geronimo.crypto.asn1.x509.SubjectPublicKeyInfo;
> +import org.apache.geronimo.crypto.asn1.x509.X509CertificateStructure;
> +import org.apache.geronimo.crypto.asn1.x509.X509Name;
> +import org.apache.geronimo.crypto.encoders.Base64;
> +import org.apache.geronimo.crypto.jce.PKCS10CertificationRequest;
> +
> +/**
> + * This class implements some utility methods used by CA
> + *
> + * @version $Rev$ $Date$
> + */
> +public class CaUtils {
> +    private static final Log log = LogFactory.getLog(CaUtils.class);
> +    public static final String CERT_HEADER = "-----BEGIN
> CERTIFICATE-----";
> +    public static final String CERT_FOOTER = "-----END CERTIFICATE-----";
> +    public static final String CERT_REQ_HEADER = "-----BEGIN CERTIFICATE
> REQUEST-----";
> +    public static final String CERT_REQ_FOOTER = "-----END CERTIFICATE
> REQUEST-----";
> +    public static final int B64_LINE_SIZE = 76;
> +    public static final String CERT_REQ_SUBJECT = "subject";
> +    public static final String CERT_REQ_PUBLICKEY = "publickey";
> +    public static final String CERT_REQ_PUBLICKEY_OBJ = "publickeyObj";
> +    public static final String CERT_REQ_VERSION = "version";
> +    public static final String PKAC_CHALLENGE = "challenge";
> +
> +    /**
> +     * This method returns base64 encoded text of a given certificate.
> +     * @param cert The certificate that needs to be encoded in base64
> +     */
> +    public static String base64Certificate(Certificate cert) throws
> CertificateEncodingException, Exception {
> +        return base64Text(cert.getEncoded(), CaUtils.CERT_HEADER,
> CaUtils.CERT_FOOTER, CaUtils.B64_LINE_SIZE);
> +    }
> +
> +    /**
> +     * This method encodes a given byte array into base64 along with
> specified header and footers.
> +     * @param data The byte array to be encoded in base64
> +     * @param header Header for base64 encoded text
> +     * @param footer Footer for base64 encoded text
> +     * @param lineSize Maximum line size to split base64 encoded text if
> required
> +     */
> +    public static String base64Text(byte[] data, String header, String
> footer, int lineSize) throws Exception {
> +        ByteArrayOutputStream bout = new ByteArrayOutputStream();
> +        storeInBase64(bout, data, header, footer, lineSize);
> +        bout.close();
> +        return bout.toString();
> +    }
> +    /**
> +     * This method encodes a given byte array into base64 along with
> specified header and footers and writes
> +     * the output to a specified OutputStream.
> +     * @param fout Output stream to write the encoded text
> +     * @param data The byte array to be encoded in base64
> +     * @param header Header for base64 encoded text
> +     * @param footer Footer for base64 encoded text
> +     * @param lineSize Maximum line size to split base64 encoded text if
> required
> +     */
> +    public static void storeInBase64(OutputStream fout, byte[] data,
> String header, String footer, int lineSize) throws Exception {
> +        PrintWriter out = new PrintWriter(fout);
> +        if(header != null) out.println(header);
> +
> +        byte[] encodedData = Base64.encode(data);
> +        int i = 0;
> +        do {
> +            out.println(new String(encodedData, i, Math.min(lineSize,
> encodedData.length-i)));
> +            i += lineSize;
> +        } while(i < encodedData.length);
> +
> +        if(footer != null) out.println(footer);
> +        out.flush();
> +    }
> +
> +    /**
> +     * This method encodes a given byte array into base64 along with
> specified header and footers and writes
> +     * the output to a specified file.
> +     * @param outfile File name to write the output to
> +     * @param data The byte array to be encoded in base64
> +     * @param header Header for base64 encoded text
> +     * @param footer Footer for base64 encoded text
> +     * @param lineSize Maximum line size to split base64 encoded text if
> required
> +     */
> +    public static void storeInBase64(String outfile, byte[] data, String
> header, String footer, int lineSize) throws Exception {
> +        FileOutputStream fout = new FileOutputStream(outfile);
> +        storeInBase64(fout, data, header, footer, lineSize);
> +        fout.close();
> +    }
> +
> +    /**
> +     * This method creates a java.security.PublicKey object based on the
> public key information given in SubjectPublicKeyInfo
> +     * @param pubKeyInfo SubjectPublicKeyInfo instance containing the
> public key information.
> +     */
> +    public static PublicKey getPublicKeyObject(SubjectPublicKeyInfo
> pubKeyInfo) throws Exception{
> +        RSAPublicKeyStructure pubkeyStruct = new
> RSAPublicKeyStructure((ASN1Sequence)pubKeyInfo.getPublicKey());
> +        RSAPublicKeySpec pubkeySpec = new RSAPublicKeySpec(
> pubkeyStruct.getModulus(), pubkeyStruct.getPublicExponent());
> +        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
> +        PublicKey pubKey = keyFactory.generatePublic(pubkeySpec);
> +        return pubKey;
> +    }
> +
> +    /**
> +     * This method returns a X509Name object corresponding to the subject
> in a given certificate
> +     * @param cert Certificate from which subject needs to be retrieved
> +     */
> +    public static X509Name getSubjectX509Name(Certificate cert) throws
> CertificateEncodingException, IOException {
> +        ASN1InputStream ais = new ASN1InputStream(cert.getEncoded());
> +        X509CertificateStructure x509Struct = new
> X509CertificateStructure((ASN1Sequence)ais.readObject());
> +        ais.close();
> +        return x509Struct.getSubject();
> +    }
> +
> +    /**
> +     * This method returns a X509Name object corresponding to a given
> principal
> +     */
> +    public static X509Name getX509Name(X500Principal principal) throws
> CertificateEncodingException, IOException {
> +        ASN1InputStream ais = new ASN1InputStream(principal.getEncoded
> ());
> +        X509Name name = new X509Name((ASN1Sequence)ais.readObject());
> +        ais.close();
> +        return name;
> +    }
> +
> +    /**
> +     * This method processes a certificate request and returns a map
> containing subject
> +     * and public key in the request.
> +     * @param certreq base64 encoded PKCS10 certificate request
> +     */
> +    public static Map processPKCS10Request(String certreq) throws
> InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException,
> SignatureException, Exception {
> +        if(certreq.indexOf("-----") != -1) {
> +            // Strip any header and footer
> +            BufferedReader br = new BufferedReader(new
> InputStreamReader(new ByteArrayInputStream(certreq.getBytes())));
> +            String line = null;
> +            String b64data = "";
> +            while((line = br.readLine()) != null) {
> +                if(!line.startsWith("-----")) {
> +                    b64data += line;
> +                }
> +            }
> +            br.close();
> +            certreq = b64data;
> +        }
> +        byte[] data = Base64.decode(certreq);
> +
> +        PKCS10CertificationRequest pkcs10certreq = new
> PKCS10CertificationRequest(data);
> +        if(!pkcs10certreq.verify()) {
> +            throw new Exception("CSR verification failed.");
> +        }
> +        CertificationRequestInfo certReqInfo =
> pkcs10certreq.getCertificationRequestInfo();
> +        Map map = new HashMap();
> +        map.put(CERT_REQ_SUBJECT, certReqInfo.getSubject());
> +        map.put(CERT_REQ_PUBLICKEY, certReqInfo.getSubjectPublicKeyInfo
> ());
> +        map.put(CERT_REQ_PUBLICKEY_OBJ, getPublicKeyObject(
> certReqInfo.getSubjectPublicKeyInfo()));
> +        map.put(CERT_REQ_VERSION, certReqInfo.getVersion());
> +        return map;
> +    }
> +
> +    /**
> +     * This method processes a DER encoded SignedPublicKeyAndChallenge in
> base64 format.
> +     * @param spkac SignedPublicKeyAndChallenge in base64 text format
> +     * @return a Map with Subject, public-key and challenge
> +     */
> +    public static Map processSPKAC(String spkac) throws IOException,
> NoSuchAlgorithmException, InvalidKeyException, SignatureException, Exception
> {
> +        Map map = new HashMap();
> +        byte[]data = Base64.decode(spkac);
> +        ASN1InputStream ais = new ASN1InputStream(new
> ByteArrayInputStream(data));
> +        DERSequence spkacSeq = (DERSequence)ais.readObject();
> +
> +        // SPKAC = SEQ {PKAC, SIGN-ALG, SIGN}
> +        // Get PKAC and obtain PK and C
> +        DERSequence pkacSeq = (DERSequence)spkacSeq.getObjectAt(0);
> +        DERObject pk = (DERObject)pkacSeq.getObjectAt(0);
> +        DERObject ch = (DERObject)pkacSeq.getObjectAt(1);
> +        SubjectPublicKeyInfo pkInfo = new
> SubjectPublicKeyInfo((DERSequence)pk);
> +        PublicKey pubKey =  getPublicKeyObject(pkInfo);
> +
> +        // Get SIGN-ALG
> +        DERSequence signAlg = (DERSequence) spkacSeq.getObjectAt(1);
> +        DERObject alg0 = (DERObject)signAlg.getObjectAt(0);
> +
> +        // Get SIGN
> +        DERBitString sign = (DERBitString) spkacSeq.getObjectAt(2);
> +        byte[] signature = sign.getBytes();
> +
> +        // Verify the signature on SPKAC
> +        String signAlgString =
> PKCSObjectIdentifiers.md5WithRSAEncryption.equals(alg0) ? "MD5withRSA" :
> +
> PKCSObjectIdentifiers.md2WithRSAEncryption.equals(alg0) ? "MD2withRSA" :
> +
> PKCSObjectIdentifiers.sha1WithRSAEncryption.equals(alg0) ? "SHA1withRSA" :
> null;
> +        Signature signObj = Signature.getInstance(signAlgString);
> +        signObj.initVerify(pubKey);
> +        signObj.update(pkacSeq.getEncoded());
> +        boolean verified = signObj.verify(signature);
> +        if(!verified) throw new Exception("SignedPublicKeyAndChallenge
> verification failed.");
> +        map.put(CERT_REQ_PUBLICKEY, pkInfo);
> +        map.put(CERT_REQ_PUBLICKEY_OBJ, pubKey);
> +        if(((DERString)ch).getString() != null) map.put(PKAC_CHALLENGE,
> ((DERString)ch).getString());
> +        return map;
> +    }
> +
> +    /**
> +     * This method creates a X509Name object using the name attributes
> specified.
> +     * @param cn Common Name
> +     * @param ou Organization Unit
> +     * @param o Organization
> +     * @param l Locality
> +     * @param st State
> +     * @param c Country
> +     */
> +    public static X509Name getX509Name(String cn, String ou, String o,
> String l, String st, String c)  {
> +        Vector order = new Vector();
> +        Hashtable attrmap = new Hashtable();
> +        if (c != null) {
> +            attrmap.put(X509Name.C, c);
> +            order.add(X509Name.C);
> +        }
> +
> +        if (st != null) {
> +            attrmap.put(X509Name.ST, st);
> +            order.add(X509Name.ST);
> +        }
> +
> +        if (l != null) {
> +            attrmap.put(X509Name.L, l);
> +            order.add(X509Name.L);
> +        }
> +
> +        if (o != null) {
> +            attrmap.put(X509Name.O, o);
> +            order.add(X509Name.O);
> +        }
> +
> +        if (ou != null) {
> +            attrmap.put(X509Name.OU, ou);
> +            order.add(X509Name.OU);
> +        }
> +
> +        if (cn != null) {
> +            attrmap.put(X509Name.CN, cn);
> +            order.add(X509Name.CN);
> +        }
> +
> +        return new X509Name(order, attrmap);
> +    }
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,52 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +package org.apache.geronimo.crypto;
> +
> +import org.apache.geronimo.crypto.encoders.HexEncoder;
> +
> +import java.security.cert.Certificate;
> +import java.security.cert.CertificateEncodingException;
> +import java.security.NoSuchAlgorithmException;
> +import java.security.MessageDigest;
> +import java.io.IOException;
> +import java.io.ByteArrayOutputStream;
> +import java.util.regex.Matcher;
> +import java.util.regex.Pattern;
> +
> +/**
> + * Various utility functions for dealing with X.509 certificates
> + *
> + * @version $Rev$ $Date$
> + */
> +public class CertificateUtil {
> +    public static String generateFingerprint(Certificate cert, String
> digestAlgorithm) throws NoSuchAlgorithmException,
> CertificateEncodingException, IOException {
> +        MessageDigest md = MessageDigest.getInstance(digestAlgorithm);
> +        byte[] digest = md.digest(cert.getEncoded());
> +        ByteArrayOutputStream out = new ByteArrayOutputStream(
> digest.length*2);
> +        new HexEncoder().encode(digest, 0, digest.length, out);
> +        String all = new String(out.toByteArray(),
> "US-ASCII").toUpperCase();
> +        Matcher matcher = Pattern.compile("..").matcher(all);
> +        StringBuffer buf = new StringBuffer();
> +        while(matcher.find()) {
> +            if(buf.length() > 0) {
> +                buf.append(":");
> +            }
> +            buf.append(matcher.group());
> +        }
> +        return buf.toString();
> +    }
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CertificateUtil.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,44 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *  http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +
> +package org.apache.geronimo.crypto;
> +
> +import java.io.Serializable;
> +
> +/**
> + * Interface for objects to register with EncryptionManager.
> + *
> + * @version $Rev$ $Date$
> + */
> +public interface Encryption {
> +    /**
> +     * encrypt the source according to some scheme and return the result
> as a String.
> +     * @param source object to encrypt
> +     * @return encrypted object representing the source.
> +     */
> +    String encrypt(Serializable source);
> +
> +    /**
> +     * decrypt the source according to some scheme and return the
> original object.
> +     * @param source the string representing the encrypted object
> +     * @return (a copy of) the original object.
> +     */
> +    Serializable decrypt(String source);
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/Encryption.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,113 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +package org.apache.geronimo.crypto;
> +
> +import java.util.Collections;
> +import java.util.HashMap;
> +import java.util.Map;
> +import java.io.Serializable;
> +
> +/**
> + * A static class that uses registered Encryption instances to encypt and
> decrypt objects, typically strings.
> + * The encrypted strings are preceded by the name of the Encryption
> object, such as {Simple}, followed by the base64
> + * encoded encrypted bytes.
> + *
> + * Any number of Encryption instances can be registered but only the
> first to be explicitly registered will be used.
> + * However, when decrypting the Encryption instance is looked up from the
> name prefix so may be any registered Encryption instance.
> + * Furthermore, encrypt and decrypt are idempotent.  Calling encrypt on a
> string encrypted with a registered Encryption that is not
> + * the one in use will decrypt the string and re-encrypt it with the one
> in use.  This can be useful when changing Encryption.
> + *
> + * The default Encryption instance (that does not need to be registered)
> is SimpleEncryption which uses a fixed key hardcoded into
> + * the Encryption class itself.  Thus it is useful only to hide
> information from those who don't read code.  On the other hand
> + * you can't lose the key and make your server permanently unusable.
> + *
> + * n.b. calling these methods idempotent is a slight exageration as this
> would apply only if all arguments and return values are Strings.
> + *
> + * @version $Rev$ $Date$
> + */
> +public class EncryptionManager {
> +
> +    private static final Map<String, Encryption> ENCRYPTORS =
> Collections.synchronizedMap(new HashMap<String, Encryption>());
> +    private final static String SIMPLE_ENCRYPTION_PREFIX = "{Simple}";
> +
> +    static {
> +        ENCRYPTORS.put(SIMPLE_ENCRYPTION_PREFIX,
> SimpleEncryption.INSTANCE);
> +        //login properties files used to have this
> +        ENCRYPTORS.put("{Standard}", SimpleEncryption.INSTANCE);
> +    }
> +
> +    private static String encryptionPrefix = SIMPLE_ENCRYPTION_PREFIX;
> +
> +    /**
> +     * Encryption instances should call this to register themselves.
> +     *
> +     * @param prefix id in form {name} for the Encryption instance
> +     * @param encryption Encryption instance to do the work.
> +     */
> +    public synchronized static void setEncryptionPrefix(String prefix,
> Encryption encryption) {
> +        if (SIMPLE_ENCRYPTION_PREFIX.equals(encryptionPrefix)) {
> +            encryptionPrefix = prefix;
> +        }
> +        ENCRYPTORS.put(prefix, encryption);
> +    }
> +
> +    /**
> +     * Idempotent method that outputs string starting with the active
> registered encryption prefix followed by
> +     * the output of the registered Encryption instance.  If called with
> a string encrypted by another
> +     * registered Encryption it will re-encrypt with the active
> Encryption instance.
> +     * @param source Serializable object to encrypt, usually a password
> string or an already encrypted string.
> +     * @return the name of the registered Encryption followed by its
> output.
> +     */
> +    public static String encrypt(Serializable source) {
> +        if (source instanceof String) {
> +            String sourceString = (String) source;
> +            if (sourceString.startsWith(encryptionPrefix)) {
> +                return (String) source;
> +            } else if (sourceString.startsWith("{")) {
> +                source = decrypt(sourceString);
> +            }
> +        }
> +        Encryption encryption = ENCRYPTORS.get(encryptionPrefix);
> +        return encryptionPrefix + encryption.encrypt(source);
> +    }
> +
> +    /**
> +     * Idempotent method that given a String starting with a registered
> Encryption name will remove the
> +     * name prefix and return the result of applying the Encryption to
> the suffix.  If no registered Encryption
> +     * name matches the start of the string the input will be returned.
> +     * @param source String that is possibly the output of calling
> encrypt, consisting of a Encryption name followed by its encrypt output.
> +     * @return the result of applying the Encryption.decrypt method to
> the input suffix after identifying the Encryption from the prefix, or the
> +     * input if no Encryption name matches.
> +     */
> +    public static Serializable decrypt(String source) {
> +        String prefix = null;
> +        Encryption encryption = null;
> +        synchronized (ENCRYPTORS) {
> +            for (Map.Entry<String, Encryption> entry :
> ENCRYPTORS.entrySet()) {
> +                prefix = entry.getKey();
> +                if (source.startsWith(prefix)) {
> +                    encryption = entry.getValue();
> +                    break;
> +                }
> +            }
> +        }
> +        if (encryption != null) {
> +            return encryption.decrypt(source.substring(prefix.length()));
> +        }
> +        return source;
> +    }
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,118 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +package org.apache.geronimo.crypto;
> +
> +import java.io.ByteArrayInputStream;
> +import java.io.ByteArrayOutputStream;
> +import java.io.IOException;
> +import java.security.KeyStore;
> +import java.security.Provider;
> +import java.security.Security;
> +import java.security.cert.Certificate;
> +import java.security.cert.CertificateFactory;
> +import java.util.Collections;
> +import java.util.Set;
> +import java.util.TreeSet;
> +
> +/**
> + * @version $Rev$ $Date$
> + */
> +public class KeystoreUtil {
> +    /**
> +     * All KeyStore types available.
> +     */
> +    public static final Set<String> keystoreTypes;
> +    /**
> +     * The keystore types which allow an empty keystore saved to disk.
> +     */
> +    public static final Set<String> emptyKeystoreTypes;
> +    /**
> +     * The keystore types which allow certificate entries.
> +     */
> +    public static final Set<String> certKeystoreTypes;
> +    /**
> +     * The default keystore type.
> +     */
> +    public static final String defaultType;
> +
> +    static {
> +        TreeSet<String> tempKeystoreTypes = new TreeSet<String>();
> +        TreeSet<String> tempEmptyKeystoreTypes = new TreeSet<String>();
> +        TreeSet<String> tempCertKeystoreTypes = new TreeSet<String>();
> +        String tempDefaultType = null;
> +        Provider[] providers = Security.getProviders();
> +        char[] password = "emptypassword".toCharArray();
> +
> +        // Certificate used to check if a keystore allows storing trusted
> +        String sampleCertText = "-----BEGIN CERTIFICATE-----\n"
> +
>  +"MIIBpzCCAVECBgEV+CystzANBgkqhkiG9w0BAQQFADBcMQswCQYDVQQDEwJNZTEQMA4GA1UECxMH\n"
> +
>  +"TXkgVW5pdDEPMA0GA1UEChMGTXkgT3JnMRAwDgYDVQQHEwdNeSBDaXR5MQswCQYDVQQIEwJBUDEL\n"
> +
>  +"MAkGA1UEBhMCSU4wHhcNMDcxMDMxMjIyNjU4WhcNMTcxMDI4MjIyNjU4WjBcMQswCQYDVQQDEwJN\n"
> +
>  +"ZTEQMA4GA1UECxMHTXkgVW5pdDEPMA0GA1UEChMGTXkgT3JnMRAwDgYDVQQHEwdNeSBDaXR5MQsw\n"
> +
>  +"CQYDVQQIEwJBUDELMAkGA1UEBhMCSU4wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAlN7IscUYq5U9\n"
> +
>  +"d1TYVJaj5RQJLg39Gz9R9hB0hhOULSHOxeE0utTJvgBQcf+f39FgbGIdriJniyoubtCXGfSpxwID\n"
> +
>  +"AQABMA0GCSqGSIb3DQEBBAUAA0EACQN6ScbxzAjrrQ3Ciy8I7/qsgpQo4Nuhfo5cAU4rvcKnujs6\n"
> +            +"uGHAJrHMF/ROGl6kPZvFeoGXk5qjyKs8Kx5MJA==\n"
> +            +"-----END CERTIFICATE-----";
> +        Certificate sampleCert = null;
> +
> +        try {
> +            CertificateFactory certFac = CertificateFactory.getInstance("
> X.509");
> +            sampleCert = certFac.generateCertificate(new
> ByteArrayInputStream(sampleCertText.getBytes()));
> +        } catch (Throwable ignored) {
> +        }
> +        for(Provider provider: providers) {
> +            for(Provider.Service service: provider.getServices()) {
> +                if(service.getType().equals("KeyStore")) {
> +                    String type = service.getAlgorithm();
> +                    tempKeystoreTypes.add(type);
> +                    if(type.equalsIgnoreCase(KeyStore.getDefaultType()))
> {
> +                        tempDefaultType = type;
> +                    }
> +
> +                    ByteArrayOutputStream baos = null;
> +                    KeyStore ks = null;
> +                    try {
> +                        ks = KeyStore.getInstance(type);
> +                        ks.load(null);
> +                        baos = new ByteArrayOutputStream();
> +                        // Check if an empty keystore can be saved.
> +                        ks.store(baos, password);
> +                        tempEmptyKeystoreTypes.add(type);
> +                    } catch(Throwable ignored) {
> +                    } finally {
> +                        if(baos != null) {
> +                            try {baos.close();} catch(IOException
> ignored){}
> +                        }
> +                    }
> +
> +                    try {
> +                        // Check if the keystore allows storing of
> certificate entries.
> +                        ks.setCertificateEntry("samplecert", sampleCert);
> +                        tempCertKeystoreTypes.add(type);
> +                    } catch(Throwable ignored) {
> +                    }
> +                }
> +            }
> +        }
> +
> +        keystoreTypes = Collections.unmodifiableSortedSet
> (tempKeystoreTypes);
> +        emptyKeystoreTypes = Collections.unmodifiableSortedSet
> (tempEmptyKeystoreTypes);
> +        certKeystoreTypes = Collections.unmodifiableSortedSet
> (tempCertKeystoreTypes);
> +        defaultType = tempDefaultType;
> +    }
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/KeystoreUtil.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,56 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +package org.apache.geronimo.crypto;
> +
> +import java.io.ByteArrayOutputStream;
> +import java.io.ObjectOutputStream;
> +import java.io.Serializable;
> +import java.io.ObjectInputStream;
> +import java.io.ByteArrayInputStream;
> +import javax.crypto.spec.SecretKeySpec;
> +import javax.crypto.Cipher;
> +import javax.crypto.SealedObject;
> +import org.apache.geronimo.crypto.encoders.Base64;
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +
> +/**
> + * This class protects some value BY ENCRYPTING WITH A KNOWN KEY.  That
> is
> + * to say, it's only safe against anyone who can't read the source code.
> + * So the main idea is to protect against casual observers.
> + *
> + * If someone has a better idea for how to implement encryption with a
> + * non-obvious key that the user isn't likely to change during the normal
> + * course of working with the server, I'd be happy to hear it.  (But I
> + * assume the SSL keystore is likely to be changed, which would result
> + * in losing all the "encrypted" data.
> + *
> + * @version $Rev$ $Date$
> + */
> +public final class SimpleEncryption extends AbstractEncryption {
> +
> +    public final static SimpleEncryption INSTANCE = new
> SimpleEncryption();
> +    private final static SecretKeySpec SECRET_KEY = new SecretKeySpec(new
> byte[]{(byte)-45,(byte)-15,(byte)100,(byte)-34,(byte)70,(byte)83,(byte)75,(byte)-100,(byte)-75,(byte)61,(byte)26,(byte)114,(byte)-20,(byte)-58,(byte)114,(byte)77},
> "AES");
> +
> +
> +    private SimpleEncryption() {
> +    }
> +
> +    protected SecretKeySpec getSecretKeySpec() {
> +        return SECRET_KEY;
> +    }
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/SimpleEncryption.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,31 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +
> +package org.apache.geronimo.crypto.asn1;
> +
> +/**
> + * Marker interface for CHOICE objects - if you implement this in a role
> your
> + * own object any attempt to tag the object implicitly will convert the
> tag to
> + * an explicit one as the encoding rules require.
> + * <p>
> + * If you use this interface your class should also implement the
> getInstance
> + * pattern which takes a tag object and the tagging mode used.
> + */
> +public interface ASN1Choice
> +{
> +    // marker interface
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Choice.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,61 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +
> +package org.apache.geronimo.crypto.asn1;
> +
> +import java.io.ByteArrayOutputStream;
> +import java.io.IOException;
> +
> +public abstract class ASN1Encodable
> +    implements DEREncodable
> +{
> +    public byte[] getEncoded()
> +        throws IOException
> +    {
> +        ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
> +        ASN1OutputStream        aOut = new ASN1OutputStream(bOut);
> +
> +        aOut.writeObject(this);
> +
> +        return bOut.toByteArray();
> +    }
> +
> +    public int hashCode()
> +    {
> +        return this.toASN1Object().hashCode();
> +    }
> +
> +    public boolean equals(
> +        Object  o)
> +    {
> +        if ((o == null) || !(o instanceof ASN1Encodable))
> +        {
> +            return false;
> +        }
> +
> +        ASN1Encodable other = (ASN1Encodable)o;
> +
> +        return this.toASN1Object().equals(other.toASN1Object());
> +    }
> +
> +    public DERObject getDERObject()
> +    {
> +        return this.toASN1Object();
> +    }
> +
> +    public abstract DERObject toASN1Object();
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1Encodable.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
> URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java?rev=617610&view=auto
>
> ==============================================================================
> ---
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
> (added)
> +++
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
> Fri Feb  1 11:01:39 2008
> @@ -0,0 +1,27 @@
> +/**
> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> + *  contributor license agreements.  See the NOTICE file distributed with
> + *  this work for additional information regarding copyright ownership.
> + *  The ASF licenses this file to You under the Apache License, Version
> 2.0
> + *  (the "License"); you may not use this file except in compliance with
> + *  the License.  You may obtain a copy of the License at
> + *
> + *     http://www.apache.org/licenses/LICENSE-2.0
> + *
> + *  Unless required by applicable law or agreed to in writing, software
> + *  distributed under the License is distributed on an "AS IS" BASIS,
> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + *  See the License for the specific language governing permissions and
> + *  limitations under the License.
> + */
> +
> +package org.apache.geronimo.crypto.asn1;
> +
> +/**
> + * the parent class for this will eventually disappear. Use this one!
> + */
> +public class ASN1EncodableVector
> +    extends DEREncodableVector
> +{
> +    // migrating from DEREncodeableVector
> +}
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Date Revision
>
> Propchange:
> geronimo/server/trunk/framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/asn1/ASN1EncodableVector.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
>
>

Mime
View raw message