SEC-1689: Move crypto module code to core for simplicity.

This commit is contained in:
Luke Taylor 2011-03-10 18:58:47 +00:00
parent a25d131f21
commit 50828cdd43
30 changed files with 8 additions and 62 deletions

View File

@ -1,9 +1,5 @@
// Core build file
// We don't define a module dependency on crypto to avoid creating a transitive dependency
def cryptoProject = project(':spring-security-crypto')
def cryptoClasses = cryptoProject.sourceSets.main.classes
dependencies {
compile 'aopalliance:aopalliance:1.0',
"net.sf.ehcache:ehcache:$ehcacheVersion",
@ -24,17 +20,13 @@ dependencies {
testRuntime "hsqldb:hsqldb:$hsqlVersion"
}
compileJava.dependsOn cryptoProject.compileJava
classes.dependsOn cryptoProject.classes
// jdkVersion = System.properties['java.version']
// isJdk6 = jdkVersion >= '1.6'
int maxAESKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength('AES')
classes.doLast {
copy {
from cryptoClasses
into sourceSets.main.classesDir
test {
if (maxAESKeySize < 256) {
logger.warn("AES keysize limited to $maxAESKeySize, skipping EncryptorsTests")
exclude '**/EncryptorsTests.class'
}
}
sourceSets.main.compileClasspath += cryptoClasses
sourceSets.test.compileClasspath += cryptoClasses
sourceJar.from cryptoProject.sourceSets.main.java

View File

@ -1,12 +0,0 @@
// crypto module build file
// jdkVersion = System.properties['java.version']
// isJdk6 = jdkVersion >= '1.6'
int maxAESKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength('AES')
test {
if (maxAESKeySize < 256) {
println "AES keysize limited to $maxAESKeySize, skipping EncryptorsTests"
exclude '**/EncryptorsTests.class'
}
}

View File

@ -1,5 +0,0 @@
/**
* Symmetric-key data encryption.
*/
package org.springframework.security.crypto.encrypt;

View File

@ -1,6 +0,0 @@
/**
* Secure random key generators.
*/
package org.springframework.security.crypto.keygen;

View File

@ -1,5 +0,0 @@
/**
* Password encoders.
*/
package org.springframework.security.crypto.password;

View File

@ -1,5 +0,0 @@
/**
* Shared crypto utilities for internal module use.
* These are liable to change or be refactored and should not be used by external code.
*/
package org.springframework.security.crypto.util;

View File

@ -1,12 +0,0 @@
Implementation-Title: org.springframework.security.crypto
Implementation-Version: ${version}
Bundle-SymbolicName: org.springframework.security.crypto
Bundle-Name: Spring Security Crypto
Bundle-Vendor: SpringSource
Bundle-Version: ${version}
Bundle-ManifestVersion: 2
Excluded-Imports:
javax.crypto.*
Ignored-Existing-Headers:
Import-Package,
Export-Package

View File

@ -7,8 +7,7 @@ def String[] modules = [
'cas',
'openid',
'taglibs',
'aspects',
'crypto'
'aspects'
]
def String[] samples = [