2016-11-01 17:27:57 +00:00
|
|
|
import * as plugins from './smartacme.plugins'
|
|
|
|
import * as acmeclient from './smartacme.classes.acmeclient'
|
|
|
|
|
|
|
|
export class SmartAcme {
|
2016-11-01 19:16:43 +00:00
|
|
|
acmeAccount: AcmeAccount
|
2016-11-01 17:27:57 +00:00
|
|
|
acmeClient: acmeclient.AcmeClient
|
|
|
|
constructor(directoryUrlArg: string = 'https://acme-staging.api.letsencrypt.org/directory') {
|
|
|
|
this.acmeClient = new acmeclient.AcmeClient(directoryUrlArg)
|
|
|
|
}
|
2016-11-01 19:16:43 +00:00
|
|
|
|
2016-11-07 17:41:52 +00:00
|
|
|
/**
|
|
|
|
* creates an account
|
|
|
|
*/
|
2016-11-01 19:16:43 +00:00
|
|
|
createAccount() {
|
|
|
|
this.acmeClient.createAccount('test@bleu.de',(answer) => {
|
|
|
|
console.log(answer)
|
|
|
|
})
|
|
|
|
}
|
2016-11-07 17:41:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* returns the openssl key pair for
|
|
|
|
*/
|
|
|
|
getKeyPair() {
|
|
|
|
return this.acmeClient.getKeyPair()
|
|
|
|
}
|
2016-11-01 19:16:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class AcmeAccount {
|
|
|
|
|
2016-11-01 17:27:57 +00:00
|
|
|
}
|