mirror of
https://github.com/corda/corda.git
synced 2025-06-22 09:08:49 +00:00
Doorman rejects requests for duplicate legal names and legal names which contain , or = (X.500)
This commit is contained in:
@ -39,7 +39,7 @@ fun <T> databaseTransaction(db: Database, statement: Transaction.() -> T): T {
|
||||
/**
|
||||
* Helper method wrapping code in try finally block. A mutable list is used to keep track of functions that need to be executed in finally block.
|
||||
*/
|
||||
fun <T> withFinalizables(statement: (MutableList<() -> Unit>) -> T): T {
|
||||
inline fun <T> withFinalizables(statement: (MutableList<() -> Unit>) -> T): T {
|
||||
val finalizables = mutableListOf<() -> Unit>()
|
||||
return try {
|
||||
statement(finalizables)
|
||||
|
@ -10,6 +10,7 @@ import java.net.URL
|
||||
import java.security.cert.Certificate
|
||||
import java.util.*
|
||||
import java.util.zip.ZipInputStream
|
||||
import javax.ws.rs.core.MediaType
|
||||
|
||||
class HTTPCertificateSigningService(val server: URL) : CertificateSigningService {
|
||||
companion object {
|
||||
@ -20,7 +21,6 @@ class HTTPCertificateSigningService(val server: URL) : CertificateSigningService
|
||||
override fun retrieveCertificates(requestId: String): Array<Certificate>? {
|
||||
// Poll server to download the signed certificate once request has been approved.
|
||||
val url = URL("$server/api/certificate/$requestId")
|
||||
|
||||
val conn = url.openConnection() as HttpURLConnection
|
||||
conn.requestMethod = "GET"
|
||||
|
||||
@ -44,7 +44,7 @@ class HTTPCertificateSigningService(val server: URL) : CertificateSigningService
|
||||
val conn = URL("$server/api/certificate").openConnection() as HttpURLConnection
|
||||
conn.doOutput = true
|
||||
conn.requestMethod = "POST"
|
||||
conn.setRequestProperty("Content-Type", "application/octet-stream")
|
||||
conn.setRequestProperty("Content-Type", MediaType.APPLICATION_OCTET_STREAM)
|
||||
conn.setRequestProperty("Client-Version", clientVersion)
|
||||
conn.outputStream.write(request.encoded)
|
||||
|
||||
|
Reference in New Issue
Block a user