mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 22:25:24 +00:00
Added certificates saving in constructor and parsing them when signature is being created; changed Manifest to be exported as a Buffer
This commit is contained in:
18
src/schemas/Certificates.ts
Normal file
18
src/schemas/Certificates.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type forge from "node-forge";
|
||||
import Joi from "joi";
|
||||
|
||||
export interface CertificatesSchema {
|
||||
wwdr: string | Buffer;
|
||||
signerCert: string | Buffer;
|
||||
signerKey: string | Buffer;
|
||||
signerKeyPassphrase?: string;
|
||||
}
|
||||
|
||||
export const CertificatesSchema = Joi.object<CertificatesSchema>()
|
||||
.keys({
|
||||
wwdr: Joi.alternatives(Joi.binary(), Joi.string()).required(),
|
||||
signerCert: Joi.alternatives(Joi.binary(), Joi.string()).required(),
|
||||
signerKey: Joi.alternatives(Joi.binary(), Joi.string()).required(),
|
||||
signerKeyPassphrase: Joi.string(),
|
||||
})
|
||||
.required();
|
||||
Reference in New Issue
Block a user