Lines Matching full:order

440  * Submit a new order for a certificate.
444 struct order *order, const struct capaths *p)
453 else if ((lc = sreq(c, p->neworder, 1, req, &order->uri)) < 0)
459 else if (!json_parse_order(j, order))
460 warnx("%s: bad order", p->neworder);
461 else if (order->status == ORDER_INVALID)
462 warnx("%s: order invalid", p->neworder);
475 * Update order status
478 doupdorder(struct conn *c, struct order *order)
484 if ((lc = sreq(c, order->uri, 1, "", NULL)) < 0)
485 warnx("%s: bad comm", order->uri);
487 warnx("%s: bad HTTP: %ld", order->uri, lc);
489 warnx("%s: bad JSON object", order->uri);
490 else if (!json_parse_upd_order(j, order))
491 warnx("%s: bad order", order->uri);
681 struct order order;
777 memset(&order, 0, sizeof(order));
779 if (!doneworder(&c, alts, altsz, &order, &paths))
782 chngs = calloc(order.authsz, sizeof(struct chng));
797 while(order.status != ORDER_VALID && order.status != ORDER_INVALID) {
798 switch (order.status) {
800 warnx("order invalid");
806 if (order.authsz < 1) {
807 warnx("order is in state pending but no "
811 for (i = 0; i < order.authsz; i++) {
812 if (!dochngreq(&c, order.auths[i], &chngs[i]))
843 for (i = 0; i < order.authsz; i++) {
863 if (!docert(&c, order.finalize, cert))
867 warnx("unhandled status: %d", order.status);
870 if (!doupdorder(&c, &order))
873 dodbg("order.status %d", order.status);
874 if (order.status == ORDER_PENDING)
878 if (order.status != ORDER_VALID) {
879 for (i = 0; i < order.authsz; i++) {
880 dochngreq(&c, order.auths[i], &chngs[i]);
893 if (order.certificate == NULL) {
898 if (!dogetcert(&c, order.certificate))
917 for (i = 0; i < order.authsz; i++)